]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing
authorBrion Vibber <brion@pobox.com>
Tue, 23 Mar 2010 19:13:32 +0000 (12:13 -0700)
committerBrion Vibber <brion@pobox.com>
Tue, 23 Mar 2010 19:13:32 +0000 (12:13 -0700)
actions/apifavoritecreate.php
classes/Conversation.php
classes/Fave.php
lib/command.php
lib/util.php

index 3618f940183d08f3303fe519d95d86ca312674b4..00b6349b0a7a7fce85cd7f4dbed62816209b98ac 100644 (file)
@@ -123,7 +123,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
             return;
         }
 
-        $fave = Fave::addNew($this->user, $this->notice);
+        $fave = Fave::addNew($this->user->getProfile(), $this->notice);
 
         if (empty($fave)) {
             $this->clientError(
index ea8bd87b5636907893101255dccc67dac81942d4..f540004ef39b6f9de2c7299ad80fbcd492626aff 100755 (executable)
@@ -63,7 +63,8 @@ class Conversation extends Memcached_DataObject
         }
 
         $orig = clone($conv);
-        $orig->uri = common_local_url('conversation', array('id' => $id));
+        $orig->uri = common_local_url('conversation', array('id' => $id),
+                                      null, null, false);
         $result = $orig->update($conv);
 
         if (empty($result)) {
index a04f15e9c4e63cb1ddc0a0dc606eaa00dc355ccc..7ca9ade7f04b846c53982c8507fce5293436d793 100644 (file)
@@ -21,7 +21,15 @@ class Fave extends Memcached_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
-    static function addNew($profile, $notice) {
+    /**
+     * Save a favorite record.
+     * @fixme post-author notification should be moved here
+     *
+     * @param Profile $profile the local or remote user who likes
+     * @param Notice $notice the notice that is liked
+     * @return mixed false on failure, or Fave record on success
+     */
+    static function addNew(Profile $profile, Notice $notice) {
 
         $fave = null;
 
index f7421269d0aad3c4bc4771fe2b32e85d458c609e..216f9e649a33af4660bdc4fcaa2965571d0b1d0c 100644 (file)
@@ -273,7 +273,7 @@ class FavCommand extends Command
     function handle($channel)
     {
         $notice = $this->getNotice($this->other);
-        $fave = Fave::addNew($this->user, $notice);
+        $fave = Fave::addNew($this->user->getProfile(), $notice);
 
         if (!$fave) {
             $channel->error($this->user, _('Could not create favorite.'));
index a30d69100289f08a94ba8e850bbcb1ed6f127e2e..795997868305ff09b2ada3614cf7a9a8d1089cf3 100644 (file)
@@ -1529,7 +1529,8 @@ function common_user_uri(&$user)
 function common_notice_uri(&$notice)
 {
     return common_local_url('shownotice',
-                            array('notice' => $notice->id));
+                            array('notice' => $notice->id),
+                            null, null, false);
 }
 
 // 36 alphanums - lookalikes (0, O, 1, I) = 32 chars = 5 bits