X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=39e8c583a0797c53981d06573cd4632c6ce856a0;hb=d72673b1624908279d0a79a20888577ddfb5d9d1;hp=13c3f6318f815fd4923926836af04bca8abb8120;hpb=126c4774c330d9c9c9038312198c57fb653682df;p=friendica.git diff --git a/index.php b/index.php index 13c3f6318f..39e8c583a0 100644 --- a/index.php +++ b/index.php @@ -60,15 +60,15 @@ if(!$install) { if ($a->max_processes_reached() OR $a->maxload_reached()) { header($_SERVER["SERVER_PROTOCOL"].' 503 Service Temporarily Unavailable'); header('Retry-After: 120'); - header('Refresh: 120; url='.$a->get_baseurl()."/".$a->query_string); + header('Refresh: 120; url='.App::get_baseurl()."/".$a->query_string); die("System is currently unavailable. Please try again later"); } if (get_config('system','force_ssl') AND ($a->get_scheme() == "http") AND (intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) AND - (substr($a->get_baseurl(), 0, 8) == "https://")) { + (substr(App::get_baseurl(), 0, 8) == "https://")) { header("HTTP/1.1 302 Moved Temporarily"); - header("Location: ".$a->get_baseurl()."/".$a->query_string); + header("Location: ".App::get_baseurl()."/".$a->query_string); exit(); } @@ -99,6 +99,10 @@ if (!$a->is_backend()) { $stamp1 = microtime(true); session_start(); $a->save_timestamp($stamp1, "parser"); +} else { + require_once "include/poller.php"; + + call_worker_if_idle(); } /** @@ -146,7 +150,7 @@ if((x($_GET,'zrl')) && (!$install && !$maintenance)) { * */ -// header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";'); +// header('Link: <' . App::get_baseurl() . '/amcd>; rel="acct-mgmt";'); if(x($_COOKIE["Friendica"]) || (x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login')) require("include/auth.php"); @@ -277,7 +281,7 @@ if(strlen($a->module)) { if((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); - goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']); + goaway(App::get_baseurl() . $_SERVER['REQUEST_URI']); } logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);