projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed extension module update and deletion.
[fa-stable.git]
/
admin
/
inst_upgrade.php
diff --git
a/admin/inst_upgrade.php
b/admin/inst_upgrade.php
index 9ef317ebebb0ae5a8b548a63a93c880c3174b2fd..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)
{
//
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
return 1; // no such table or error
+ $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table);
if (!isset($field))
return 0; // table exists
if (!isset($field))
return 0; // table exists
@@
-98,7
+99,7
@@
function upgrade_step($index, $conn)
$state = $inst->installed($pref);
if (!$state || $force)
{
$state = $inst->installed($pref);
if (!$state || $force)
{
- if (!$inst->pre_check($pref)) return false;
+ if (!$inst->pre_check($pref
, $force
)) return false;
$sql = $inst->sql;
if ($sql != '')
$sql = $inst->sql;
if ($sql != '')