protected function getActivityForm(ManagedAction $action, $verb, Notice $target, Profile $scoped) { return Fave::existsForProfile($target, $scoped) ? new DisfavorForm($action, $target) : new FavorForm($action, $target); }
function onStartShowFaveForm($item) { if (!common_logged_in() && $this->hasAnonFaving($item)) { $profile = AnonymousFavePlugin::getAnonProfile(); if ($profile instanceof Profile) { if (Fave::existsForProfile($item->notice, $profile)) { $disfavor = new AnonDisFavorForm($item->out, $item->notice); $disfavor->show(); } else { $favor = new AnonFavorForm($item->out, $item->notice); $favor->show(); } } } return true; }