]> git.mxchange.org Git - friendica.git/blobdiff - include/cron.php
was a bit confusing for me or I was not sleeping to much ...
[friendica.git] / include / cron.php
index 0ae336e33fec9872a1af39298285f93b994998bf..ca9b5dff25e9ade75dc9546ec3b1d86bc83b5daf 100644 (file)
@@ -68,6 +68,8 @@ function cron_run(&$argv, &$argc){
 
                update_contact_birthdays();
 
+               proc_run(PRIORITY_LOW, "include/discover_poco.php", "update_server");
+
                proc_run(PRIORITY_LOW, "include/discover_poco.php", "suggestions");
 
                set_config('system','last_expire_day',$d2);
@@ -118,8 +120,8 @@ function cron_update_photo_albums() {
 function cron_expire_and_remove_users() {
        // expire any expired accounts
        q("UPDATE user SET `account_expired` = 1 where `account_expired` = 0
-               AND `account_expires_on` != '0000-00-00 00:00:00'
-               AND `account_expires_on` < UTC_TIMESTAMP() ");
+               AND `account_expires_on` > '%s'
+               AND `account_expires_on` < UTC_TIMESTAMP()", dbesc(NULL_DATE));
 
        // delete user and contact records for recently removed accounts
        $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
@@ -212,13 +214,15 @@ function cron_poll_contacts($argc, $argv) {
 
                        $xml = false;
 
-                       if($manual_id)
-                               $contact['last-update'] = '0000-00-00 00:00:00';
+                       if ($manual_id) {
+                               $contact['last-update'] = NULL_DATE;
+                       }
 
-                       if(in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS)))
+                       if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
                                $contact['priority'] = 2;
+                       }
 
-                       if($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
+                       if ($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
                                // We should be getting everything via a hub. But just to be sure, let's check once a day.
                                // (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
                                // This also lets us update our subscription to the hub, and add or replace hubs in case it