projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Helper function for searching indexed submit POST vars
[fa-stable.git]
/
admin
/
db
/
maintenance_db.inc
diff --git
a/admin/db/maintenance_db.inc
b/admin/db/maintenance_db.inc
index fdbd51bfc835aa4bad44400e63d47fb302d8db74..8ed6b7dffd57dfe6e3bef9b9da68db4984cd7cb6 100644
(file)
--- a/
admin/db/maintenance_db.inc
+++ b/
admin/db/maintenance_db.inc
@@
-136,6
+136,12
@@
function db_import($filename, $connection)
{
$data_queries[] = substr($line, 0, strlen($line) - 1);
{
$data_queries[] = substr($line, 0, strlen($line) - 1);
+ // this line does not, too
+ }
+ elseif (strtolower(substr($line,0,6)) == "update")
+ {
+ $data_queries[] = substr($line, 0, strlen($line) - 1);
+
// this line does not, too
}
elseif (strtolower(substr($line, 0, 20)) == "drop table if exists")
// this line does not, too
}
elseif (strtolower(substr($line, 0, 20)) == "drop table if exists")
@@
-149,6
+155,10
@@
function db_import($filename, $connection)
$table = true;
$table_queries[] = $line . "\n";
}
$table = true;
$table_queries[] = $line . "\n";
}
+ elseif (strtolower(substr($line, 0, 11)) == "alter table")
+ {
+ $data_queries[] = substr($line, 0, strlen($line) - 1);
+ }
// the current line belongs to a create sql query
}
// the current line belongs to a create sql query
}
@@
-156,8
+166,10
@@
function db_import($filename, $connection)
{
// create sql query ending in this line
{
// create sql query ending in this line
- if (strtolower(substr($line, 0, 1)) == ")")
+ if (strtolower(substr($line, 0, 1)) == ")")
{
$table = false;
$table = false;
+ $line = substr($line,0,strlen($line)-1);
+ }
$table_queries[count($table_queries) - 1] .= $line . "\n";
}
}
$table_queries[count($table_queries) - 1] .= $line . "\n";
}
}
@@
-202,6
+214,7
@@
function db_import($filename, $connection)
{
//if ($CONF['import_error']) echo $data_query."\n<div class=\"bold_left\">".mysql_error()."</div><br>\n";
$sql_error = true;
{
//if ($CONF['import_error']) echo $data_query."\n<div class=\"bold_left\">".mysql_error()."</div><br>\n";
$sql_error = true;
+ return false;
}
}
}
}
}
}