]> git.mxchange.org Git - friendica.git/blobdiff - include/onepoll.php
See issue 1491: We need to generate a new guid to make Diaspora work
[friendica.git] / include / onepoll.php
index 73668126a1b7c0a92ece2fd7a499381b7a3b5d6d..90d018524d13aae89bf653dc3cdfb81b9a3f04f2 100644 (file)
@@ -19,10 +19,10 @@ function onepoll_run(&$argv, &$argc){
 
        if(is_null($db)) {
            @include(".htconfig.php");
-       require_once("include/dba.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);
-       };
+       unset($db_host, $db_user, $db_pass, $db_data);
+       };
 
 
        require_once('include/session.php');
@@ -110,7 +110,7 @@ function onepoll_run(&$argv, &$argc){
        // - Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
        // - Check whether this is possible with Redmatrix
        if ($contact["network"] == NETWORK_DIASPORA) {
-               if (poco_do_update($contact["last-item"], $contact["success_update"], $contact["failure_update"])) {
+               if (poco_do_update($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
                        $last_updated = poco_last_updated($contact["url"]);
                        $updated = datetime_convert();
                        if ($last_updated) {
@@ -120,23 +120,12 @@ function onepoll_run(&$argv, &$argc){
                                        dbesc($updated),
                                        intval($contact['id'])
                                );
-
-                               q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'",
-                                       dbesc($last_updated),
-                                       dbesc($updated),
-                                       dbesc($contact['nurl'])
-                               );
                        } else {
                                q("UPDATE `contact` SET `last-update` = '%s', `failure_update` = '%s' WHERE `id` = %d",
                                        dbesc($updated),
                                        dbesc($updated),
                                        intval($contact['id'])
                                );
-
-                               q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'",
-                                       dbesc($updated),
-                                       dbesc($contact['nurl'])
-                               );
                        }
                }
                return;