Skip to content

Commit

Permalink
Rename variable to match current meaning
Browse files Browse the repository at this point in the history
There is not only INFORMATION_SCHEMA now, so the variable should have
more generic name.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jan 6, 2014
1 parent c2c3da1 commit 790a2c2
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion db_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
// You won't be able to. Believe me. You won't.
// Don't allow to easily drop mysql database, RFE #1327514.
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
&& ! $db_is_information_schema
&& ! $db_is_system_schema
&& (PMA_DRIZZLE || $db != 'mysql')
) {
$response->addHTML(PMA_getHtmlForDropDatabaseLink($db));
Expand Down
18 changes: 9 additions & 9 deletions db_structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
$response->addHTML(
'<p>' . __('No tables found in database.') . '</p>' . "\n"
);
if (empty($db_is_information_schema)) {
if (empty($db_is_system_schema)) {
ob_start();
include 'libraries/display_create_table.lib.php';
$content = ob_get_contents();
Expand Down Expand Up @@ -114,7 +114,7 @@
$response->addHTML(PMA_URL_getHiddenInputs($db));

$response->addHTML(
PMA_tableHeader($db_is_information_schema, $server_slave_status)
PMA_tableHeader($db_is_system_schema, $server_slave_status)
);

$i = $sum_entries = 0;
Expand Down Expand Up @@ -149,7 +149,7 @@
list($current_table, $formatted_size, $unit, $formatted_overhead,
$overhead_unit, $overhead_size, $table_is_view, $sum_size)
= PMA_getStuffForEngineTypeTable(
$current_table, $db_is_information_schema,
$current_table, $db_is_system_schema,
$is_show_stats, $table_is_view, $sum_size, $overhead_size
);

Expand Down Expand Up @@ -226,10 +226,10 @@
list($browse_table, $search_table, $browse_table_label, $empty_table,
$tracking_icon) = PMA_getHtmlForActionLinks(
$current_table, $table_is_view, $tbl_url_query,
$titles, $truename, $db_is_information_schema, $url_query
$titles, $truename, $db_is_system_schema, $url_query
);

if (! $db_is_information_schema) {
if (! $db_is_system_schema) {
list($drop_query, $drop_message)
= PMA_getTableDropQueryAndMessage($table_is_view, $current_table);
}
Expand All @@ -255,7 +255,7 @@
list($html_output, $odd_row) = PMA_getHtmlForStructureTableRow(
$i, $odd_row, $table_is_view, $current_table,
$browse_table_label, $tracking_icon, $server_slave_status,
$browse_table, $tbl_url_query, $search_table, $db_is_information_schema,
$browse_table, $tbl_url_query, $search_table, $db_is_system_schema,
$titles, $empty_table, $drop_query, $drop_message, $collation,
$formatted_size, $unit, $overhead,
(isset ($create_time) ? $create_time : ''),
Expand All @@ -271,7 +271,7 @@
$response->addHTML('</tbody>');
$response->addHTML(
PMA_getHtmlBodyForTableSummary(
$num_tables, $server_slave_status, $db_is_information_schema, $sum_entries,
$num_tables, $server_slave_status, $db_is_system_schema, $sum_entries,
$db_collation, $is_show_stats, $sum_size, $overhead_size, $create_time_all,
$update_time_all, $check_time_all, $sum_row_count_pre
)
Expand All @@ -281,7 +281,7 @@
$response->addHTML(
PMA_getHtmlForCheckAllTables(
$pmaThemeImage, $text_dir, $overhead_check,
$db_is_information_schema, $hidden_fields
$db_is_system_schema, $hidden_fields
)
);
$response->addHTML('</form>'); //end of form
Expand All @@ -306,7 +306,7 @@
. PMA_getHtmlForDataDictionaryLink($url_query)
);

if (empty($db_is_information_schema)) {
if (empty($db_is_system_schema)) {
ob_start();
include 'libraries/display_create_table.lib.php';
$content = ob_get_contents();
Expand Down
2 changes: 1 addition & 1 deletion db_tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if ($num_tables == 0 && count($data['ddlog']) == 0) {
echo '<p>' . __('No tables found in database.') . '</p>' . "\n";

if (empty($db_is_information_schema)) {
if (empty($db_is_system_schema)) {
include 'libraries/display_create_table.lib.php';
}
exit;
Expand Down
20 changes: 10 additions & 10 deletions libraries/Menu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private function _getBreadcrumbs()
*/
private function _getTableTabs()
{
$db_is_information_schema = $GLOBALS['dbi']->isSystemSchema($this->_db);
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($this->_db);
$tbl_is_view = PMA_Table::isView($this->_db, $this->_table);
$is_superuser = $GLOBALS['dbi']->isSuperuser();

Expand All @@ -312,7 +312,7 @@ private function _getTableTabs()
array('tbl_select.php', 'tbl_zoom_select.php', 'tbl_find_replace.php')
);

if (! $db_is_information_schema) {
if (! $db_is_system_schema) {
$tabs['insert']['icon'] = 'b_insrow.png';
$tabs['insert']['link'] = 'tbl_change.php';
$tabs['insert']['text'] = __('Insert');
Expand All @@ -326,12 +326,12 @@ private function _getTableTabs()
/**
* Don't display "Import" for views and information_schema
*/
if (! $tbl_is_view && ! $db_is_information_schema) {
if (! $tbl_is_view && ! $db_is_system_schema) {
$tabs['import']['icon'] = 'b_tblimport.png';
$tabs['import']['link'] = 'tbl_import.php';
$tabs['import']['text'] = __('Import');
}
if ($is_superuser && ! PMA_DRIZZLE && ! $db_is_information_schema) {
if ($is_superuser && ! PMA_DRIZZLE && ! $db_is_system_schema) {
$tabs['privileges']['link'] = 'server_privileges.php';
$tabs['privileges']['args']['checkprivsdb'] = $this->_db;
$tabs['privileges']['args']['checkprivstable'] = $this->_table;
Expand All @@ -343,7 +343,7 @@ private function _getTableTabs()
/**
* Don't display "Operations" for views and information_schema
*/
if (! $tbl_is_view && ! $db_is_information_schema) {
if (! $tbl_is_view && ! $db_is_system_schema) {
$tabs['operation']['icon'] = 'b_tblops.png';
$tabs['operation']['link'] = 'tbl_operations.php';
$tabs['operation']['text'] = __('Operations');
Expand All @@ -353,7 +353,7 @@ private function _getTableTabs()
$tabs['tracking']['text'] = __('Tracking');
$tabs['tracking']['link'] = 'tbl_tracking.php';
}
if (! $db_is_information_schema
if (! $db_is_system_schema
&& ! PMA_DRIZZLE
&& PMA_Util::currentUserHasPrivilege(
'TRIGGER',
Expand All @@ -370,7 +370,7 @@ private function _getTableTabs()
/**
* Views support a limited number of operations
*/
if ($tbl_is_view && ! $db_is_information_schema) {
if ($tbl_is_view && ! $db_is_system_schema) {
$tabs['operation']['icon'] = 'b_tblops.png';
$tabs['operation']['link'] = 'view_operations.php';
$tabs['operation']['text'] = __('Operations');
Expand All @@ -386,7 +386,7 @@ private function _getTableTabs()
*/
private function _getDbTabs()
{
$db_is_information_schema = $GLOBALS['dbi']->isSystemSchema($this->_db);
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($this->_db);
$num_tables = count($GLOBALS['dbi']->getTables($this->_db));
$is_superuser = $GLOBALS['dbi']->isSuperuser();

Expand Down Expand Up @@ -426,7 +426,7 @@ private function _getDbTabs()
$tabs['export']['warning'] = __('Database seems to be empty!');
}

if (! $db_is_information_schema) {
if (! $db_is_system_schema) {
$tabs['import']['link'] = 'db_import.php';
$tabs['import']['text'] = __('Import');
$tabs['import']['icon'] = 'b_import.png';
Expand Down Expand Up @@ -471,7 +471,7 @@ private function _getDbTabs()
$tabs['tracking']['link'] = 'db_tracking.php';
}

if (! $db_is_information_schema && $cfgRelation['designerwork']) {
if (! $db_is_system_schema && $cfgRelation['designerwork']) {
$tabs['designer']['text'] = __('Designer');
$tabs['designer']['icon'] = 'b_relations.png';
$tabs['designer']['link'] = 'pmd_general.php';
Expand Down
4 changes: 2 additions & 2 deletions libraries/db_common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

$is_show_stats = $cfg['ShowStats'];

$db_is_information_schema = $GLOBALS['dbi']->isSystemSchema($db);
if ($db_is_information_schema) {
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
if ($db_is_system_schema) {
$is_show_stats = false;
}

Expand Down
6 changes: 3 additions & 3 deletions libraries/db_info.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* tables if possible
*
* fills tooltip arrays and provides $tables, $num_tables, $is_show_stats
* and $db_is_information_schema
* and $db_is_system_schema
*
* speedup view on locked tables
*
Expand Down Expand Up @@ -39,11 +39,11 @@
/**
* @global bool whether selected db is information_schema
*/
$db_is_information_schema = false;
$db_is_system_schema = false;

if ($GLOBALS['dbi']->isSystemSchema($db)) {
$is_show_stats = false;
$db_is_information_schema = true;
$db_is_system_schema = true;
}

/**
Expand Down
20 changes: 10 additions & 10 deletions libraries/display_structure.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$response->addHTML(PMA_URL_getHiddenInputs($db, $table));

$tabletype = '<input type="hidden" name="table_type" value=';
if ($db_is_information_schema) {
if ($db_is_system_schema) {
$tabletype .= '"information_schema" />';
} else if ($tbl_is_view) {
$tabletype .= '"view" />';
Expand All @@ -49,7 +49,7 @@

$response->addHTML(
PMA_getHtmlForTableStructureHeader(
$db_is_information_schema,
$db_is_system_schema,
$tbl_is_view
)
);
Expand Down Expand Up @@ -173,19 +173,19 @@
$row, $rownum, $displayed_field_name,
$type_nowrap, $extracted_columnspec, $type_mime,
$field_charset, $attribute, $tbl_is_view,
$db_is_information_schema, $url_query, $field_encoded, $titles, $table
$db_is_system_schema, $url_query, $field_encoded, $titles, $table
)
);

if (! $tbl_is_view && ! $db_is_information_schema) {
if (! $tbl_is_view && ! $db_is_system_schema) {
$response->addHTML(
PMA_getHtmlForActionsInTableStructure(
$type, $tbl_storage_engine, $primary,
$field_name, $url_query, $titles, $row, $rownum,
$hidden_titles, $columns_with_unique_index
)
);
} // end if (! $tbl_is_view && ! $db_is_information_schema)
} // end if (! $tbl_is_view && ! $db_is_system_schema)

$response->addHTML('</tr>');

Expand All @@ -197,7 +197,7 @@
$response->addHTML(
PMA_getHtmlForCheckAllTableColumn(
$pmaThemeImage, $text_dir, $tbl_is_view,
$db_is_information_schema, $tbl_storage_engine
$db_is_system_schema, $tbl_storage_engine
)
);

Expand All @@ -217,12 +217,12 @@
}
$response->addHTML(
PMA_getHtmlForOptionalActionLinks(
$url_query, $tbl_is_view, $db_is_information_schema,
$url_query, $tbl_is_view, $db_is_system_schema,
$tbl_storage_engine, $cfgRelation
)
);

if (! $tbl_is_view && ! $db_is_information_schema) {
if (! $tbl_is_view && ! $db_is_system_schema) {
$response->addHTML('<br />');
$response->addHTML(PMA_getHtmlForAddColumn($columns_list));
$response->addHTML(
Expand All @@ -235,7 +235,7 @@
*/

if (! $tbl_is_view
&& ! $db_is_information_schema
&& ! $db_is_system_schema
&& 'ARCHIVE' != $tbl_storage_engine
) {
//return the list of index
Expand All @@ -255,7 +255,7 @@
//get table stats in HTML format
$tablestats = PMA_getHtmlForDisplayTableStats(
$showtable, $table_info_num_rows, $tbl_is_view,
$db_is_information_schema, $tbl_storage_engine,
$db_is_system_schema, $tbl_storage_engine,
$url_query, $tbl_collation
);
//returning the response in JSON format to be used by Ajax
Expand Down
Loading

0 comments on commit 790a2c2

Please sign in to comment.