mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
don't run two processes for every web access (noticed that dbupdate is always started as a background task under normal operation).
This commit is contained in:
parent
3742d0d5ba
commit
20eb767b7e
3 changed files with 24 additions and 10 deletions
16
boot.php
16
boot.php
|
@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
|
|||
require_once('include/features.php');
|
||||
|
||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||
define ( 'FRIENDICA_VERSION', '3.1.1589' );
|
||||
define ( 'FRIENDICA_VERSION', '3.1.1592' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1158 );
|
||||
|
||||
|
@ -803,6 +803,20 @@ function is_ajax() {
|
|||
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
|
||||
}
|
||||
|
||||
function check_db() {
|
||||
|
||||
$build = get_config('system','build');
|
||||
if(! x($build)) {
|
||||
set_config('system','build',DB_UPDATE_VERSION);
|
||||
$buid = DB_UPDATE_VERSION;
|
||||
}
|
||||
if($build != DB_UPDATE_VERSION)
|
||||
proc_run('php', 'include/dbupdate.php');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Primarily involved with database upgrade, but also sets the
|
||||
// base url for use in cmdline programs which don't have
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue