From 67c68ba7caec16e66f2b93eb7e98ebfa8ee04422 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 11 May 2012 22:11:24 +0530 Subject: [PATCH] Fix function names: PMA_foreignkey_supported -> PMA_isForeignKeySupported --- libraries/common.lib.php | 2 +- libraries/pmd_common.php | 2 +- libraries/schema/User_Schema.class.php | 2 +- pmd_general.php | 2 +- pmd_relation_new.php | 2 +- pmd_relation_upd.php | 2 +- tbl_relation.php | 16 ++++++++-------- tbl_structure.php | 2 +- .../common/PMA_foreignKeySupported_test.php | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index ab563ffa2b..d4f63dfb34 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -3054,7 +3054,7 @@ function PMA_extractColumnSpec($columnspec) * * @return boolean */ -function PMA_foreignkey_supported($engine) +function PMA_isForeignKeySupported($engine) { $engine = strtoupper($engine); if ('INNODB' == $engine || 'PBXT' == $engine) { diff --git a/libraries/pmd_common.php b/libraries/pmd_common.php index 5964751d64..21d46eca37 100644 --- a/libraries/pmd_common.php +++ b/libraries/pmd_common.php @@ -210,7 +210,7 @@ function get_script_tabs() 'var h_tabs = new Array();' . "\n" ; for ($i = 0, $cnt = count($GLOBALS['PMD']['TABLE_NAME']); $i < $cnt; $i++) { $script_tabs .= "j_tabs['" . $GLOBALS['PMD_URL']['TABLE_NAME'][$i] . "'] = '" - . (PMA_foreignkey_supported($GLOBALS['PMD']['TABLE_TYPE'][$i]) ? '1' : '0') . "';\n"; + . (PMA_isForeignKeySupported($GLOBALS['PMD']['TABLE_TYPE'][$i]) ? '1' : '0') . "';\n"; $script_tabs .="h_tabs['" . $GLOBALS['PMD_URL']['TABLE_NAME'][$i] . "'] = 1;"."\n" ; } $script_tabs .= diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index c325ffef45..6159107b09 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -690,7 +690,7 @@ class PMA_User_Schema $tables = PMA_DBI_get_tables_full($db); $foreignkey_tables = array(); foreach ($tables as $table_name => $table_properties) { - if (PMA_foreignkey_supported($table_properties['ENGINE'])) { + if (PMA_isForeignKeySupported($table_properties['ENGINE'])) { $foreignkey_tables[] = $table_name; } } diff --git a/pmd_general.php b/pmd_general.php index 7a0f741d91..d55bcc8602 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -279,7 +279,7 @@ for ($j = 0, $id_cnt = count($tab_column[$t_n]["COLUMN_ID"]); $j < $id_cnt; $j++ onmouseout="this.className = old_class;" onmousedown="Click_field(' 0) { ' . __('Internal relation'); - if (PMA_foreignkey_supported($tbl_storage_engine)) { + if (PMA_isForeignKeySupported($tbl_storage_engine)) { echo PMA_showHint(__('An internal relation is not necessary when a corresponding FOREIGN KEY relation exists.')); } echo ''; } - if (PMA_foreignkey_supported($tbl_storage_engine)) { + if (PMA_isForeignKeySupported($tbl_storage_engine)) { // this does not have to be translated, it's part of the MySQL syntax echo '' . __('Foreign key constraint') . ' (' . $tbl_storage_engine . ')'; echo ''; @@ -466,7 +466,7 @@ if (count($columns) > 0) { '; if (!empty($save_row[$i]['Key'])) { ?> diff --git a/tbl_structure.php b/tbl_structure.php index c71a841ae1..de5bb8a1d0 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -659,7 +659,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) { // if internal relations are available, or foreign keys are supported // ($tbl_storage_engine comes from libraries/tbl_info.inc.php) - if ($cfgRelation['relwork'] || PMA_foreignkey_supported($tbl_storage_engine)) { + if ($cfgRelation['relwork'] || PMA_isForeignKeySupported($tbl_storage_engine)) { ?> assertEquals($e, PMA_foreignkey_supported($a)); + $this->assertEquals($e, PMA_isForeignKeySupported($a)); } } ?>