]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifavoritecreate.php
move url shortener superclass to lib from plugin
[quix0rs-gnu-social.git] / actions / apifavoritecreate.php
index a80a6492e9414fc7c220572bcbfd2dfc67f35e69..00b6349b0a7a7fce85cd7f4dbed62816209b98ac 100644 (file)
@@ -96,7 +96,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
-                _('API method not found!'),
+                _('API method not found.'),
                 404,
                 $this->format
             );
@@ -116,18 +116,18 @@ class ApiFavoriteCreateAction extends ApiAuthAction
 
         if ($this->user->hasFave($this->notice)) {
             $this->clientError(
-                _('This status is already a favorite!'),
+                _('This status is already a favorite.'),
                 403,
                 $this->format
             );
             return;
         }
 
-        $fave = Fave::addNew($this->user, $this->notice);
+        $fave = Fave::addNew($this->user->getProfile(), $this->notice);
 
         if (empty($fave)) {
             $this->clientError(
-                _('Could not create favorite.')
+                _('Could not create favorite.'),
                 403,
                 $this->format
             );