]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Favorite/lib/favcommand.php
Fake recovery by email address, to hide registrants on the site
[quix0rs-gnu-social.git] / plugins / Favorite / lib / favcommand.php
index d89b7f34217a4a576646a08af68e3af739452c28..6c7d0d1946ae1c09c4418ebcabc228937ad1f268 100644 (file)
@@ -14,17 +14,6 @@ class FavCommand extends Command
     { 
         $notice = $this->getNotice($this->other); 
  
-        $fave            = new Fave(); 
-        $fave->user_id   = $this->user->id; 
-        $fave->notice_id = $notice->id; 
-        $fave->find(); 
-        if ($fave->fetch()) { 
-            // TRANS: Error message text shown when a favorite could not be set because it has already been favorited. 
-            $channel->error($this->user, _('Could not create favorite: Already favorited.')); 
-            return; 
-        } 
         try {
             $fave = Fave::addNew($this->user->getProfile(), $notice); 
         } catch (Exception $e) {
@@ -32,19 +21,6 @@ class FavCommand extends Command
             return;
         }
  
-        // @fixme favorite notification should be triggered 
-        // at a lower level 
-        $other = User::getKV('id', $notice->profile_id); 
-        if ($other && $other->id != $this->user->id && !empty($other->email)) { 
-            require_once INSTALLDIR.'/lib/mail.php';
-
-            mail_notify_fave($other, $this->user->getProfile(), $notice);
-        } 
-        Fave::blowCacheForProfileId($this->user->id);
         // TRANS: Text shown when a notice has been marked as favourite successfully. 
         $channel->output($this->user, _('Notice marked as fave.')); 
     }