X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fplatal.php;h=90f2df3545770b3a91d43552e7708e87c14c369b;hb=4c603b95edc398a28dd8ea01d756ca14f01f95e5;hp=b911828ff181f27d581f70a906e5be5068e9c64b;hpb=7f6d1063f7543f8e6c0e775dccdeff18626534cc;p=platal.git diff --git a/classes/platal.php b/classes/platal.php index b911828..90f2df3 100644 --- a/classes/platal.php +++ b/classes/platal.php @@ -72,7 +72,7 @@ abstract class PlHook } } if (!$this->checkPerms()) { - if (!Platal::notAllowed()) { + if (Platal::notAllowed()) { return PL_FORBIDDEN; } } @@ -267,7 +267,7 @@ abstract class Platal $this->mods[$module] = $m = PLModule::factory($module); $hooks = $m->handlers(); foreach ($hooks as $path=>$hook) { - $this->hooks->addChild(split('/', $path), $hook); + $this->hooks->addChild(explode('/', $path), $hook); } } @@ -302,7 +302,7 @@ abstract class Platal protected function find_hook() { - $p = split('/', $this->path); + $p = explode('/', $this->path); list($hook, $matched, $remain, $aliased) = $this->hooks->findChild($p); if (empty($hook)) { return null; @@ -318,7 +318,7 @@ abstract class Platal public function near_hook() { - $p = split('/', $this->path); + $p = explode('/', $this->path); list($hook, $matched, $remain, $aliased) = $this->hooks->findNearestChild($p); if (empty($hook)) { return null;