$page is not anymore a global variable.
[platal.git] / classes / plmodule.php
index 4cd113c..06e5da8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -35,7 +35,8 @@ abstract class PLModule
      * right is an atomic right permission (like 'admin', 'user', 'groupadmin', 'groupmember'...)
      *
      * If type is set to NO_AUTH, the system will return 403 instead of asking auth data
-     * this is useful for Ajax handlers
+     * this is useful for Ajax handler
+     * If type is not set to NO_SKIN, the system will consider redirecting the user to https
      */
     public function make_hook($fun, $auth, $perms = 'user', $type = DO_AUTH)
     {
@@ -49,8 +50,8 @@ abstract class PLModule
 
     public static function factory($modname)
     {
-        $mod_path = dirname(__FILE__).'/../modules/'.strtolower($modname).'.php';
-        $class    = ucfirst($modname).'Module';
+        $mod_path = dirname(__FILE__) . '/../modules/' . $modname . '.php';
+        $class    = ucfirst($modname) . 'Module';
 
         require_once $mod_path;
         return new $class();