mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 10:19:55 +09:00
#19705602 module related DB select column arrangement
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8358 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
914f4d7ef0
commit
ee276fe56e
30 changed files with 133 additions and 78 deletions
|
|
@ -86,7 +86,8 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
// Get module information
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$columnList = array('module', 'module_category_srl', 'layout_srl', 'use_mobile', 'mlayout_srl', 'menu_srl', 'site_srl', 'skin', 'mskin', 'description', 'mcontent', 'open_rss', 'header_text', 'footer_text', 'regdate');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
// Get permission information
|
||||
$module_args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleGrants', $module_args);
|
||||
|
|
@ -127,7 +128,8 @@
|
|||
// Get module_srl
|
||||
$module_srl = Context::get('module_srl');
|
||||
// Get information of the module
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$columnList = array('module_srl', 'module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
if(!$module_info) return new Object(-1,'msg_invalid_request');
|
||||
// Register Admin ID
|
||||
$oModuleController->deleteAdminId($module_srl);
|
||||
|
|
@ -196,7 +198,8 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$columnList = array('module_srl', 'module', 'skin');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
if($module_info->module_srl) {
|
||||
$skin = $module_info->skin;
|
||||
// Get skin information (to check extra_vars)
|
||||
|
|
@ -291,8 +294,9 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController= &getController('module');
|
||||
$columnList = array('module_srl', 'module', 'use_mobile', 'mlayout_srl', 'menu_srl', 'site_srl', 'mid', 'mskin', 'browser_title', 'is_default', 'content', 'mcontent', 'open_rss', 'regdate');
|
||||
foreach($module_srls as $module_srl) {
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
$module_info->module_category_srl = $vars->module_category_srl;
|
||||
$module_info->layout_srl = $vars->layout_srl;
|
||||
$module_info->skin = $vars->skin;
|
||||
|
|
@ -318,7 +322,8 @@
|
|||
$oModuleController = &getController('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
|
||||
$columnList = array('module_srl', 'module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0], $columnList);
|
||||
$xml_info = $oModuleModel->getModuleActionXml($module_info->module);
|
||||
$grant_list = $xml_info->grant;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@
|
|||
* Available when using module instance in all the modules
|
||||
**/
|
||||
function getModuleGrantHTML($module_srl, $source_grant_list) {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$columnList = array('module_srl', 'site_srl');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
// Grant virtual permission for access and manager
|
||||
$grant_list->access->title = Context::getLang('grant_access');
|
||||
$grant_list->access->default = 'guest';
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
// Get information of the module
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$columnList = array('module_srl', 'module', 'mid', 'browser_title');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
Context::set('module_info', $module_info);
|
||||
// Set the layout to be pop-up
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
|
@ -97,7 +98,8 @@
|
|||
if(!count($modules)) if(!$module_srls) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
|
||||
$columnList = array('module_srl', 'module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0], $columnList);
|
||||
// Get a skin list of the module
|
||||
$skin_list = $oModuleModel->getSkins('./modules/'.$module_info->module);
|
||||
Context::set('skin_list',$skin_list);
|
||||
|
|
@ -145,7 +147,8 @@
|
|||
if(!count($modules)) if(!$module_srls) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
|
||||
$columnList = array('module_srl', 'module', 'site_srl');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0], $columnList);
|
||||
$xml_info = $oModuleModel->getModuleActionXml($module_info->module);
|
||||
$source_grant_list = $xml_info->grant;
|
||||
// Grant virtual permissions for access and manager
|
||||
|
|
|
|||
|
|
@ -164,8 +164,11 @@
|
|||
$args->domain = preg_replace('/\/$/','',$domain);
|
||||
$args->index_module_srl = $index_module_srl;
|
||||
$args->default_language = Context::getLangType();
|
||||
$output = executeQuery('module.getSiteInfoByDomain', $args);
|
||||
if($output->data) return new Object(-1,'msg_already_registed_vid');
|
||||
|
||||
$columnList = array('modules.site_srl');
|
||||
$oModuleModel = &getModel('module');
|
||||
$output = $oModuleModel->getSiteInfoByDomain($args->domain, $columnList);
|
||||
if($output) return new Object(-1,'msg_already_registed_vid');
|
||||
|
||||
$output = executeQuery('module.insertSite', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -179,9 +182,10 @@
|
|||
**/
|
||||
function updateSite($args) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$site_info = $oModuleModel->getSiteInfo($args->site_srl);
|
||||
$columnList = array('sites.site_srl', 'sites.domain');
|
||||
$site_info = $oModuleModel->getSiteInfo($args->site_srl, $columnList);
|
||||
if($site_info->domain != $args->domain) {
|
||||
$info = $oModuleModel->getSiteInfoByDomain($args->domain);
|
||||
$info = $oModuleModel->getSiteInfoByDomain($args->domain, $columnList);
|
||||
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');
|
||||
|
||||
|
|
@ -277,11 +281,15 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->module_srl);
|
||||
if(!$args->site_srl || !$args->browser_title)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$columnList = array('module_srl', 'site_srl', 'browser_title');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->module_srl);
|
||||
|
||||
$args->site_srl = (int)$module_info->site_srl;
|
||||
if(!$args->browser_title) $args->browser_title = $module_info->browser_title;
|
||||
if(!$args->site_srl) $args->site_srl = (int)$module_info->site_srl;
|
||||
if(!$args->browser_title) $args->browser_title = $module_info->browser_title;
|
||||
}
|
||||
|
||||
$output = executeQuery('module.isExistsModuleName', $args);
|
||||
if(!$output->toBool() || $output->data->count) {
|
||||
|
|
|
|||
|
|
@ -42,15 +42,15 @@
|
|||
/**
|
||||
* @brief Get site information
|
||||
**/
|
||||
function getSiteInfo($site_srl) {
|
||||
function getSiteInfo($site_srl, $columnList = array()) {
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('module.getSiteInfo', $args);
|
||||
$output = executeQuery('module.getSiteInfo', $args, $columnList);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
function getSiteInfoByDomain($domain) {
|
||||
function getSiteInfoByDomain($domain, $columnList = array()) {
|
||||
$args->domain= $domain;
|
||||
$output = executeQuery('module.getSiteInfoByDomain', $args);
|
||||
$output = executeQuery('module.getSiteInfoByDomain', $args, $columnList);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -131,10 +131,10 @@
|
|||
/**
|
||||
* @brief Get module information by mid
|
||||
**/
|
||||
function getModuleInfoByMid($mid, $site_srl = 0) {
|
||||
function getModuleInfoByMid($mid, $site_srl = 0, $columnList = array()) {
|
||||
$args->mid = $mid;
|
||||
$args->site_srl = (int)$site_srl;
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args, $columnList);
|
||||
$module_info = $output->data;
|
||||
if(!$module_info->module_srl && $module_info->data[0]) $module_info = $module_info->data[0];
|
||||
return $this->addModuleExtraVars($module_info);
|
||||
|
|
@ -143,10 +143,10 @@
|
|||
/**
|
||||
* @brief Get module information corresponding to module_srl
|
||||
**/
|
||||
function getModuleInfoByModuleSrl($module_srl) {
|
||||
function getModuleInfoByModuleSrl($module_srl, $columnList = array()) {
|
||||
// Get data
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
$module_info = $this->addModuleExtraVars($output->data);
|
||||
return $module_info;
|
||||
|
|
@ -155,10 +155,10 @@
|
|||
/**
|
||||
* @brief Get module information corresponding to layout_srl
|
||||
**/
|
||||
function getModulesInfoByLayout($layout_srl) {
|
||||
function getModulesInfoByLayout($layout_srl, $columnList = array()) {
|
||||
// Imported data
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQueryArray('module.getModulesByLayout', $args);
|
||||
$output = executeQueryArray('module.getModulesByLayout', $args, $columnList);
|
||||
|
||||
$count = count($output->data);
|
||||
|
||||
|
|
@ -172,10 +172,10 @@
|
|||
/**
|
||||
* @brief Get module information corresponding to multiple module_srls
|
||||
**/
|
||||
function getModulesInfo($module_srls) {
|
||||
function getModulesInfo($module_srls, $columnList = array()) {
|
||||
if(is_array($module_srls)) $module_srls = implode(',',$module_srls);
|
||||
$args->module_srls = $module_srls;
|
||||
$output = executeQueryArray('module.getModulesInfo', $args);
|
||||
$output = executeQueryArray('module.getModulesInfo', $args, $columnList);
|
||||
if(!$output->toBool()) return;
|
||||
return $this->addModuleExtraVars($output->data);
|
||||
}
|
||||
|
|
@ -212,8 +212,8 @@
|
|||
/**
|
||||
* @brief Get a complete list of mid, which is created in the DB
|
||||
**/
|
||||
function getMidList($args = null) {
|
||||
$output = executeQuery('module.getMidList', $args);
|
||||
function getMidList($args = null, $columnList = array()) {
|
||||
$output = executeQuery('module.getMidList', $args, $columnList);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$list = $output->data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue