]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GroupPrivateMessage/GroupPrivateMessagePlugin.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / GroupPrivateMessage / GroupPrivateMessagePlugin.php
index ee6bd0ebea554a52e9ee304e3f2b8698508bbb1e..0f5c1a88309a35d1f0f02bf8e6b9b5956750ea4b 100644 (file)
@@ -70,11 +70,11 @@ class GroupPrivateMessagePlugin extends Plugin
     /**
      * 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'),
@@ -187,8 +187,11 @@ class GroupPrivateMessagePlugin extends Plugin
         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;
         $group = $action->getGroup();
 
@@ -391,7 +394,7 @@ class GroupPrivateMessagePlugin extends Plugin
         return true;
     }
 
-    function onStartShowExportData(GroupAction $action)
+    function onStartShowExportData(Action $action)
     {
         if ($action instanceof ShowgroupAction) {
             $gps = Group_privacy_settings::forGroup($action->getGroup());