]> git.mxchange.org Git - friendica.git/blobdiff - include/cron.php
Merge branch 'rewrites/dbm_is_result' of github.com:Quix0r/friendica into rewrites...
[friendica.git] / include / cron.php
index 9807043b155c72b3a70230e410bfe05bf93fabef..d7771c08b8dee6b2cca2a0a50ad1dd9c52c095cf 100644 (file)
@@ -433,7 +433,7 @@ function cron_repair_diaspora(&$a) {
        $r = q("SELECT `id`, `url` FROM `contact`
                WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '')
                        ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA));
-       if ($r) {
+       if (dbm::is_result($r)) {
                foreach ($r AS $contact) {
                        if (poco_reachable($contact["url"])) {
                                $data = probe_url($contact["url"]);
@@ -463,7 +463,7 @@ function cron_repair_database() {
 
        // Update the global contacts for local users
        $r = q("SELECT `uid` FROM `user` WHERE `verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired`");
-       if ($r)
+       if (dbm::is_result($r))
                foreach ($r AS $user)
                        update_gcontact_for_user($user["uid"]);