diff --git a/e107_admin/db_verify.php b/e107_admin/db_verify.php index a5f916376..bc9d8b98b 100644 --- a/e107_admin/db_verify.php +++ b/e107_admin/db_verify.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:33:19 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-04-03 21:05:44 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ require_once("../class2.php"); @@ -99,23 +99,30 @@ function read_tables($tab) { } -function get_current($tab, $prefix = "") { - if (!$prefix) { - $prefix = MPREFIX; - } - $result = mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1'); - $qry = 'SHOW CREATE TABLE `'.$prefix.$tab."`"; - $z = mysql_query($qry); - if ($z) { - $row = mysql_fetch_row($z); - return str_replace("`", "", stripslashes($row[1])); - } else { - return FALSE; - } +// Get list of fields and keys for a table +function get_current($tab, $prefix = "") +{ + if (!$prefix) + { + $prefix = MPREFIX; + } + $result = mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1'); + $qry = 'SHOW CREATE TABLE `'.$prefix.$tab."`"; + $z = mysql_query($qry); + if ($z) + { + $row = mysql_fetch_row($z); + return str_replace("`", "", stripslashes($row[1])); + } + else + { + return FALSE; + } } -function check_tables($what) { +function check_tables($what) +{ global $tablines; global $table_list; global $ns; @@ -123,6 +130,8 @@ function check_tables($what) { $table_list = ""; read_tables($what); + $fix_active = FALSE; // Flag set as soon as there's a fix - enables 'Fix it' button + $text = "