]> git.mxchange.org Git - friendica.git/blobdiff - include/cronjobs.php
OStatus: Auto subscribe to forum accounts
[friendica.git] / include / cronjobs.php
index f367df7b14a67be7e0f4bdf6fa8b9ea3f5c3d4e2..437fedd53c2243da5d68521d36c1a02fe979f9b5 100644 (file)
@@ -8,7 +8,6 @@ function cronjobs_run(&$argv, &$argc){
        global $a;
 
        require_once 'include/datetime.php';
-       require_once 'include/ostatus.php';
        require_once 'include/post_update.php';
        require_once 'mod/nodeinfo.php';
        require_once 'include/photos.php';
@@ -22,19 +21,6 @@ function cronjobs_run(&$argv, &$argc){
 
        logger("Starting cronjob ".$argv[1], LOGGER_DEBUG);
 
-       // Check OStatus conversations
-       // Check only conversations with mentions (for a longer time)
-       if ($argv[1] == 'ostatus_mentions') {
-               ostatus::check_conversations(true);
-               return;
-       }
-
-       // Check every conversation
-       if ($argv[1] == 'ostatus_conversations') {
-               ostatus::check_conversations(false);
-               return;
-       }
-
        // Call possible post update functions
        // see include/post_update.php for more details
        if ($argv[1] == 'post_update') {
@@ -110,12 +96,11 @@ function cron_expire_and_remove_users() {
                AND `account_expires_on` > '%s'
                AND `account_expires_on` < UTC_TIMESTAMP()", dbesc(NULL_DATE));
 
-       // delete user and contact records for recently removed accounts
+       // delete user records for recently removed accounts
        $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
        if (dbm::is_result($r)) {
                foreach ($r as $user) {
-                       q("DELETE FROM `contact` WHERE `uid` = %d", intval($user['uid']));
-                       q("DELETE FROM `user` WHERE `uid` = %d", intval($user['uid']));
+                       dba::delete('user', array('uid' => $user['uid']));
                }
        }
 }