mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
merging with r8261
git-svn-id: http://xe-core.googlecode.com/svn/trunk@8262 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
088c4ee21d
commit
5f22b33b43
3 changed files with 14 additions and 4 deletions
|
|
@ -70,7 +70,7 @@ class HTMLDisplayHandler {
|
|||
$output = preg_replace_callback('!<style(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
|
||||
|
||||
// 메타 파일 변경 (캐싱기능등으로 인해 위젯등에서 <!--Meta:경로--> 태그를 content에 넣는 경우가 있음
|
||||
$output = preg_replace_callback('/<!--Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this,'_transMeta'), $output);
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this,'_transMeta'), $output);
|
||||
|
||||
// rewrite module 사용시 생기는 상대경로에 대한 처리를 함
|
||||
if(Context::isAllowRewrite()) {
|
||||
|
|
@ -128,8 +128,9 @@ class HTMLDisplayHandler {
|
|||
* @param[in] $oModule the module object
|
||||
**/
|
||||
function _transMeta($matches) {
|
||||
if(substr($matches[1],'-4')=='.css') Context::addCSSFile($matches[1]);
|
||||
elseif(substr($matches[1],'-3')=='.js') Context::addJSFile($matches[1]);
|
||||
if($matches[1]) return '';
|
||||
if(substr($matches[2],'-4')=='.css') Context::addCSSFile($matches[2]);
|
||||
elseif(substr($matches[2],'-3')=='.js') Context::addJSFile($matches[2]);
|
||||
}
|
||||
|
||||
function _loadJSCSS()
|
||||
|
|
|
|||
|
|
@ -518,6 +518,7 @@
|
|||
if($type == 'unload') {
|
||||
$output = '<?php Context::unloadCSSFile("'.$source_filename.'"); ?>';
|
||||
} else {
|
||||
$meta_file = $source_filename;
|
||||
$output = '<?php Context::addCSSFile("'.$source_filename.'",false,"'.$attrs['media'].'","'.$attrs['targetie'].'",'.$attrs['index'].'); ?>';
|
||||
}
|
||||
break;
|
||||
|
|
@ -526,12 +527,14 @@
|
|||
if($type == 'unload') {
|
||||
$output = '<?php Context::unloadJsFile("'.$source_filename.'"); ?>';
|
||||
} else {
|
||||
$meta_file = $source_filename;
|
||||
$output = '<?php Context::addJsFile("'.$source_filename.'",false,"'.$attrs['targetie'].'",'.$attrs['index'].',"'.$attrs['type'].'"); ?>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($meta_file) $output = '<!--#Meta:'.$meta_file.'-->'.$output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -794,6 +797,7 @@
|
|||
if(preg_match('/^(http|\/)/i',$source_filename)) {
|
||||
$output = sprintf('<?php Context::addCSSFile("%s", %s, "%s", "%s", %s); ?>', $source_filename, 'false', $media, $targetie, $index);
|
||||
} else {
|
||||
$meta_file = $base_path.$filename;
|
||||
$output = sprintf('<?php Context::addCSSFile("%s%s", %s, "%s", "%s", %s); ?>', $base_path, $filename, $optimized, $media, $targetie, $index);
|
||||
}
|
||||
break;
|
||||
|
|
@ -802,12 +806,14 @@
|
|||
if(preg_match('/^(http|\/)/i',$source_filename)) {
|
||||
$output = sprintf('<?php Context::addJsFile("%s", %s, "%s", %s,"%s"); ?>', $source_filename, 'false', $targetie, $index, $type);
|
||||
} else {
|
||||
$meta_file = $base_path.$filename;
|
||||
$output = sprintf('<?php Context::addJsFile("%s%s", %s, "%s", %s, "%s"); ?>', $base_path, $filename, $optimized, $targetie, $index, $type);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($meta_file) $output = '<!--#Meta:'.$meta_file.'-->'.$output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -370,7 +370,10 @@
|
|||
|
||||
// 수정 시간을 비교해서 캐싱중이어야 하거나 widget.controller.php 파일보다 나중에 만들어 졌다면 캐시값을 return
|
||||
if($filemtime + $widget_cache * 60 > time() && $filemtime > filemtime(_XE_PATH_.'modules/widget/widget.controller.php')) {
|
||||
return FileHandler::readFile($cache_file);
|
||||
$cache_body = FileHandler::readFile($cache_file);
|
||||
$cache_body = preg_replace('@<\!--#Meta@:', '<!--Meta:', $cache_body);
|
||||
|
||||
return $cache_body;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue