projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6118435
)
Fixed check_table to avoid errors in log file.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Fri, 23 Oct 2009 14:22:14 +0000
(14:22 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Fri, 23 Oct 2009 14:22:14 +0000
(14:22 +0000)
admin/inst_upgrade.php
patch
|
blob
|
history
diff --git
a/admin/inst_upgrade.php
b/admin/inst_upgrade.php
index ecfc5b899d821e2cbaa513d75fd31dac47f3dab2..aa0d28388d35fad0459fb12a2277725ed2512c0d 100644
(file)
--- a/
admin/inst_upgrade.php
+++ b/
admin/inst_upgrade.php
@@
-29,10
+29,11
@@
include_once($path_to_root . "/includes/ui.inc");
//
function check_table($pref, $table, $field=null, $properties=null)
{
- $
fields = @db_query("SHOW COLUMNS FROM ".$pref.$table
);
- if (!
$fields
)
+ $
tables = @db_query("SHOW TABLES LIKE '".$pref.$table."'"
);
+ if (!
db_num_rows($tables)
)
return 1; // no such table or error
+ $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table);
if (!isset($field))
return 0; // table exists