Minor fixes:
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 2 Nov 2008 16:19:13 +0000 (17:19 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 2 Nov 2008 16:21:04 +0000 (17:21 +0100)
 * Support for empty module list (gnii?)
 * Support for smarty path != smarty/libs/Smarty.class.php (this is debian  specific)

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/platal.php
classes/plpage.php

index 94d9632..a8b5459 100644 (file)
@@ -50,7 +50,7 @@ abstract class Platal
         }
 
         $modules    = func_get_args();
-        if (is_array($modules[0])) {
+        if (isset($modules[0]) && is_array($modules[0])) {
             $modules = $modules[0];
         }
         $this->path = trim(Get::_get('n', null), '/');
index 015038b..94ea220 100644 (file)
@@ -19,7 +19,9 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once 'smarty/libs/Smarty.class.php';
+if (!@include_once 'smarty/libs/Smarty.class.php') {
+    require_once 'smarty/Smarty.class.php';
+}
 
 abstract class PlPage extends Smarty
 {