Move AlreadyFulfilled check to Fave::addNew

This commit is contained in:
Mikael Nordfeldth
2015-03-10 11:50:16 +01:00
parent fa080328cf
commit 8a273eef20
5 changed files with 11 additions and 34 deletions

View File

@@ -62,11 +62,6 @@ class AnonFavorAction extends RedirectingAction
$notice = Notice::getKV($id);
$token = $this->checkSessionToken();
if (Fave::existsForProfile($notice, $profile)) {
// TRANS: Client error.
throw new AlreadyFulfilledException(_m('This notice is already a favorite!'));
}
// Throws exception
$stored = Fave::addNew($profile, $notice);