Exemple #1
0
 /**
  * @deprecated 2.4
  */
 static function set_site_mode($mode)
 {
     user_error('Director::set_site_mode() is deprecated as the functionality is no longer neccesary.', E_USER_NOTICE);
     Director::$siteMode = $mode;
     if (isset(self::$callbacks[$mode])) {
         foreach (self::$callbacks[$mode] as $extension) {
             call_user_func($extension);
         }
     }
 }
Exemple #2
0
 /**
  * Sets the site mode (if it is the public site or the cms), and runs registered modules.
  * 
  * @param string $mode 'site' or 'cms' 
  */
 static function set_site_mode($mode)
 {
     Director::$siteMode = $mode;
     if (isset(self::$callbacks[$mode])) {
         foreach (self::$callbacks[$mode] as $extension) {
             call_user_func($extension);
         }
     }
 }