X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpoller.php;h=b8f0d7189fdf76f761966c255e79d6e3ef800956;hb=d2dc61c246fcbb896f33f23698426893148b2f65;hp=312347d71a6f9ea73377276b2963221eabf0ce21;hpb=01c245254739c14e4ee7eec71d51d2f2c71c65cf;p=friendica.git diff --git a/include/poller.php b/include/poller.php index 312347d71a..b8f0d7189f 100644 --- a/include/poller.php +++ b/include/poller.php @@ -19,19 +19,24 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { require_once("boot.php"); function poller_run($argv, $argc){ - global $a, $db, $poller_up_start, $poller_db_duration; + global $a, $poller_up_start, $poller_db_duration; $poller_up_start = microtime(true); - $a = new App(dirname(__DIR__)); + if (empty($a)) { + $a = new App(dirname(__DIR__)); + } - @include(".htconfig.php"); - require_once("include/dba.php"); - $db = new dba($db_host, $db_user, $db_pass, $db_data); + require_once ".htconfig.php"; + require_once "include/dba.php"; + dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); Config::load(); + // Check the database structure and possibly fixes it + check_db(true); + // Quit when in maintenance if (Config::get('system', 'maintenance', true)) { return; @@ -889,7 +894,7 @@ function poller_run_cron() { poller_kill_stale_workers(); } -if (array_search(__file__,get_included_files())===0){ +if (array_search(__file__,get_included_files())===0) { poller_run($_SERVER["argv"],$_SERVER["argc"]); poller_unclaim_process();