Merge pull request #586 from fermionic/20130114-maintenance-mode
check plugins in separate function
This commit is contained in:
commit
b42427d576
18
boot.php
18
boot.php
|
@ -806,16 +806,12 @@ function is_ajax() {
|
||||||
|
|
||||||
// Primarily involved with database upgrade, but also sets the
|
// Primarily involved with database upgrade, but also sets the
|
||||||
// base url for use in cmdline programs which don't have
|
// base url for use in cmdline programs which don't have
|
||||||
// $_SERVER variables, and synchronising the state of installed plugins.
|
// $_SERVER variables
|
||||||
|
|
||||||
|
|
||||||
if(! function_exists('check_config')) {
|
if(! function_exists('check_config')) {
|
||||||
function check_config(&$a) {
|
function check_config(&$a) {
|
||||||
|
|
||||||
$build = get_config('system','build');
|
|
||||||
if(! x($build))
|
|
||||||
$build = set_config('system','build',DB_UPDATE_VERSION);
|
|
||||||
|
|
||||||
$url = get_config('system','url');
|
$url = get_config('system','url');
|
||||||
|
|
||||||
// if the url isn't set or the stored url is radically different
|
// if the url isn't set or the stored url is radically different
|
||||||
|
@ -830,6 +826,10 @@ if(! function_exists('check_config')) {
|
||||||
$url = set_config('system','url',$a->get_baseurl());
|
$url = set_config('system','url',$a->get_baseurl());
|
||||||
|
|
||||||
|
|
||||||
|
$build = get_config('system','build');
|
||||||
|
if(! x($build))
|
||||||
|
$build = set_config('system','build',DB_UPDATE_VERSION);
|
||||||
|
|
||||||
if($build != DB_UPDATE_VERSION) {
|
if($build != DB_UPDATE_VERSION) {
|
||||||
$stored = intval($build);
|
$stored = intval($build);
|
||||||
$current = intval(DB_UPDATE_VERSION);
|
$current = intval(DB_UPDATE_VERSION);
|
||||||
|
@ -898,6 +898,14 @@ if(! function_exists('check_config')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(! function_exists('check_plugins')) {
|
||||||
|
function check_plugins(&$a) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Synchronise plugins:
|
* Synchronise plugins:
|
||||||
|
|
|
@ -140,8 +140,10 @@ if($install)
|
||||||
$a->module = 'install';
|
$a->module = 'install';
|
||||||
elseif($maintenance)
|
elseif($maintenance)
|
||||||
$a->module = 'maintenance';
|
$a->module = 'maintenance';
|
||||||
else
|
else {
|
||||||
proc_run('php', 'include/dbupdate.php');
|
proc_run('php', 'include/dbupdate.php');
|
||||||
|
check_plugins($a);
|
||||||
|
}
|
||||||
|
|
||||||
nav_set_selected('nothing');
|
nav_set_selected('nothing');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue