Fixes lists in miniwiki.
[platal.git] / classes / plglobals.php
index c830bad..fd11a25 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 /** Debug levels:
- * DEBUG_BT     = show the backtraces (SQL/XMLRPC/...)
- * DEBUG_VALID  = run html validation
- * DEBUG_SMARTY = don't hide smarty errors/warnings/notices
+ * DEBUG_BT      = show the backtraces (SQL/XMLRPC/...)
+ * DEBUG_VALID   = run html validation
+ * DEBUG_SMARTY  = don't hide smarty errors/warnings/notices
+ * DEBUG_NOCACHE = disable cache
+ * DEBUG_SCRIPTCACHE = cache expires after the execution of the script
  */
-define('DEBUG_BT', 1);
-define('DEBUG_VALID', 2);
-define('DEBUG_SMARTY', 4);
+define('DEBUG_BT',          1);
+define('DEBUG_VALID',       2);
+define('DEBUG_SMARTY',      4);
+define('DEBUG_NOCACHE',     8);
+define('DEBUG_SCRIPTCACHE', 16);
 
 /* First allowed value for user-defined DEBUG_* flags.
  * Set to 256 to keep rooms for future core flags (5 flags available).
@@ -131,6 +135,7 @@ class PlGlobals
             $this->baseurl      = @trim($base    .$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
             $this->baseurl_http = @trim('http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
         }
+        assert_options(ASSERT_ACTIVE, $this->debug != 0);
 
         $this->setLocale();
     }