mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Bugtracker #4874 possible fix - ignore blank lines in sql files
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* Administration - DB Verify
|
* Administration - DB Verify
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
|
||||||
* $Revision: 1.12 $
|
* $Revision: 1.13 $
|
||||||
* $Date: 2009-12-31 09:55:57 $
|
* $Date: 2010-01-21 20:44:27 $
|
||||||
* $Author: e107steved $
|
* $Author: e107steved $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -77,29 +77,32 @@ function read_tables($tab)
|
|||||||
foreach($file as $line)
|
foreach($file as $line)
|
||||||
{
|
{
|
||||||
$line = ltrim(stripslashes($line));
|
$line = ltrim(stripslashes($line));
|
||||||
$match = array();
|
if ($line)
|
||||||
if (preg_match('/CREATE TABLE (.*) /', $line, $match))
|
|
||||||
{
|
{
|
||||||
if($match[1] != "user_extended")
|
$match = array();
|
||||||
|
if (preg_match('/CREATE TABLE (.*) /', $line, $match))
|
||||||
{
|
{
|
||||||
$table_list[$match[1]] = 1;
|
if($match[1] != "user_extended")
|
||||||
$current_table = $match[1];
|
{
|
||||||
$x = 0;
|
$table_list[$match[1]] = 1;
|
||||||
$cnt = 0;
|
$current_table = $match[1];
|
||||||
|
$x = 0;
|
||||||
|
$cnt = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (strpos($line, "TYPE=") !== FALSE)
|
if (strpos($line, "TYPE=") !== FALSE)
|
||||||
{
|
{
|
||||||
$current_table = "";
|
$current_table = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($current_table && $x)
|
if ($current_table && $x)
|
||||||
{
|
{
|
||||||
$tablines[$current_table][$cnt++] = $line;
|
$tablines[$current_table][$cnt++] = $line;
|
||||||
}
|
}
|
||||||
|
|
||||||
$x = 1;
|
$x = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get multi-language tables as well
|
// Get multi-language tables as well
|
||||||
|
Reference in New Issue
Block a user