Fix SUID.
[platal.git] / classes / platal.php
index b911828..90f2df3 100644 (file)
@@ -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;