switch to an explicit list of modules.
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 13 Jul 2006 21:26:49 +0000 (21:26 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 13 Jul 2006 21:26:49 +0000 (21:26 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@465 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/Platal.php
htdocs/index.php

index 68c7f81..858c8ac 100644 (file)
@@ -34,13 +34,13 @@ class Platal
 
     function Platal()
     {
+        $modules    = func_get_args();
         $this->path = trim(Get::_get('p', null), '/');
 
         $this->__mods  = array();
         $this->__hooks = array();
 
-        foreach (glob(dirname(__FILE__).'/../modules/*.php') as $module) {
-            $module = basename($module, '.php');
+        foreach ($modules as $module) {
             $m =& PLModule::factory($this, $module);
             $this->__mods[$module] =& $m;
             $this->__hooks += $m->handlers();
index 39ad26a..fba867c 100644 (file)
@@ -24,7 +24,9 @@ require_once 'xorg.inc.php';
 require_once dirname(__FILE__).'/../classes/Platal.php';
 require_once dirname(__FILE__).'/../classes/PLModule.php';
 
-$platal = new Platal();
+$platal = new Platal('auth', 'banana', 'carnet', 'core', 'email', 'events',
+                     'geoloc', 'marketing', 'payment', 'platal', 'profile',
+                     'register', 'search', 'stats', 'trezo');
 $platal->run();
 
 ?>