X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fplglobals.php;h=fd11a25994af337face179bebe498fc8dee73c35;hb=c80c472d71d62a56289b6d0c29a00be9cdcd4389;hp=0fe88f17929d96651714a7eaee7ce5d00f4c1734;hpb=0d40ddec57550773766a877a250d60dd8dd3052a;p=platal.git diff --git a/classes/plglobals.php b/classes/plglobals.php index 0fe88f1..fd11a25 100644 --- a/classes/plglobals.php +++ b/classes/plglobals.php @@ -1,6 +1,6 @@ read/only // '' => site down - /** Catch-all mode for mails - * If set to 1, all emails are sent to admin_email (defined in [Core]) - * instead of their actual destination (but apparent from and to aren't - * modified) + /** Catch-all mode for emails. + * If set to a valid email address, all emails from plat/al are sent to + * that email address, instead of their normal destination (From:, To:, + * and CC: headers are not actually modified). + * Note: only valid if restricted_platal is set to true. */ - public $catchmail = false; + public $email_catchall = false; /** Tell smarty to check the timestamps of the templates to decide * whether recompile the template or not. If this option is false and @@ -105,6 +115,13 @@ class PlGlobals public $cookie_ns = 'ORG'; public $cookie_path = '/'; + /** Cache duration for static and dynamic cacheable content generated by + * plat/al. Defaults to a week for static content, and an hour for dynamic + * content. + */ + public $static_cache_duration = 604800; + public $dynamic_cache_duration = 3600; + /** You must give a list of file to load. * The filenames given are relatives to the config path of your plat/al installation. */ @@ -118,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(); } @@ -184,10 +202,10 @@ class PlGlobals /** Change dynamic config file * @param conf array of keys and values to add or replace * @param category name of category to change - * + * * Opens the dynamic conf file and set values from conf in specified * category. Updates config vars too. - */ + */ public function changeDynamicConfig($conf, $category = 'Core') { $dynamicfile = $this->spoolroot.'/spool/conf/platal.dynamic.conf'; @@ -230,7 +248,7 @@ class PlGlobals if (isset($conflower[strtolower($k)])) { $array[$same][$k] = $v; } - } + } } } // writes the file over