]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
OStatus: fix for low-level remote subscribe
authorBrion Vibber <brion@pobox.com>
Tue, 16 Feb 2010 20:11:48 +0000 (20:11 +0000)
committerBrion Vibber <brion@pobox.com>
Tue, 16 Feb 2010 20:11:48 +0000 (20:11 +0000)
plugins/OStatus/classes/Ostatus_profile.php

index b750e188396345d94579e52c1698e47a961cc1c8..9b6ef2f1635da2e958253472b833c1d25882d2a3 100644 (file)
@@ -225,7 +225,7 @@ class Ostatus_profile extends Memcached_DataObject
         try {
             $local = $munger->profile();
 
-            if ($entity->isGroup()) {
+            if ($profile->isGroup()) {
                 $group = new User_group();
                 $group->nickname = $local->nickname . '@remote'; // @fixme
                 $group->fullname = $local->fullname;
@@ -245,17 +245,17 @@ class Ostatus_profile extends Memcached_DataObject
                 $profile->profile_id = $local->id;
             }
 
-            $profile->created = sql_common_date();
-            $profile->lastupdate = sql_common_date();
+            $profile->created = common_sql_now();
+            $profile->lastupdate = common_sql_now();
             $result = $profile->insert();
             if (empty($result)) {
                 throw new FeedDBException($profile);
             }
 
-            $entity->query('COMMIT');
+            $profile->query('COMMIT');
         } catch (FeedDBException $e) {
             common_log_db_error($e->obj, 'INSERT', __FILE__);
-            $entity->query('ROLLBACK');
+            $profile->query('ROLLBACK');
             return false;
         }
 
@@ -269,7 +269,7 @@ class Ostatus_profile extends Memcached_DataObject
             }
         }
 
-        return $entity;
+        return $profile;
     }
 
     /**