]> git.mxchange.org Git - friendica.git/blobdiff - include/poller.php
"show all n comments" comes back after toggled and ajax updated, plus connector doc...
[friendica.git] / include / poller.php
index 4373dc081262f1b0c3e08e6edc03ff620b561272..dd2efcb76c4c5d2d29bfb30c762e488584bdfc42 100644 (file)
@@ -26,6 +26,8 @@ function poller_run($argv, $argc){
 
        $a->set_baseurl(get_config('system','url'));
 
+       load_hooks();
+
        logger('poller: start');
        
        // run queue delivery process in the background
@@ -61,10 +63,12 @@ function poller_run($argv, $argc){
 
        $sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
 
+       reload_plugins();
+
        $d = datetime_convert();
+
        call_hooks('cron', $d);
 
-       reload_plugins();
 
        $contacts = q("SELECT `id` FROM `contact` 
                WHERE ( `rel` = %d OR `rel` = %d ) AND `poll` != ''
@@ -287,6 +291,11 @@ function poller_run($argv, $argc){
                                $xml = fetch_url($contact['poll']);
                        }
                        elseif($contact['network'] === NETWORK_MAIL) {
+
+                               $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+                               if($mail_disabled)
+                                       continue;
+
                                $mbox = null;
                                $x = q("SELECT `prvkey` FROM `user` WHERE `uid` = %d LIMIT 1",
                                        intval($importer_uid)