mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
update trunk / tag 1.4.2.2
git-svn-id: http://xe-core.googlecode.com/svn/trunk@7492 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d448678c63
commit
6900f96319
27 changed files with 99 additions and 54 deletions
2
classes/cache/CacheApc.class.php
vendored
2
classes/cache/CacheApc.class.php
vendored
|
|
@ -66,7 +66,7 @@
|
|||
}
|
||||
|
||||
function truncate() {
|
||||
apc_clear_cache('user');
|
||||
return apc_clear_cache('user');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
6
classes/cache/CacheHandler.class.php
vendored
6
classes/cache/CacheHandler.class.php
vendored
|
|
@ -19,10 +19,10 @@
|
|||
if(!$info) $info = Context::getDBInfo();
|
||||
if($info){
|
||||
if($target == 'object'){
|
||||
if($info->use_template_cache =='apc') $type = 'apc';
|
||||
else if(substr($info->use_template_cache,0,8)=='memcache'){
|
||||
if($info->use_object_cache =='apc') $type = 'apc';
|
||||
else if(substr($info->use_object_cache,0,8)=='memcache'){
|
||||
$type = 'memcache';
|
||||
$url = $info->use_template_cache;
|
||||
$url = $info->use_object_cache;
|
||||
}
|
||||
}else if($target == 'template'){
|
||||
if($info->use_template_cache =='apc') $type = 'apc';
|
||||
|
|
|
|||
|
|
@ -48,19 +48,22 @@
|
|||
$files = array();
|
||||
$hash = "";
|
||||
foreach($source_files as $key => $file) {
|
||||
if($file['file'][0] == '/')
|
||||
{
|
||||
if(!file_exists($_SERVER['DOCUMENT_ROOT'].$file['file'])) continue;
|
||||
}
|
||||
else if(!$file || !$file['file'] || !file_exists($file['file'])) continue;
|
||||
$file['file'] = $source_files[$key]['file'] = str_replace("\\","/",$file['file']);
|
||||
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) ) $files[] = $file;
|
||||
else{
|
||||
if($file['file'][0] == '/'){
|
||||
if(!file_exists($file['file'])){
|
||||
if(file_exists($_SERVER['DOCUMENT_ROOT'] . $file['file'])){
|
||||
if($file['optimized']) $source_files[$key]['file'] = $file['file'] = $_SERVER['DOCUMENT_ROOT'].$file['file'];
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else if(!$file || !$file['file'] || !file_exists($file['file'])) continue;
|
||||
$file['file'] = $source_files[$key]['file'] = str_replace("\\","/",$file['file']);
|
||||
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) ) $files[] = $file;
|
||||
else{
|
||||
$targets[] = $file;
|
||||
$hash .= $file['file'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(!count($targets)) return $this->_getOptimizedRemoved($files);
|
||||
$list_file_hash = md5($hash);
|
||||
$oCacheHandler = &CacheHandler::getInstance('template');
|
||||
|
|
@ -71,7 +74,7 @@
|
|||
$oCacheHandler->put($list_file_hash, $buff);
|
||||
}
|
||||
}else{
|
||||
$list_file = FileHandler::getRealPath($this->cache_path . $list_file_hash);
|
||||
$list_file = FileHandler::getRealPath($this->cache_path . $list_file_hash . '.info.php');
|
||||
|
||||
if(!file_exists($list_file)){
|
||||
$str = '<?php $f=array();';
|
||||
|
|
@ -81,6 +84,7 @@
|
|||
FileHandler::writeFile($list_file, $str);
|
||||
}
|
||||
}
|
||||
|
||||
array_unshift($files, array('file' => sprintf($this->script_file, $list_file_hash, $type) , 'media' => 'all'));
|
||||
$files = $this->_getOptimizedRemoved($files);
|
||||
if(!count($files)) return $files;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
@charset "utf-8";
|
||||
|
||||
/* default.css - Type Selector Definition */
|
||||
body { margin:0;padding:0; font-size:.75em;}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,2 @@
|
|||
@charset "utf-8";
|
||||
|
||||
body { overflow:hidden; }
|
||||
table.colTable { margin:0; }
|
||||
|
|
@ -29,11 +29,15 @@ if(file_exists($dbconfig_file)){
|
|||
$cache_support = false;
|
||||
}
|
||||
|
||||
$XE_WEB_PATH = substr($XE_PATH,strlen($_SERVER['DOCUMENT_ROOT']));
|
||||
//$XE_WEB_PATH = substr($XE_PATH,strlen($_SERVER['DOCUMENT_ROOT']));
|
||||
$XE_WEB_PATH_arr = explode("/", $_SERVER['REQUEST_URI']);
|
||||
array_pop($XE_WEB_PATH_arr);
|
||||
array_pop($XE_WEB_PATH_arr);
|
||||
$XE_WEB_PATH = implode("/", $XE_WEB_PATH_arr);
|
||||
if(substr($XE_WEB_PATH,-1) != "/") $XE_WEB_PATH .= "/";
|
||||
$cache_path = $XE_PATH . 'files/cache/optimized/';
|
||||
$type = $_GET['t'];
|
||||
$list_file = $cache_path . $_GET['l'];
|
||||
$list_file = $cache_path . $_GET['l'] .'.info.php';
|
||||
|
||||
|
||||
function getRealPath($file){
|
||||
|
|
@ -93,7 +97,7 @@ function useContentEncoding(){
|
|||
|
||||
function getCacheKey($list){
|
||||
$key = 'optimized:' . join('',$list);
|
||||
return $key;
|
||||
return md5($key);
|
||||
}
|
||||
|
||||
function printFileList($list){
|
||||
|
|
@ -111,6 +115,7 @@ function printFileList($list){
|
|||
for($i=0,$c=count($list);$i<$c;$i++){
|
||||
$file = getRealPath($list[$i]);
|
||||
if(file_exists($file)){
|
||||
$output .= '/* file:' . $file . " */\n";
|
||||
$output .= file_get_contents($file);
|
||||
$output .= "\n";
|
||||
}
|
||||
|
|
@ -207,6 +212,8 @@ function _replaceCssPath($matches) {
|
|||
}
|
||||
|
||||
function convertEncodingStr($str) {
|
||||
if(!$str) return '';
|
||||
|
||||
$charset_list = array(
|
||||
'UTF-8', 'EUC-KR', 'CP949', 'ISO8859-1', 'EUC-JP', 'SHIFT_JIS', 'CP932',
|
||||
'EUC-CN', 'HZ', 'GBK', 'GB18030', 'EUC-TW', 'BIG5', 'CP950', 'BIG5-HKSCS',
|
||||
|
|
@ -218,38 +225,34 @@ function convertEncodingStr($str) {
|
|||
'CP1257', 'CP850', 'CP866',
|
||||
);
|
||||
|
||||
for($i=0;$i<count($charset_list);$i++) {
|
||||
for($i=0,$c=count($charset_list);$i<$c;$i++) {
|
||||
$charset = $charset_list[$i];
|
||||
if($str){
|
||||
$cstr = iconv($charset,$charset.'//IGNORE',$str);
|
||||
if($str == $cstr && $charset != 'UTF-8'){
|
||||
return iconv($charset, 'UTF-8//IGNORE', $str);
|
||||
}
|
||||
if($str == iconv($charset, $charset.'//IGNORE',$str)){
|
||||
if($charset == 'UTF-8') return $str;
|
||||
return iconv($charset, 'UTF-8//IGNORE', $str);
|
||||
}
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
if($type == '.js'){
|
||||
printFileList($list);
|
||||
}else if($type == '.css'){
|
||||
$css = array();
|
||||
|
||||
if($cache_support){
|
||||
foreach($list as $file){
|
||||
$cache_file = $cache_path . md5($file);
|
||||
$cache_file = $cache_path . md5($file). '.cache.php';
|
||||
$css[] = getRealPath($cache_file);
|
||||
}
|
||||
|
||||
$cache_key = getCacheKey($css);
|
||||
|
||||
$buff = $oCacheHandler->get($cache_key, $mtime);
|
||||
if(!$buff){
|
||||
$buff = '';
|
||||
$css = array();
|
||||
foreach($list as $file){
|
||||
$cache_file = $cache_path . md5($file);
|
||||
$buff .= makeCacheFileCSS($file, getRealPath($cache_file), true);
|
||||
$css[] = getRealPath($cache_file);
|
||||
foreach($list as $file){
|
||||
$buff .= makeCacheFileCSS($file, '', true);
|
||||
}
|
||||
|
||||
$oCacheHandler->put($cache_key, $buff);
|
||||
|
|
@ -257,7 +260,7 @@ if($type == '.js'){
|
|||
|
||||
}else{
|
||||
foreach($list as $file){
|
||||
$cache_file = $cache_path . md5($file);
|
||||
$cache_file = $cache_path . md5($file). '.cache.php';
|
||||
$cache_mtime = getMtime($cache_file);
|
||||
$css_mtime = getMtime($file);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* @brief XE의 전체 버전 표기
|
||||
* 이 파일의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함
|
||||
**/
|
||||
define('__ZBXE_VERSION__', '1.4.2.1');
|
||||
define('__ZBXE_VERSION__', '1.4.2.2');
|
||||
|
||||
/**
|
||||
* @brief zbXE가 설치된 장소의 base path를 구함
|
||||
|
|
|
|||
|
|
@ -22,14 +22,19 @@
|
|||
* @return none
|
||||
**/
|
||||
function procAdminRecompileCacheFile() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
// rename cache dir
|
||||
$temp_cache_dir = './files/cache_'. time();
|
||||
FileHandler::rename('./files/cache', $temp_cache_dir);
|
||||
FileHandler::makeDir('./files/cache');
|
||||
|
||||
// remove debug files
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_debug_message.php');
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_debug_db_query.php');
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_db_slow_query.php');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
|
||||
// call recompileCache for each module
|
||||
foreach($module_list as $module) {
|
||||
$oModule = null;
|
||||
|
|
@ -37,6 +42,30 @@
|
|||
if(method_exists($oModule, 'recompileCache')) $oModule->recompileCache();
|
||||
}
|
||||
|
||||
// remove cache dir
|
||||
$tmp_cache_list = FileHandler::readDir('./files','/(^cache_[0-9]+)/');
|
||||
if($tmp_cache_list){
|
||||
foreach($tmp_cache_list as $tmp_dir){
|
||||
if($tmp_dir) FileHandler::removeDir('./files/'.$tmp_dir);
|
||||
}
|
||||
}
|
||||
|
||||
$truncated = array();
|
||||
$oObjectCacheHandler = &CacheHandler::getInstance();
|
||||
$oTemplateCacheHandler = &CacheHandler::getInstance('template');
|
||||
|
||||
if($oObjectCacheHandler->isSupport()){
|
||||
$truncated[] = $oObjectCacheHandler->truncate();
|
||||
}
|
||||
|
||||
if($oTemplateCacheHandler->isSupport()){
|
||||
$truncated[] = $oTemplateCacheHandler->truncate();
|
||||
}
|
||||
|
||||
if(count($truncated) && in_array(false,$truncated)){
|
||||
return new Object(-1,'msg_self_restart_cache_engine');
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,4 +82,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -84,4 +84,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -83,4 +83,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -82,4 +82,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -82,4 +82,5 @@
|
|||
$lang->ftp_get_list = '목록 가져오기';
|
||||
$lang->ftp_remove_info = 'FTP 정보 삭제';
|
||||
$lang->msg_ftp_invalid_path = 'FTP Path를 읽을 수 없습니다.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -81,4 +81,5 @@
|
|||
$lang->ftp_get_list = 'Get List';
|
||||
$lang->ftp_remove_info = 'Remove FTP Info';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -84,4 +84,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -82,4 +82,5 @@
|
|||
$lang->ftp_get_list = "Get List";
|
||||
$lang->ftp_remove_info = 'Remove FTP Info.';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -82,4 +82,5 @@
|
|||
$lang->ftp_get_list = "取得列表";
|
||||
$lang->ftp_remove_info = '移除 FTP 資料';
|
||||
$lang->msg_ftp_invalid_path = 'Failed to read the specified FTP Path.';
|
||||
$lang->msg_self_restart_cache_engine = 'Memcached 또는 캐쉬데몬을 재시작 해주세요.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -76,8 +76,10 @@
|
|||
case "component":
|
||||
$config_file = "/info.xml";
|
||||
break;
|
||||
case "skin":
|
||||
case "widgetstyle":
|
||||
case "style":
|
||||
$type = "skin";
|
||||
case "skin":
|
||||
case "widgetstyle":
|
||||
$config_file = "/skin.xml";
|
||||
break;
|
||||
case "drcomponent":
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@
|
|||
$xmlDoc = $xml->loadXmlFile(FileHandler::getRealPath($path).$config_file);
|
||||
if(!$xmlDoc) $this->stop("msg_invalid_request");
|
||||
if($type == "drcomponent") $type = "component";
|
||||
if($type == "style") $type = "skin";
|
||||
$title = $xmlDoc->{$type}->title->body;
|
||||
$installedPackage->title = $title;
|
||||
$installedPackage->type = $type;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,8 @@
|
|||
$config_file = "/info.xml";
|
||||
break;
|
||||
case "skin":
|
||||
case "widgetstyle":
|
||||
case "widgetstyle":
|
||||
case "style":
|
||||
$config_file = "/skin.xml";
|
||||
break;
|
||||
case "drcomponent":
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
있는 그대로 표시가 될 뿐 편집/ 출력시 아무런 영향을 끼치지 않습니다.
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
XE Default Form
|
||||
XE default document style.
|
||||
It displays as it is, and affect nothing to editing / printing.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
XE默认样式。
|
||||
|
|
@ -25,10 +26,6 @@
|
|||
XEの基本ドキュメント書式です。
|
||||
そのまま表示されるだけで、編集・出力には影響しません。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
XE default document style.
|
||||
It displays as it is, and affect nothing to editing / printing.
|
||||
</description>
|
||||
<description xml:lang="vi">
|
||||
Trang mẫu mặc định của XE.
|
||||
Nó sẽ hiển thị trong phần sửa đổi bài viết và không ảnh hưởng đến bất cứ chức năng nào cả.
|
||||
|
|
|
|||
|
|
@ -109,6 +109,9 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('input#menu_name').focus();
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.open{ display:block !important;}
|
||||
.floatLeft{ float:left;}
|
||||
.floatRight{ float:right;}
|
||||
.clearLeft{ clear:left;}
|
||||
.clearRight{ clear:right;}
|
||||
|
||||
.widgetContainer .open{ display:block !important;}
|
||||
.widgetContainer a{ text-decoration:none;}
|
||||
.widgetContainer a:hover,
|
||||
.widgetContainer a:active,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue