コード例 #1
0
ファイル: config.php プロジェクト: phpbbgallery/phpbb-gallery
 public static function load($load_default = false)
 {
     global $config;
     foreach ($config as $config_name => $config_value) {
         // Load all config values of the gallery
         if (strpos($config_name, self::$prefix) === 0) {
             $config_name = substr($config_name, strlen(self::$prefix));
             settype($config_value, gettype(self::$default_config[$config_name]));
             self::$config[$config_name] = $config_value;
         }
     }
     if ($load_default) {
         // Should we load the default-config?
         self::$config = self::$config + self::$default_config;
     }
 }