1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 14:13:03 +02:00

Added e_CACHE_URL

This commit is contained in:
CaMer0n
2012-06-08 08:18:03 +00:00
parent 7f79fee435
commit 1d52185bc8
4 changed files with 39 additions and 6 deletions

View File

@@ -870,8 +870,8 @@ class eRouter
*/
protected function _loadConfig()
{
if(!is_readable(e_SYSTEM.'url/config.php')) $config = $this->buildGlobalConfig();
else $config = include(e_SYSTEM.'url/config.php');
if(!is_readable(e_CACHE_URL.'config.php')) $config = $this->buildGlobalConfig();
else $config = include(e_CACHE_URL.'config.php');
if(!$config) $config = array();
@@ -891,7 +891,7 @@ class eRouter
public static function clearCache()
{
@unlink(e_SYSTEM.'url/config.php');
@unlink(e_CACHE_URL.'config.php');
}
/**
@@ -940,7 +940,7 @@ class eRouter
$fileContent = '<?php'."\n### Auto-generated - DO NOT EDIT ### \nreturn ";
$fileContent .= trim(var_export($config, true)).';';
file_put_contents(e_SYSTEM.'url/config.php', $fileContent);
file_put_contents(e_CACHE_URL.'config.php', $fileContent);
}
return $config;
}