mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 19:29:56 +09:00
merge from 1.5.3 (~r10943)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@10951 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7aa4798373
commit
54e3a72065
334 changed files with 13011 additions and 5561 deletions
|
|
@ -22,11 +22,9 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage("success_registed");
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,11 +35,9 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -52,11 +48,9 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -402,9 +396,12 @@
|
|||
} else {
|
||||
$group_srls = Context::get($grant_name);
|
||||
if($group_srls) {
|
||||
if(strpos($group_srls,'|@|')!==false) $group_srls = explode('|@|',$group_srls);
|
||||
elseif(strpos($group_srls,',')!==false) $group_srls = explode(',',$group_srls);
|
||||
else $group_srls = array($group_srls);
|
||||
if(!is_array($group_srls))
|
||||
{
|
||||
if(strpos($group_srls,'|@|')!==false) $group_srls = explode('|@|',$group_srls);
|
||||
elseif(strpos($group_srls,',')!==false) $group_srls = explode(',',$group_srls);
|
||||
else $group_srls = array($group_srls);
|
||||
}
|
||||
$grant->{$grant_name} = $group_srls;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -492,11 +489,9 @@
|
|||
|
||||
$this->add('name', $args->name);
|
||||
$this->setMessage("success_saved", 'info');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', $module, 'target', $target, 'act', 'dispModuleAdminLangcode');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', $module, 'target', $target, 'act', 'dispModuleAdminLangcode');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -516,11 +511,9 @@
|
|||
$this->makeCacheDefinedLangCode($args->site_srl);
|
||||
|
||||
$this->setMessage("success_deleted", 'info');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminLangcode');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminLangcode');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
function procModuleAdminGetList()
|
||||
|
|
@ -547,6 +540,7 @@
|
|||
|
||||
$args->sort_index1 = 'sites.domain';
|
||||
|
||||
$moduleCategorySrl = array();
|
||||
// Get a list of modules at the site
|
||||
$output = executeQueryArray('module.getSiteModules', $args);
|
||||
$mid_list = array();
|
||||
|
|
@ -560,18 +554,56 @@
|
|||
|
||||
$obj = null;
|
||||
$obj->module_srl = $val->module_srl;
|
||||
$obj->layout_srl = $val->layout_srl;
|
||||
$obj->browser_title = $val->browser_title;
|
||||
$obj->mid = $val->mid;
|
||||
$obj->module_category_srl = $val->module_category_srl;
|
||||
if($val->module_category_srl > 0)
|
||||
{
|
||||
array_push($moduleCategorySrl, $val->module_category_srl);
|
||||
}
|
||||
$mid_list[$module]->list[$val->mid] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
// Get module category name
|
||||
$moduleCategorySrl = array_unique($moduleCategorySrl);
|
||||
$output = $oModuleModel->getModuleCategories($moduleCategorySrl);
|
||||
$categoryNameList = array();
|
||||
if(is_array($output))
|
||||
{
|
||||
foreach($output AS $key=>$value)
|
||||
{
|
||||
$categoryNameList[$value->module_category_srl] = $value->title;
|
||||
}
|
||||
}
|
||||
|
||||
$selected_module = Context::get('selected_module');
|
||||
if(count($mid_list)) {
|
||||
foreach($mid_list as $module => $val) {
|
||||
if(!$selected_module) $selected_module = $module;
|
||||
$xml_info = $oModuleModel->getModuleInfoXml($module);
|
||||
$mid_list[$module]->title = $xml_info->title;
|
||||
|
||||
// change module category srl to title
|
||||
if(is_array($val->list))
|
||||
{
|
||||
foreach($val->list AS $key=>$value)
|
||||
{
|
||||
if($value->module_category_srl > 0)
|
||||
{
|
||||
$categorySrl = $mid_list[$module]->list[$key]->module_category_srl;
|
||||
if(isset($categoryNameList[$categorySrl]))
|
||||
{
|
||||
$mid_list[$module]->list[$key]->module_category_srl = $categoryNameList[$categorySrl];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$mid_list[$module]->list[$key]->module_category_srl = Context::getLang('none_category');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,14 +149,6 @@
|
|||
$origin_config->{$key} = $val;
|
||||
}
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:module_config:module_'.$module.'_site_srl_'.$site_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
return $this->insertModuleConfig($module, $origin_config, $site_srl);
|
||||
}
|
||||
|
||||
|
|
@ -703,8 +695,11 @@
|
|||
/**
|
||||
* @brief Change user-defined language
|
||||
**/
|
||||
function replaceDefinedLangCode(&$output) {
|
||||
$output = preg_replace_callback('!\$user\_lang\-\>([A-Za-z0-9\_]+)!s', array($this,'_replaceLangCode'), $output);
|
||||
function replaceDefinedLangCode(&$output, $isReplaceLangCode = true) {
|
||||
if($isReplaceLangCode)
|
||||
{
|
||||
$output = preg_replace_callback('!\$user_lang->([a-z0-9\_]+)!is', array($this,'_replaceLangCode'), $output);
|
||||
}
|
||||
}
|
||||
function _replaceLangCode($matches) {
|
||||
static $lang = null;
|
||||
|
|
@ -788,7 +783,7 @@
|
|||
if (!$ajax)
|
||||
{
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminFileBox');
|
||||
header('location:'.$returnUrl);
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -70,13 +70,15 @@
|
|||
function getDefaultMid() {
|
||||
$default_url = preg_replace('/\/$/','',Context::getDefaultUrl());
|
||||
$request_url = preg_replace('/\/$/','',Context::getRequestUri());
|
||||
$default_url_parse = parse_url($default_url);
|
||||
$request_url_parse = parse_url($request_url);
|
||||
$vid = Context::get('vid');
|
||||
$mid = Context::get('mid');
|
||||
|
||||
// Set up
|
||||
// test.xe.com
|
||||
$domain = '';
|
||||
if($default_url && $default_url != $request_url) {
|
||||
if($default_url && $default_url_parse['host'] != $request_url_parse['host']) {
|
||||
$url_info = parse_url($request_url);
|
||||
$hostname = $url_info['host'];
|
||||
$path = preg_replace('/\/$/','',$url_info['path']);
|
||||
|
|
@ -630,8 +632,10 @@
|
|||
$info->menu->{$action->attrs->menu_name}->index = $name;
|
||||
$buff .= sprintf('$info->menu->%s->index=\'%s\';', $action->attrs->menu_name, $name);
|
||||
}
|
||||
array_push($info->menu->{$action->attrs->menu_name}->acts, $name);
|
||||
$currentKey = array_search($name, $info->menu->{$action->attrs->menu_name}->acts);
|
||||
if(is_array($info->menu->{$action->attrs->menu_name}->acts)) {
|
||||
@array_push($info->menu->{$action->attrs->menu_name}->acts, $name);
|
||||
$currentKey = @array_search($name, $info->menu->{$action->attrs->menu_name}->acts);
|
||||
}
|
||||
|
||||
$buff .= sprintf('$info->menu->%s->acts[%d]=\'%s\';', $action->attrs->menu_name, $currentKey, $name);
|
||||
$i++;
|
||||
|
|
@ -1015,9 +1019,10 @@
|
|||
/**
|
||||
* @brief Get a list of module category
|
||||
**/
|
||||
function getModuleCategories() {
|
||||
function getModuleCategories($moduleCategorySrl = array()) {
|
||||
$args->moduleCategorySrl = $moduleCategorySrl;
|
||||
// Get data from the DB
|
||||
$output = executeQuery('module.getModuleCategories');
|
||||
$output = executeQuery('module.getModuleCategories', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$list = $output->data;
|
||||
if(!$list) return;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
<tables>
|
||||
<table name="module_categories" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_category_srl" var="moduleCategorySrl" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="title" order="asc" />
|
||||
</navigation>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
<column name="sites.domain" />
|
||||
<column name="modules.site_srl" />
|
||||
<column name="modules.module" />
|
||||
<column name="modules.module_category_srl" />
|
||||
<column name="modules.layout_srl" />
|
||||
<column name="modules.mid" />
|
||||
<column name="modules.browser_title" />
|
||||
<column name="modules.module_srl" />
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@
|
|||
<include target="include.module_grant_setup.html" />
|
||||
<include target="include.multilang.textarea.html" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</select>
|
||||
<div id="zone_{$grant_name}" style="display:none">
|
||||
<!--@foreach($group_list as $group_srl => $group_item)-->
|
||||
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" />
|
||||
<input type="checkbox" class="checkbox" name="{$grant_name}[]" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" />
|
||||
<label for="grant_{$grant_name}_{$group_srl}">{$group_item->title}</label>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@
|
|||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="search_target" value="value" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input title="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
<input type="hidden" name="target" value="{$target}" />
|
||||
<input title="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -43,12 +43,10 @@
|
|||
<td class="nowr">
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<!--@if($author->homepage)-->
|
||||
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">
|
||||
<!--@end-->
|
||||
{$author->name}
|
||||
<!--@if($author->homepage)-->
|
||||
</a>
|
||||
<!--@end-->
|
||||
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">{$author->name}</a>
|
||||
<!--@else-->
|
||||
{$author->name}
|
||||
<!--@endif-->
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td class="nowr">{$val->path}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue