forked from GNUsocial/gnu-social
pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices and their related HTML elements, since we can't have direct calls from core to a plugin. lib/activitymover.php has a function to move a Favorite activity which will not happen now. The move must be pluginified and performed as an event which plugins can catch on to.
This commit is contained in:
@@ -37,7 +37,7 @@ class CommandInterpreter
|
||||
|
||||
$cmd = strtolower($cmd);
|
||||
|
||||
if (Event::handle('StartIntepretCommand', array($cmd, $arg, $user, &$result))) {
|
||||
if (Event::handle('StartInterpretCommand', array($cmd, $arg, $user, &$result))) {
|
||||
switch($cmd) {
|
||||
case 'help':
|
||||
if ($arg) {
|
||||
@@ -231,18 +231,6 @@ class CommandInterpreter
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'fav':
|
||||
if (!$arg) {
|
||||
$result = null;
|
||||
} else {
|
||||
list($other, $extra) = $this->split_arg($arg);
|
||||
if ($extra) {
|
||||
$result = null;
|
||||
} else {
|
||||
$result = new FavCommand($user, $other);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'nudge':
|
||||
if (!$arg) {
|
||||
$result = null;
|
||||
|
Reference in New Issue
Block a user