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 Aug 6, 2015
2 parents 79e92cb + bb1646d commit e6c8a6f
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions libraries/controllers/StructureController.class.php
Expand Up @@ -117,11 +117,11 @@ public function indexAction()
}

$this->response->getHeader()->getScripts()->addFiles(
array(
'db_structure.js',
'tbl_change.js',
'jquery/jquery-ui-timepicker-addon.js'
)
array(
'db_structure.js',
'tbl_change.js',
'jquery/jquery-ui-timepicker-addon.js'
)
);

// Drops/deletes/etc. multiple tables if required
Expand Down Expand Up @@ -253,9 +253,9 @@ public function indexAction()
list($current_table, $formatted_size, $unit, $formatted_overhead,
$overhead_unit, $overhead_size, $table_is_view, $sum_size)
= $this->getStuffForEngineTypeTable(
$current_table, $this->_db_is_system_schema,
$this->_is_show_stats, $sum_size, $overhead_size
);
$current_table, $this->_db_is_system_schema,
$this->_is_show_stats, $sum_size, $overhead_size
);

if (! $this->dbi->getTable($this->_db, $current_table['TABLE_NAME'])->isMerge()) {
$sum_entries += $current_table['TABLE_ROWS'];
Expand Down Expand Up @@ -310,23 +310,19 @@ public function indexAction()
}
}

$alias = str_replace(
' ', ' ', htmlspecialchars(
(!empty($tooltip_aliasname) &&
isset($tooltip_aliasname[$current_table['TABLE_NAME']])) ?
$tooltip_aliasname[$current_table['TABLE_NAME']] :
$current_table['TABLE_NAME']
)
$alias = htmlspecialchars(
(!empty($tooltip_aliasname) && isset($tooltip_aliasname[$current_table['TABLE_NAME']]))
? $tooltip_aliasname[$current_table['TABLE_NAME']]
: $current_table['TABLE_NAME']
);
$alias = str_replace(' ', ' ', $alias);

$truename = str_replace(
' ', ' ', htmlspecialchars(
(!empty($tooltip_truename) &&
isset($tooltip_truename[$current_table['TABLE_NAME']])) ?
$tooltip_truename[$current_table['TABLE_NAME']] :
$current_table['TABLE_NAME']
)
$truename = htmlspecialchars(
(!empty($tooltip_truename) && isset($tooltip_truename[$current_table['TABLE_NAME']]))
? $tooltip_truename[$current_table['TABLE_NAME']]
: $current_table['TABLE_NAME']
);
$truename = str_replace(' ', ' ', $truename);

$i++;

Expand Down Expand Up @@ -629,10 +625,10 @@ public function indexAction()
require_once 'libraries/bookmark.lib.php';

$this->response->getHeader()->getScripts()->addFiles(
array(
'tbl_structure.js',
'indexes.js'
)
array(
'tbl_structure.js',
'indexes.js'
)
);

/**
Expand Down Expand Up @@ -757,7 +753,8 @@ public function indexAction()
),
'engine' => $engine
)
));
)
);
$this->response->addHTML('<div id="structure_content">');

/**
Expand Down Expand Up @@ -819,8 +816,8 @@ public function indexAction()
$columns_with_index = $this->dbi
->getTable($this->_db, $this->_table)
->getColumnsWithIndex(
PMA_Index::UNIQUE | PMA_Index::INDEX | PMA_Index::SPATIAL | PMA_Index::FULLTEXT
);
PMA_Index::UNIQUE | PMA_Index::INDEX | PMA_Index::SPATIAL | PMA_Index::FULLTEXT
);
$columns_with_unique_index = $this->dbi
->getTable($this->_db, $this->_table)
->getColumnsWithIndex(PMA_Index::UNIQUE);
Expand Down Expand Up @@ -850,8 +847,12 @@ public function indexAction()
$create_table_fields = SqlParser\Utils\Table::getFields($stmt);

//display table structure
$this->response->addHTML($this->displayStructure($cfgRelation, $columns_with_unique_index,
$url_params, $primary, $fields, $columns_with_index, $create_table_fields));
$this->response->addHTML(
$this->displayStructure(
$cfgRelation, $columns_with_unique_index, $url_params, $primary,
$fields, $columns_with_index, $create_table_fields
)
);

$this->response->addHTML('</div>');
}
Expand Down

0 comments on commit e6c8a6f

Please sign in to comment.