X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fplmodule.php;h=55de69f15af7c817105a20594d4bd208608ebcda;hb=f23d33e1b114e9032b4b966baebdeb14b4215313;hp=1dbdaff840e64f654af38a08e93440914e8c6221;hpb=2ab75571bf840471fa9559292b75852bfce004d3;p=platal.git diff --git a/classes/plmodule.php b/classes/plmodule.php index 1dbdaff..55de69f 100644 --- a/classes/plmodule.php +++ b/classes/plmodule.php @@ -50,10 +50,15 @@ abstract class PLModule */ public function make_hook($fun, $auth, $perms = 'user', $type = DO_AUTH) { - return array('hook' => array($this, 'handler_'.$fun), - 'auth' => $auth, - 'perms' => $perms, - 'type' => $type); + return new PlStdHook(array($this, 'handler_' . $fun), + $auth, $perms, $type); + } + + /** Register a hook that points to a wiki page. + */ + public function make_wiki_hook($auth = AUTH_PUBLIC, $perms = 'user', $type = DO_AUTH) + { + return new PlWikiHook($auth, $perms, $type); } /** Include a 'module-specific' file.