/**
* Map URLs to actions
*
- * @param Net_URL_Mapper $m path-to-action mapper
+ * @param URLMapper $m path-to-action mapper
*
* @return boolean hook value
*/
- function onRouterInitialized($m)
+ public function onRouterInitialized(URLMapper $m)
{
$m->connect('group/:nickname/inbox',
array('action' => 'groupinbox'),
function onEndGroupSaveForm(Action $action)
{
// The Action class must contain this method
- assert(is_callable(array($action 'getGroup')));
+ assert(is_callable(array($action, 'getGroup')));
$gps = null;
- if (!empty($action->getGroup())) {
+ if ($action->getGroup() instanceof User_group) {
$gps = Group_privacy_settings::getKV('group_id', $action->getGroup()->id);
}
return true;
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'GroupPrivateMessage',
'version' => GNUSOCIAL_VERSION,
'author' => 'Evan Prodromou',
- 'homepage' => 'http://status.net/wiki/Plugin:GroupPrivateMessage',
+ 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/GroupPrivateMessage',
'rawdescription' =>
// TRANS: Plugin description.
_m('Allow posting private messages to groups.'));