We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit db704b5d authored by Roland Haeder's avatar Roland Haeder Committed by mattl

Fixed type-hints + added assert + method getGroup().

Signed-off-by: default avatarRoland Haeder <roland@mxchange.org>
parent 419c2cd5
...@@ -46,6 +46,12 @@ if (!defined('STATUSNET')) { ...@@ -46,6 +46,12 @@ if (!defined('STATUSNET')) {
*/ */
class NewgroupAction extends FormAction class NewgroupAction extends FormAction
{ {
protected $group;
function getGroup() {
return $this->group;
}
function title() function title()
{ {
// TRANS: Title for form to create a group. // TRANS: Title for form to create a group.
......
...@@ -187,8 +187,11 @@ class GroupPrivateMessagePlugin extends Plugin ...@@ -187,8 +187,11 @@ class GroupPrivateMessagePlugin extends Plugin
return true; return true;
} }
function onEndGroupSaveForm(GroupAction $action) function onEndGroupSaveForm(Action $action)
{ {
// The Action class must contain this method
assert(is_callable(array($action 'getGroup')));
$gps = null; $gps = null;
if (!empty($action->getGroup())) { if (!empty($action->getGroup())) {
...@@ -390,7 +393,7 @@ class GroupPrivateMessagePlugin extends Plugin ...@@ -390,7 +393,7 @@ class GroupPrivateMessagePlugin extends Plugin
return true; return true;
} }
function onStartShowExportData(GroupAction $action) function onStartShowExportData(Action $action)
{ {
if ($action instanceof ShowgroupAction) { if ($action instanceof ShowgroupAction) {
$gps = Group_privacy_settings::forGroup($action->getGroup()); $gps = Group_privacy_settings::forGroup($action->getGroup());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment