From e77c7ea286d56d039d280104880f3e7433fc02a2 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Thu, 13 Jul 2006 21:26:49 +0000 Subject: [PATCH] switch to an explicit list of modules. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@465 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/Platal.php | 4 ++-- htdocs/index.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/Platal.php b/classes/Platal.php index 68c7f81..858c8ac 100644 --- a/classes/Platal.php +++ b/classes/Platal.php @@ -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(); diff --git a/htdocs/index.php b/htdocs/index.php index 39ad26a..fba867c 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -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(); ?> -- 2.1.4