X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommand.php;h=4b7f1c4f7e283beabd020ca5434d9a9885d792c9;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=efbcf91bfe881f8c50bcc62116d32218164024c0;hpb=f2bfcdc2c1d7bc4634bb06285380884a57075759;p=quix0rs-gnu-social.git diff --git a/lib/command.php b/lib/command.php index efbcf91bfe..4b7f1c4f7e 100644 --- a/lib/command.php +++ b/lib/command.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('GNUSOCIAL')) { exit(1); } require_once(INSTALLDIR.'/lib/channel.php'); @@ -523,32 +523,6 @@ class WhoisCommand extends Command } } -class RepeatCommand extends Command -{ - var $other = null; - function __construct($user, $other) - { - parent::__construct($user); - $this->other = $other; - } - - function handle($channel) - { - $notice = $this->getNotice($this->other); - - try { - $repeat = $notice->repeat($this->scoped->id, $channel->source()); - $recipient = $notice->getProfile(); - - // TRANS: Message given having repeated a notice from another user. - // TRANS: %s is the name of the user for which the notice was repeated. - $channel->output($this->user, sprintf(_('Notice from %s repeated.'), $recipient->nickname)); - } catch (Exception $e) { - $channel->error($this->user, $e->getMessage()); - } - } -} - class ReplyCommand extends Command { var $other = null; @@ -821,7 +795,7 @@ class SubscriptionsCommand extends Command $out .= ' '; $out .= implode(', ',$nicknames); } - $channel->output($this->user,$out); + $channel->output($this->user, $out); } } @@ -848,7 +822,7 @@ class SubscribersCommand extends Command $out .= ' '; $out .= implode(', ',$nicknames); } - $channel->output($this->user,$out); + $channel->output($this->user, $out); } } @@ -874,7 +848,7 @@ class GroupsCommand extends Command count($nicknames)); $out.=implode(', ',$groups); } - $channel->output($this->user,$out); + $channel->output($this->user, $out); } } @@ -912,10 +886,6 @@ class HelpCommand extends Command "whois " => _m('COMMANDHELP', "get profile info on user"), // TRANS: Help message for IM/SMS command "lose ". "lose " => _m('COMMANDHELP', "force user to stop following you"), - // TRANS: Help message for IM/SMS command "repeat #". - "repeat #" => _m('COMMANDHELP', "repeat a notice with a given id"), - // TRANS: Help message for IM/SMS command "repeat ". - "repeat " => _m('COMMANDHELP', "repeat the last notice from user"), // TRANS: Help message for IM/SMS command "reply #". "reply #" => _m('COMMANDHELP', "reply to notice with a given id"), // TRANS: Help message for IM/SMS command "reply ". @@ -962,7 +932,7 @@ class HelpCommand extends Command // Give plugins a chance to add or override... Event::handle('HelpCommandMessages', array($this, &$commands)); - sort($commands); + ksort($commands); foreach ($commands as $command => $help) { $out[] = "$command - $help"; }