merge sandbox to trunk for 1.4.4.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@7944 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-11-30 07:01:36 +00:00
parent 9139515e57
commit f59deeb270
131 changed files with 11605 additions and 4218 deletions

View file

@ -242,7 +242,7 @@
// 업로드 되지 않았다면 이전 데이터를 그대로 사용
if(!$image_obj['tmp_name']) {
$obj->{$vars->name} = $module_info->{$vars->name};
$obj->{$vars->name} = $skin_vars[$vars->name]->value;
continue;
}

View file

@ -125,7 +125,8 @@
$type = $val->type;
if($skin_vars[$name]) $value = $skin_vars[$name]->value;
else $value = '';
if($type=="checkbox" && !$value) $value = array();
if($type=="checkbox") $value = $value?unserialize($value):array();
$skin_info->extra_vars[$key]->value= $value;
}
}

View file

@ -23,7 +23,7 @@
$args->type = $type;
$args->act = $act;
$output = executeQuery('module.insertActionFoward', $args);
$output = executeQuery('module.insertActionForward', $args);
return $output;
}
@ -35,7 +35,7 @@
$args->type = $type;
$args->act = $act;
$output = executeQuery('module.deleteActionFoward', $args);
$output = executeQuery('module.deleteActionForward', $args);
return $output;
}
@ -83,8 +83,9 @@
*
**/
function insertModuleExtend($parent_module, $extend_module, $type, $kind=''){
if($kind!='admin') $kind = '';
if(!in_array($type,array('model','controller','view')) || !in_array($kind,array('svc','admin'))) return;
if($kind != 'admin') $kind = '';
if(!in_array($type,array('model','controller','view','api','mobile'))) return false;
if(in_array($parent_module, array('module','addon','widget','layout'))) return false;
$cache_file = './files/config/module_extend.php';
FileHandler::removeFile($cache_file);
@ -94,8 +95,10 @@
$args->type = $type;
$args->kind = $kind;
$output = executeQuery('module.getModuleExtendCount', $args);
if($output->data->count>0) return false;
$output = executeQuery('module.insertModuleExtend', $args);
return $output;
}
@ -155,7 +158,10 @@
if(isSiteID($domain)) {
$oModuleModel = &getModel('module');
if($oModuleModel->isIDExists($domain, 0)) return new Object(-1,'msg_already_registed_vid');
}else{
$domain = strtolower($domain);
}
$args->site_srl = getNextSequence();
$args->domain = preg_replace('/\/$/','',$domain);
$args->index_module_srl = $index_module_srl;
@ -180,6 +186,11 @@
$info = $oModuleModel->getSiteInfoByDomain($args->domain);
if($info->site_srl && $info->site_srl != $args->site_srl) return new Object(-1,'msg_already_registed_domain');
if(isSiteID($args->domain) && $oModuleModel->isIDExists($args->domain)) return new Object(-1,'msg_already_registed_vid');
if($args->domain && !isSiteID($args->domain)) {
$args->domain = strtolower($args->domain);
}
}
$output = executeQuery('module.updateSite', $args);
return $output;
@ -477,7 +488,8 @@
// 스킨 정보 필드에 메뉴 항목(stdClass)을 저장해놓은 경우가 있어
// 1.2.0 이상 버전으로 업그레이드한 후 모듈 업데이트할 때
// 오류가 발생하는 문제 수정
if (is_array($val) || is_object($val)) continue;
if (is_object($val)) continue;
if (is_array($val)) $val = serialize($val);
$args->name = trim($key);
$args->value = trim($val);

View file

@ -299,10 +299,15 @@
* @brief 특정 module extend 가져옴
**/
function getModuleExtend($parent_module, $type, $kind='') {
$module_extend_info = $this->loadModuleExtends();
$extend = $module_extend_info[$parent_module.'.'.$kind.'.'.$type];
$key = $parent_module.'.'.$kind.'.'.$type;
return $extend;
$module_extend_info = $this->loadModuleExtends();
if(array_key_exists($key, $module_extend_info))
{
return $module_extend_info[$key];
}
return false;
}
/**
@ -320,11 +325,11 @@
$output = executeQueryArray('module.getModuleExtend');
if($output->data){
foreach($output->data as $v){
$arr[] = sprintf("'%s.%s.%s' => '%s'", $v->parent_module, $v->type, $v->kind, $v->extend_module);
$arr[] = sprintf("'%s.%s.%s' => '%s'", $v->parent_module, $v->kind, $v->type, $v->extend_module);
}
}
$str = '<?PHP $__module_extend_info__=array(%s); return $__module_extend_info__; ?>';
$str = '<?PHP return array(%s); ?>';
$str = sprintf($str, join(',',$arr));
FileHandler::writeFile($cache_file, $str);

View file

@ -0,0 +1,10 @@
<query id="deleteActionForward" action="delete">
<tables>
<table name="action_forward" />
</tables>
<conditions>
<condition operation="equal" column="module" var="module" notnull="notnull" />
<condition operation="equal" column="type" var="type" notnull="notnull" pipe="and" />
<condition operation="equal" column="act" var="act" notnull="notnull" pipe="and" />
</conditions>
</query>

View file

@ -1,4 +1,4 @@
<query id="insertActionFoward" action="insert">
<query id="insertActionForward" action="insert">
<tables>
<table name="action_forward" />
</tables>

View file

@ -99,18 +99,18 @@
</select>
<!--@elseif($val->type=="checkbox")-->
<!--@foreach($val->default as $k=>$v)-->
<!--@foreach($val->options as $k=>$v)-->
<span>
<input type="checkbox" name="{$val->name}[]" value="{$v}" id="ch_{$key}_{$k}" <!--@if(in_array($v, $val->value))-->checked="checked"<!--@end--> class="checkbox" />
<label for="ch_{$key}_{$k}">{$v}</label>
<input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" <!--@if(in_array($v->value, $val->value))-->checked="checked"<!--@end--> class="checkbox" />
<label for="ch_{$key}_{$k}">{$v->value}</label>
</span>
<!--@end-->
<!--@elseif($val->type=="radio")-->
<!--@foreach($val->default as $k=>$v)-->
<!--@foreach($val->options as $k=>$v)-->
<span>
<input type="radio" name="{$val->name}" value="{$v}" id="ch_{$key}_{$k}" <!--@if($v==$val->value)-->checked="checked"<!--@end-->/>
<label for="ch_{$key}_{$k}">{$v}</label>
<input type="radio" name="{$val->name}" value="{$v->value}" id="ch_{$key}_{$k}" <!--@if($v->value==$val->value)-->checked="checked"<!--@end-->/>
<label for="ch_{$key}_{$k}">{$v->value}</label>
</span>
<!--@end-->