]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/unsubscribe.php
Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / actions / unsubscribe.php
index bedea9f285e63b8971d32e8673dd212958768866..57ca15d687442b8cbff85de3c02dd1c7aaac353f 100644 (file)
@@ -28,7 +28,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -74,20 +74,20 @@ class UnsubscribeAction extends Action
         $other_id = $this->arg('unsubscribeto');
 
         if (!$other_id) {
-            $this->clientError(_('No profile id in request.'));
+            $this->clientError(_('No profile ID in request.'));
             return;
         }
 
         $other = Profile::staticGet('id', $other_id);
 
         if (!$other) {
-            $this->clientError(_('No profile with that id.'));
+            $this->clientError(_('No profile with that ID.'));
             return;
         }
 
         $result = subs_unsubscribe_to($user, $other);
 
-        if ($result != true) {
+        if (is_string($result)) {
             $this->clientError($result);
             return;
         }