The branch, master has been updated via c12073871d28eae68769c134781e5eead1722c5f (commit) from 84f621b545e23ccc8645701c7a8d18380226332d (commit)
- Log ----------------------------------------------------------------- commit c12073871d28eae68769c134781e5eead1722c5f Author: Piotr Przybylski piotrprz@gmail.com Date: Wed Aug 24 21:00:41 2011 +0200
Remove deprecated method PMA_Table::_isView()
-----------------------------------------------------------------------
Summary of changes: libraries/Table.class.php | 33 +++++---------------------------- 1 files changed, 5 insertions(+), 28 deletions(-)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 46ebb91..8f04945 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -180,7 +180,8 @@ class PMA_Table static public function isView($db = null, $table = null) { if (strlen($db) && strlen($table)) { - return PMA_Table::_isView($db, $table); + $type = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE'); + return $type == 'VIEW'; }
return false; @@ -252,30 +253,6 @@ class PMA_Table }
/** - * Checks if this "table" is a view - * - * @param string $db the database name - * @param string $table the table name - * - * @deprecated - * @todo see what we could do with the possible existence of $table_is_view - * - * @return boolean whether this is a view - */ - static protected function _isView($db, $table) - { - // maybe we already know if the table is a view - if (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']) { - return true; - } - - // Since phpMyAdmin 3.2 the field TABLE_TYPE is properly filled by - // PMA_DBI_get_tables_full() - $type = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_TYPE'); - return $type == 'VIEW'; - } - - /** * Checks if this is a merge table * * If the ENGINE of the table is MERGE or MRG_MYISAM (alias), @@ -795,7 +772,7 @@ class PMA_Table if (isset($GLOBALS['drop_if_exists']) && $GLOBALS['drop_if_exists'] == 'true' ) { - if (PMA_Table::_isView($target_db, $target_table)) { + if (PMA_Table::isView($target_db, $target_table)) { $drop_query = 'DROP VIEW'; } else { $drop_query = 'DROP TABLE'; @@ -866,7 +843,7 @@ class PMA_Table
// Copy the data unless this is a VIEW if (($what == 'data' || $what == 'dataonly') - && ! PMA_Table::_isView($target_db, $target_table) + && ! PMA_Table::isView($target_db, $target_table) ) { $sql_insert_data = 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source; PMA_DBI_query($sql_insert_data); @@ -882,7 +859,7 @@ class PMA_Table // moving table from replicated one to not replicated one PMA_DBI_select_db($source_db);
- if (PMA_Table::_isView($source_db, $source_table)) { + if (PMA_Table::isView($source_db, $source_table)) { $sql_drop_query = 'DROP VIEW'; } else { $sql_drop_query = 'DROP TABLE';
hooks/post-receive