try okapi update only if okapi is installed
This commit is contained in:
+15
-3
@@ -25,11 +25,23 @@
|
||||
chdir ($rootpath . 'doc/sql/stored-proc');
|
||||
system('php maintain.php');
|
||||
|
||||
echo "updating OKAPI database\n";
|
||||
chdir ($rootpath . '../bin');
|
||||
system('php okapi-update.php | grep -i -e mutation');
|
||||
// We do *two* tests for OKAPI presence to get some robustness agains internal OKAPI changes.
|
||||
// This should be replaced by a facade function call.
|
||||
$okapi_vars = sql_table_exists('okapi_vars');
|
||||
$okapi_syncbase = sql_field_exists('caches','okapi_syncbase');
|
||||
if ($okapi_vars != $okapi_syncbase)
|
||||
{
|
||||
echo "!! unknown OKAPI configuration; either dbupdate.php needs an update or your database configuration is wrong\n";
|
||||
}
|
||||
else if ($okapi_vars)
|
||||
{
|
||||
echo "updating OKAPI database\n";
|
||||
chdir ($rootpath . '../bin');
|
||||
system('php okapi-update.php | grep -i -e mutation');
|
||||
}
|
||||
|
||||
echo "resetting webcache:\n";
|
||||
chdir ($rootpath . '../bin');
|
||||
system('php clear-webcache.php');
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user