mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 09:49:54 +09:00
merge from branch luminous (version 1.5.4.2, ~r12561)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2263200ce4
commit
cc47d2b247
196 changed files with 3655 additions and 2033 deletions
|
|
@ -114,14 +114,34 @@
|
|||
}
|
||||
}
|
||||
|
||||
$tmpModuleSkinVars = $oModuleModel->getModuleSkinVars($module_srl);
|
||||
$tmpModuleMobileSkinVars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||
|
||||
if($tmpModuleSkinVars)
|
||||
{
|
||||
foreach($tmpModuleSkinVars AS $key=>$value)
|
||||
{
|
||||
$moduleSkinVars->{$key} = $value->value;
|
||||
}
|
||||
}
|
||||
|
||||
if($tmpModuleMobileSkinVars)
|
||||
{
|
||||
foreach($tmpModuleMobileSkinVars AS $key=>$value)
|
||||
{
|
||||
$moduleMobileSkinVars->{$key} = $value->value;
|
||||
}
|
||||
}
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
// Copy a module
|
||||
$triggerObj->originModuleSrl = $module_srl;
|
||||
$triggerObj->moduleSrlList = array();
|
||||
foreach($clones as $mid => $browser_title) {
|
||||
|
||||
$errorLog = array();
|
||||
foreach($clones as $mid => $browser_title)
|
||||
{
|
||||
$clone_args = null;
|
||||
$clone_args = clone($module_info);
|
||||
$clone_args->module_srl = null;
|
||||
|
|
@ -131,6 +151,12 @@
|
|||
$clone_args->is_default = 'N';
|
||||
// Create a module
|
||||
$output = $oModuleController->insertModule($clone_args);
|
||||
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$errorLog[] = $mid . ' : '. $output->message;
|
||||
continue;
|
||||
}
|
||||
$module_srl = $output->get('module_srl');
|
||||
|
||||
if($module_info->module == 'page' && $extra_vars->page_type == 'ARTICLE')
|
||||
|
|
@ -143,23 +169,47 @@
|
|||
{
|
||||
$extra_vars->document_srl = array_pop($document_srls);
|
||||
}
|
||||
|
||||
if($extra_vars->mdocument_srl)
|
||||
{
|
||||
$copyOutput = $oDocumentAdminController->copyDocumentModule(array($extra_vars->mdocument_srl), $module_srl, $module_info->category_srl);
|
||||
$copiedSrls = $copyOutput->get('copied_srls');
|
||||
if($copiedSrls && count($copiedSrls) > 0)
|
||||
{
|
||||
$extra_vars->mdocument_srl = array_pop($copiedSrls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Grant module permissions
|
||||
if(count($grant)) $oModuleController->insertModuleGrants($module_srl, $grant);
|
||||
if ($extra_vars) $oModuleController->insertModuleExtraVars($module_srl, $extra_vars);
|
||||
|
||||
if($moduleSkinVars) $oModuleController->insertModuleSkinVars($module_srl, $moduleSkinVars);
|
||||
if($moduleMobileSkinVars) $oModuleController->insertModuleMobileSkinVars($module_srl, $moduleMobileSkinVars);
|
||||
|
||||
array_push($triggerObj->moduleSrlList, $module_srl);
|
||||
}
|
||||
|
||||
$output = ModuleHandler::triggerCall('module.procModuleAdminCopyModule', 'after', $triggerObj);
|
||||
|
||||
$oDB->commit();
|
||||
$this->setMessage('success_registed');
|
||||
|
||||
if(count($errorLog) > 0)
|
||||
{
|
||||
$message = implode('\n', $errorLog);
|
||||
$this->setMessage($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mseeage = $lang->success_registed;
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
htmlHeader();
|
||||
alertScript($lang->success_registed);
|
||||
alertScript($message);
|
||||
reload(true);
|
||||
closePopupScript();
|
||||
htmlFooter();
|
||||
|
|
@ -574,6 +624,7 @@
|
|||
// Variable setting for site keyword
|
||||
$site_keyword = Context::get('site_keyword');
|
||||
$site_srl = Context::get('site_srl');
|
||||
$vid = Context::get('vid');
|
||||
// If there is no site keyword, use as information of the current virtual site
|
||||
$args = null;
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -582,7 +633,7 @@
|
|||
|
||||
if(!$site_srl)
|
||||
{
|
||||
if($logged_info->is_admin == 'Y' && !$site_keyword) $args->site_srl = 0;
|
||||
if($logged_info->is_admin == 'Y' && !$site_keyword && !$vid) $args->site_srl = 0;
|
||||
else $args->site_srl = (int)$site_module_info->site_srl;
|
||||
}
|
||||
else $args->site_srl = $site_srl;
|
||||
|
|
|
|||
|
|
@ -50,11 +50,51 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
function getSelectedManageHTML($grantList)
|
||||
{
|
||||
// Grant virtual permission for access and manager
|
||||
$grantList->access->title = Context::getLang('grant_access');
|
||||
$grantList->access->default = 'guest';
|
||||
if(count($grantList))
|
||||
{
|
||||
foreach($grantList as $key => $val) {
|
||||
if(!$val->default) $val->default = 'guest';
|
||||
if($val->default == 'root') $val->default = 'manager';
|
||||
$grant_list->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$grant_list->manager->title = Context::getLang('grant_manager');
|
||||
$grant_list->manager->default = 'manager';
|
||||
Context::set('grant_list', $grant_list);
|
||||
|
||||
// Get a list of groups
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups(0);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
Context::set('module_srls', 'dummy');
|
||||
$content = '';
|
||||
// Call a trigger for additional settings
|
||||
// Considering uses in the other modules, trigger name cen be publicly used
|
||||
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
|
||||
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
|
||||
Context::set('setup_content', $content);
|
||||
|
||||
// Get information of module_grants
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($this->module_path.'tpl', 'include.manage_selected.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Common:: module's permission displaying page in the module
|
||||
* Available when using module instance in all the modules
|
||||
**/
|
||||
function getModuleGrantHTML($module_srl, $source_grant_list) {
|
||||
if(!$module_srl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// get member module's config
|
||||
$oMemberModel = &getModel('member');
|
||||
$member_config = $oMemberModel->getMemberConfig();
|
||||
|
|
@ -169,15 +209,24 @@
|
|||
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||
}
|
||||
|
||||
if(count($skin_info->extra_vars)) {
|
||||
foreach($skin_info->extra_vars as $key => $val) {
|
||||
if(count($skin_info->extra_vars))
|
||||
{
|
||||
foreach($skin_info->extra_vars as $key => $val)
|
||||
{
|
||||
$group = $val->group;
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
if($skin_vars[$name]) $value = $skin_vars[$name]->value;
|
||||
if($skin_vars[$name])
|
||||
{
|
||||
$value = $skin_vars[$name]->value;
|
||||
}
|
||||
else $value = '';
|
||||
if($type=="checkbox") $value = $value?unserialize($value):array();
|
||||
|
||||
if($type=="checkbox")
|
||||
{
|
||||
$value = $value?unserialize($value):array();
|
||||
}
|
||||
|
||||
$value = empty($value) ? $val->default : $value;
|
||||
$skin_info->extra_vars[$key]->value= $value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@
|
|||
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);
|
||||
$args->domain = $args->domain;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,11 @@
|
|||
* @brief Get module information by mid
|
||||
**/
|
||||
function getModuleInfoByMid($mid, $site_srl = 0, $columnList = array()) {
|
||||
if(!$mid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$args->mid = $mid;
|
||||
$args->site_srl = (int)$site_srl;
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="site_srl" var="site_srl" notnull="notnull" />
|
||||
<column name="layout_Srl" var="layout_srl" notnull="notnull" default="0" />
|
||||
<column name="layout_srl" var="layout_srl" notnull="notnull" default="0" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
</p>
|
||||
<p cond="$val->type == 'checkbox'" class="a">
|
||||
<span loop="$val->options => $k, $v">
|
||||
<input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="in_array($v->value, $val->value)" class="checkbox" />
|
||||
<input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="@in_array($v->value, $val->value)" class="checkbox" />
|
||||
<label for="ch_{$key}_{$k}">{$v->title}</label>
|
||||
</span>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue