From a5a9c6e0474067a70269c9d5d5d0e19238b4adb9 Mon Sep 17 00:00:00 2001 From: brol Date: Mon, 30 Dec 2013 14:47:09 +0100 Subject: [PATCH] modif pour require --- _admin.php | 2 +- _define.php | 4 +--- _public.php | 2 +- _widgets.php | 3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/_admin.php b/_admin.php index 7b77c88..a75abae 100644 --- a/_admin.php +++ b/_admin.php @@ -13,4 +13,4 @@ if (!defined('DC_CONTEXT_ADMIN')) { return; } -require_once '_widgets.php'; +require_once __DIR__.'/_widgets.php'; diff --git a/_define.php b/_define.php index d29d128..14d0edd 100644 --- a/_define.php +++ b/_define.php @@ -12,13 +12,11 @@ if (!defined('DC_RC_PATH')) { return; } - -require_once 'ConstCategoriesPage.php'; $this->registerModule( /* Name */ 'Categories Page', /* Description*/ 'Add a category list page / Ajoute une page listant les catégories', /* Author */ 'Pierre Van Glabeke, Bernard Le Roux', - /* Version */ ConstCategoriesPage::VERSION, + /* Version */ '0.1', /* Properties */ array( 'permissions' => 'admin', diff --git a/_public.php b/_public.php index 8610ab4..ecfab79 100644 --- a/_public.php +++ b/_public.php @@ -20,7 +20,7 @@ class publicCategoriesPage { public static function main() { $core = $GLOBALS['core']; - require_once '_widgets.php'; + require_once __DIR__.'/_widgets.php'; // Adds news Categories' templates tags : $tpl = $core->tpl; diff --git a/_widgets.php b/_widgets.php index 70a78f8..c548db1 100644 --- a/_widgets.php +++ b/_widgets.php @@ -21,7 +21,8 @@ class widgetsCategoriesPage { * initialisation du context widget */ public static function main() { - require_once 'ConstCategoriesPage.php'; + require_once __DIR__.'/ConstCategoriesPage.php'; + $core = $GLOBALS['core']; $core->addBehavior('initWidgets', array('widgetsCategoriesPage', 'initWidgets'));