3 class SearchSubTrackCommand extends Command
7 function __construct($user, $keyword)
9 parent::__construct($user);
10 $this->keyword = $keyword;
13 function handle($channel)
16 $searchsub = SearchSub::pkeyGet(array('search' => $this->keyword,
17 'profile_id' => $cur->id));
20 // TRANS: Error text shown a user tries to track a search query they're already subscribed to.
21 $channel->error($cur, sprintf(_m('You are already tracking the search "%s".'), $this->keyword));
26 SearchSub::start($cur->getProfile(), $this->keyword);
27 } catch (Exception $e) {
28 // TRANS: Message given having failed to set up a search subscription by track command.
29 $channel->error($cur, sprintf(_m('Could not start a search subscription for query "%s".'),
34 // TRANS: Message given having added a search subscription by track command.
35 $channel->output($cur, sprintf(_m('You are subscribed to the search "%s".'),