diff options
author | xue <> | 2007-08-06 18:58:55 +0000 |
---|---|---|
committer | xue <> | 2007-08-06 18:58:55 +0000 |
commit | edfdfdd1cbf6d597551d4128e7e11d6d92bcdf95 (patch) | |
tree | 9a39721593e768419fb58c8b21e88ff4748bb0ae /framework/Web/UI | |
parent | 1031b56f982f973f85cb3e1528f7bcbba662778f (diff) |
fixed #685
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 8 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TThemeManager.php | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index cd8826dc..e28f108f 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -117,7 +117,7 @@ class TClientScriptManager extends TApplicationComponent { if(is_null(self::$_pradoScripts)) { - $packageFile = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH.'/packages.php'; + $packageFile = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH.'/packages.php'; list($packages,$deps)= include($packageFile); self::$_pradoScripts = $deps; } @@ -134,7 +134,7 @@ class TClientScriptManager extends TApplicationComponent */ public function getPradoScriptAssetUrl() { - $base = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + $base = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH; $assets = Prado::getApplication()->getAssetManager(); return $assets->getPublishedUrl($base); } @@ -148,7 +148,7 @@ class TClientScriptManager extends TApplicationComponent $files=array_keys($this->_registeredPradoScripts); if(count($files) > 0) { - $base = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; + $base = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH; $url = $this->registerJavascriptPackages($base, $files); $writer->write(TJavaScript::renderScriptFile($url)); } @@ -168,7 +168,7 @@ class TClientScriptManager extends TApplicationComponent { list($path,$url) = $this->getPackagePathUrl($base); $scriptLoaderPath = $path.'/'.basename(self::SCRIPT_LOADER); - $scriptLoaderSrc = Prado::getFrameworkPath().'/'.self::SCRIPT_LOADER; + $scriptLoaderSrc = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_LOADER; if(!is_file($scriptLoaderPath)) copy($scriptLoaderSrc, $scriptLoaderPath); $url .= '/'.basename(self::SCRIPT_LOADER).'?js='.implode(',', $packages); diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 6fe56f4d..34d66b47 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -485,7 +485,7 @@ class TTemplate extends TApplicationComponent implements ITemplate break;
case self::CONFIG_ASSET: // asset URL
$setter='set'.$name;
- $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]);
+ $url=$this->publishFilePath($this->_contextPath.DIRECTORY_SEPARATOR.$value[1]);
$component->$setter($url);
break;
case self::CONFIG_PARAMETER: // application parameter
@@ -533,7 +533,7 @@ class TTemplate extends TApplicationComponent implements ITemplate $component->setSubProperty($name,$value[1]);
break;
case self::CONFIG_ASSET: // asset URL
- $url=$this->publishFilePath($this->_contextPath.'/'.$value[1]);
+ $url=$this->publishFilePath($this->_contextPath.DIRECTORY_SEPARATOR.$value[1]);
$component->setSubProperty($name,$url);
break;
case self::CONFIG_PARAMETER: // application parameter
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index a7651a3e..16021029 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -78,7 +78,7 @@ class TThemeManager extends TModule */
public function getTheme($name)
{
- $themePath=$this->getBasePath().'/'.$name;
+ $themePath=$this->getBasePath().DIRECTORY_SEPARATOR.$name;
$themeUrl=rtrim($this->getBaseUrl(),'/').'/'.$name;
return new TTheme($themePath,$themeUrl);
@@ -94,7 +94,7 @@ class TThemeManager extends TModule $folder=@opendir($basePath);
while($file=@readdir($folder))
{
- if($file!=='.' && $file!=='..' && $file!=='.svn' && is_dir($basePath.'/'.$file))
+ if($file!=='.' && $file!=='..' && $file!=='.svn' && is_dir($basePath.DIRECTORY_SEPARATOR.$file))
$themes[]=$file;
}
closedir($folder);
@@ -109,7 +109,7 @@ class TThemeManager extends TModule {
if($this->_basePath===null)
{
- $this->_basePath=dirname($this->getRequest()->getApplicationFilePath()).'/'.self::DEFAULT_BASEPATH;
+ $this->_basePath=dirname($this->getRequest()->getApplicationFilePath()).DIRECTORY_SEPARATOR.self::DEFAULT_BASEPATH;
if(($basePath=realpath($this->_basePath))===false || !is_dir($basePath))
throw new TConfigurationException('thememanager_basepath_invalid2',$this->_basePath);
$this->_basePath=$basePath;
@@ -253,7 +253,7 @@ class TTheme extends TApplicationComponent implements ITheme $this->_cssFiles[]=$themeUrl.'/'.$file;
else if(basename($file,'.js')!==$file)
$this->_jsFiles[]=$themeUrl.'/'.$file;
- else if(basename($file,self::SKIN_FILE_EXT)!==$file && filemtime($themePath.'/'.$file)>$timestamp)
+ else if(basename($file,self::SKIN_FILE_EXT)!==$file && filemtime($themePath.DIRECTORY_SEPARATOR.$file)>$timestamp)
{
$cacheValid=false;
break;
|