PMA_is_system_schema --> PMA_isSystemSchema

This commit is contained in:
Kasun Chathuranga 2013-05-12 08:51:54 +05:30
parent 264454f2dd
commit 03fc9b9256
17 changed files with 19 additions and 19 deletions

View File

@ -206,7 +206,7 @@ if (empty($is_info)) {
}
$_REQUEST['db_collation'] = PMA_getDbCollation($db);
$is_information_schema = PMA_is_system_schema($db);
$is_information_schema = PMA_isSystemSchema($db);
if (!$is_information_schema) {
if ($cfgRelation['commwork']) {

View File

@ -87,7 +87,7 @@ abstract class PMA_List extends ArrayObject
$options = '';
foreach ($this as $each_item) {
if (false === $include_information_schema
&& PMA_is_system_schema($each_item)
&& PMA_isSystemSchema($each_item)
) {
continue;
}

View File

@ -240,7 +240,7 @@ class PMA_Menu
*/
private function _getTableTabs()
{
$db_is_information_schema = PMA_is_system_schema($this->_db);
$db_is_information_schema = PMA_isSystemSchema($this->_db);
$tbl_is_view = PMA_Table::isView($this->_db, $this->_table);
$table_info_num_rows = PMA_Table::countRecords($this->_db, $this->_table);
@ -325,7 +325,7 @@ class PMA_Menu
*/
private function _getDbTabs()
{
$db_is_information_schema = PMA_is_system_schema($this->_db);
$db_is_information_schema = PMA_isSystemSchema($this->_db);
$num_tables = count(PMA_DBI_getTables($this->_db));
$is_superuser = PMA_isSuperuser();

View File

@ -525,7 +525,7 @@ class PMA_Table
// Make an exception for views in I_S and D_D schema in
// Drizzle, as these map to in-memory data and should execute
// fast enough
if (! $is_view || (PMA_DRIZZLE && PMA_is_system_schema($db))) {
if (! $is_view || (PMA_DRIZZLE && PMA_isSystemSchema($db))) {
$row_count = PMA_DBI_fetchValue(
'SELECT COUNT(*) FROM ' . PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table)

View File

@ -823,7 +823,7 @@ class PMA_Util
// set this because PMA_Table::countRecords() can use it
$tbl_is_view = $table['TABLE_TYPE'] == 'VIEW';
if ($tbl_is_view || PMA_is_system_schema($db)) {
if ($tbl_is_view || PMA_isSystemSchema($db)) {
$table['Rows'] = PMA_Table::countRecords(
$db,
$table['Name'],

View File

@ -81,7 +81,7 @@ function PMA_buildHtmlForDb(
. 'title="' . htmlspecialchars($current['SCHEMA_NAME']) . '" '
. 'value="' . htmlspecialchars($current['SCHEMA_NAME']) . '"';
if (PMA_is_system_schema($current['SCHEMA_NAME'], true)) {
if (PMA_isSystemSchema($current['SCHEMA_NAME'], true)) {
$out .= ' disabled="disabled"';
}
$out .= ' /></td>';

View File

@ -2092,7 +2092,7 @@ function PMA_DBI_formatError($error_number, $error_message)
*
* @return bool
*/
function PMA_is_system_schema($schema_name, $test_for_mysql_schema = false)
function PMA_isSystemSchema($schema_name, $test_for_mysql_schema = false)
{
return strtolower($schema_name) == 'information_schema'
|| (!PMA_DRIZZLE && strtolower($schema_name) == 'performance_schema')

View File

@ -18,7 +18,7 @@ PMA_Util::checkParameters(array('db'));
$is_show_stats = $cfg['ShowStats'];
$db_is_information_schema = PMA_is_system_schema($db);
$db_is_information_schema = PMA_isSystemSchema($db);
if ($db_is_information_schema) {
$is_show_stats = false;
}

View File

@ -41,7 +41,7 @@ $is_show_stats = $cfg['ShowStats'];
*/
$db_is_information_schema = false;
if (PMA_is_system_schema($db)) {
if (PMA_isSystemSchema($db)) {
$is_show_stats = false;
$db_is_information_schema = true;
}

View File

@ -186,7 +186,7 @@ function PMA_generateCharsetQueryPart($collation)
*/
function PMA_getDbCollation($db)
{
if (PMA_is_system_schema($db)) {
if (PMA_isSystemSchema($db)) {
// We don't have to check the collation of the virtual
// information_schema database: We know it!
return 'utf8_general_ci';

View File

@ -286,7 +286,7 @@ function PMA_replication_master_replicated_dbs($link = null)
$tmp_alldbs = PMA_DBI_query('SHOW DATABASES;', $link);
while ($tmp_row = PMA_DBI_fetchRow($tmp_alldbs)) {
if (PMA_is_system_schema($tmp_row[0])) {
if (PMA_isSystemSchema($tmp_row[0])) {
continue;
}
if (count($do_db) == 0) {

View File

@ -19,7 +19,7 @@ function PMA_replication_db_multibox()
$multi_values .= '<select name="db_select[]" size="6" multiple="multiple" id="db_select">';
foreach ($GLOBALS['pma']->databases as $current_db) {
if (PMA_is_system_schema($current_db)) {
if (PMA_isSystemSchema($current_db)) {
continue;
}
if (! empty($selectall) || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) {

View File

@ -17,7 +17,7 @@ require_once './libraries/bookmark.lib.php';
// Check parameters
PMA_Util::checkParameters(array('db', 'table'));
$db_is_information_schema = PMA_is_system_schema($db);
$db_is_information_schema = PMA_isSystemSchema($db);
/**
* Set parameters for links

View File

@ -244,7 +244,7 @@ if ($databases_count > 0) {
$odd_row = true;
foreach ($databases as $current) {
$tr_class = $odd_row ? 'odd' : 'even';
if (PMA_is_system_schema($current['SCHEMA_NAME'], true)) {
if (PMA_isSystemSchema($current['SCHEMA_NAME'], true)) {
$tr_class .= ' noclick';
}
$html .= '<tr class="' . $tr_class . '">' . "\n";

View File

@ -962,7 +962,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
}
// hide edit and delete links for information_schema
if (PMA_is_system_schema($db)) {
if (PMA_isSystemSchema($db)) {
$disp_mode = 'nnnn110111';
}
@ -1089,7 +1089,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
// hide edit and delete links:
// - for information_schema
// - if the result set does not contain all the columns of a unique key
if (PMA_is_system_schema($db) || ! $has_unique) {
if (PMA_isSystemSchema($db) || ! $has_unique) {
$disp_mode = 'nnnn110111';
$msg = PMA_message::notice(
__(

View File

@ -222,7 +222,7 @@ foreach ($the_tables as $key => $table) {
} // end foreach
echo '</tbody>';
echo '</table>';
if (! $tbl_is_view && !PMA_is_system_schema($db)) {
if (! $tbl_is_view && !PMA_isSystemSchema($db)) {
/**
* Displays indexes
*/

View File

@ -66,7 +66,7 @@ class PMA_DBI_Test extends PHPUnit_Framework_TestCase
*/
function testSystemSchema($schema, $expected)
{
$this->assertEquals($expected, PMA_is_system_schema($schema));
$this->assertEquals($expected, PMA_isSystemSchema($schema));
}
/**