Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jan 25, 2013
2 parents f54b565 + 4f99292 commit e06c566
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
19 changes: 10 additions & 9 deletions libraries/schema/Visio_Relation_Schema.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class Table_Stats
* Defines properties
*/

private $_tables;
private $_tableName;
private $_showInfo = false;

Expand Down Expand Up @@ -541,8 +542,8 @@ function __construct()
$alltables = $this->getAllTables($db, $this->pageNumber);

foreach ($alltables as $table) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
if (! isset($this->_tables[$table])) {
$this->_tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
}
}

Expand Down Expand Up @@ -594,19 +595,19 @@ function __construct()
*/
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
{
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats(
if (! isset($this->_tables[$masterTable])) {
$this->_tables[$masterTable] = new Table_Stats(
$masterTable, $this->pageNumber, $showKeys
);
}
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats(
if (! isset($this->_tables[$foreignTable])) {
$this->_tables[$foreignTable] = new Table_Stats(
$foreignTable, $this->pageNumber, $showKeys
);
}
$this->_relations[] = new Relation_Stats(
$this->tables[$masterTable], $masterField,
$this->tables[$foreignTable], $foreignField
$this->_tables[$masterTable], $masterField,
$this->_tables[$foreignTable], $foreignField
);
}

Expand Down Expand Up @@ -638,7 +639,7 @@ private function _drawRelations($changeColor)
*/
private function _drawTables($changeColor)
{
foreach ($this->tables as $table) {
foreach ($this->_tables as $table) {
$table->tableDraw($changeColor);
}
}
Expand Down
13 changes: 5 additions & 8 deletions tbl_relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,14 @@
* @param array $choices Choices for dropdown
* @param string $selected_value Selected value
*
* @return string $html_output The html code for existing value (for selected)
* @return string The html code for existing value (for selected)
*
* @access public
* @access public
*/
function PMA_generateDropdown(
$dropdown_question, $select_name, $choices, $selected_value
) {

$html_output .= htmlspecialchars($dropdown_question) . '  '
$html_output = htmlspecialchars($dropdown_question) . '  '
. '<select name="' . htmlspecialchars($select_name) . '">' . "\n";

foreach ($choices as $one_value => $one_label) {
Expand All @@ -553,17 +552,16 @@ function PMA_generateDropdown(
$html_output .= '</select>' . "\n";

return $html_output;

}

/**
* Split a string on backquote pairs
*
* @param string $text original string
*
* @return array containing the elements (and their surrounding backquotes)
* @return array containing the elements (and their surrounding backquotes)
*
* @access public
* @access public
*/
function PMA_backquoteSplit($text)
{
Expand All @@ -588,5 +586,4 @@ function PMA_backquoteSplit($text)
}
return($elements);
}

?>

0 comments on commit e06c566

Please sign in to comment.