X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fonepoll.php;h=5227b61a1ab118a3066247d631b7b8677776c584;hb=f639a86d02e378d591eee973dc79b32a6496d92b;hp=bfb904fb60ed2c8859485029e6537203c252b125;hpb=1624150db4d0f511d7d119eb645e997bd3f76129;p=friendica.git diff --git a/include/onepoll.php b/include/onepoll.php index bfb904fb60..5227b61a1a 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -2,8 +2,7 @@ use \Friendica\Core\Config; -require_once("boot.php"); -require_once("include/follow.php"); +require_once('include/follow.php'); function RemoveReply($subject) { while (in_array(strtolower(substr($subject, 0, 3)), array("re:", "aw:"))) @@ -13,20 +12,8 @@ function RemoveReply($subject) { } function onepoll_run(&$argv, &$argc){ - global $a, $db; + global $a; - if (is_null($a)) { - $a = new App; - } - - if (is_null($db)) { - @include(".htconfig.php"); - require_once("include/dba.php"); - $db = new dba($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); - }; - - require_once('include/session.php'); require_once('include/datetime.php'); require_once('include/items.php'); require_once('include/Contact.php'); @@ -34,12 +21,6 @@ function onepoll_run(&$argv, &$argc){ require_once('include/socgraph.php'); require_once('include/queue_fn.php'); - Config::load(); - - $a->set_baseurl(get_config('system','url')); - - load_hooks(); - logger('onepoll: start'); $manual_id = 0; @@ -61,13 +42,6 @@ function onepoll_run(&$argv, &$argc){ return; } - // Don't check this stuff if the function is called by the poller - if (App::callstack() != "poller_run") { - if (App::is_already_running('onepoll'.$contact_id, '', 540)) { - return; - } - } - $d = datetime_convert(); // Only poll from those with suitable relationships, @@ -697,8 +671,3 @@ function onepoll_run(&$argv, &$argc){ return; } - -if (array_search(__file__,get_included_files())===0) { - onepoll_run($_SERVER["argv"],$_SERVER["argc"]); - killme(); -}