Makes the $limit argument optional.
[platal.git] / classes / plmodule.php
index ec1e5f0..42cd62b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -66,7 +66,7 @@ abstract class PLModule
 
     /* static functions */
 
-    public static function factory($modname)
+    public static function path($modname)
     {
         global $globals;
         if ($modname == 'core') {
@@ -74,6 +74,12 @@ abstract class PLModule
         } else {
             $mod_path = $globals->spoolroot . '/modules/' . $modname;
         }
+        return $mod_path;
+    }
+
+    public static function factory($modname)
+    {
+        $mod_path = self::path($modname);
         $class    = ucfirst($modname) . 'Module';
 
         require_once $mod_path . '.php';