]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Subscription.php
Merge branch 'master' into 1.0.x
[quix0rs-gnu-social.git] / classes / Subscription.php
index 438f1dfe50f879d1766f4ed055ea8f7a700f9711..e83621eb86ba3bac099f61504c62bc2905276a9c 100644 (file)
@@ -198,29 +198,6 @@ class Subscription extends Memcached_DataObject
 
             assert(!empty($sub));
 
-            // @todo: move this block to EndSubscribe handler for
-            // OMB plugin when it exists.
-
-            if (!empty($sub->token)) {
-
-                $token = new Token();
-
-                $token->tok    = $sub->token;
-
-                if ($token->find(true)) {
-
-                    $result = $token->delete();
-
-                    if (!$result) {
-                        common_log_db_error($token, 'DELETE', __FILE__);
-                        // TRANS: Exception thrown when the OMB token for a subscription could not deleted on the server.
-                        throw new Exception(_('Could not delete subscription OMB token.'));
-                    }
-                } else {
-                    common_log(LOG_ERR, "Couldn't find credentials with token {$token->tok}");
-                }
-            }
-
             $result = $sub->delete();
 
             if (!$result) {
@@ -267,8 +244,8 @@ class Subscription extends Memcached_DataObject
                                   common_date_iso8601($this->created));
 
         $act->time    = strtotime($this->created);
-        // TRANS: Activity tile when subscribing to another person.
-        $act->title   = _("Follow");
+        // TRANS: Activity title when subscribing to another person.
+        $act->title = _m('TITLE','Follow');
         // TRANS: Notification given when one person starts following another.
         // TRANS: %1$s is the subscriber, %2$s is the subscribed.
         $act->content = sprintf(_('%1$s is now following %2$s.'),
@@ -301,7 +278,6 @@ class Subscription extends Memcached_DataObject
      *
      * @return Subscription stream of subscriptions; use fetch() to iterate
      */
-
     static function bySubscriber($subscriberId,
                                  $offset = 0,
                                  $limit = PROFILES_PER_PAGE)
@@ -362,7 +338,6 @@ class Subscription extends Memcached_DataObject
      *
      * @return Subscription stream of subscriptions; use fetch() to iterate
      */
-
     static function bySubscribed($subscribedId,
                                  $offset = 0,
                                  $limit = PROFILES_PER_PAGE)
@@ -420,7 +395,6 @@ class Subscription extends Memcached_DataObject
      *
      * @return boolean success flag.
      */
-
     function update($orig=null)
     {
         $result = parent::update($orig);