mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Remove unnecessary site_srl from several other modules
This commit is contained in:
parent
972fbc9ca6
commit
1f34c33e29
29 changed files with 79 additions and 224 deletions
|
|
@ -166,10 +166,8 @@ class layoutAdminModel extends layout
|
|||
|
||||
public function getLayoutAdminSiteDefaultLayout()
|
||||
{
|
||||
$siteSrl = Context::get('site_srl');
|
||||
$type = Context::get('type');
|
||||
|
||||
$layoutSrl = $this->getSiteDefaultLayout($type, $siteSrl);
|
||||
$layoutSrl = $this->getSiteDefaultLayout($type);
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layoutInfo = $oLayoutModel->getLayoutRawData($layoutSrl, array('title'));
|
||||
|
|
@ -178,10 +176,10 @@ class layoutAdminModel extends layout
|
|||
$this->add('title', $layoutInfo->title);
|
||||
}
|
||||
|
||||
public function getSiteDefaultLayout($viewType = 'P', $siteSrl = 0)
|
||||
public function getSiteDefaultLayout($viewType = 'P')
|
||||
{
|
||||
$target = ($viewType == 'M') ? 'mlayout_srl' : 'layout_srl';
|
||||
$designInfoFile = sprintf(RX_BASEDIR . 'files/site_design/design_%s.php', $siteSrl);
|
||||
$designInfoFile = RX_BASEDIR . 'files/site_design/design_0.php';
|
||||
if(FileHandler::exists($designInfoFile)) include($designInfoFile);
|
||||
|
||||
if(!$designInfo || !$designInfo->{$target})
|
||||
|
|
|
|||
|
|
@ -33,13 +33,7 @@ class layoutModel extends layout
|
|||
*/
|
||||
function getLayoutList($site_srl = 0, $layout_type="P", $columnList = array())
|
||||
{
|
||||
if(!$site_srl)
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$args->layout_type = $layout_type;
|
||||
$output = executeQueryArray('layout.getLayoutList', $args, $columnList);
|
||||
|
||||
|
|
@ -52,7 +46,7 @@ class layoutModel extends layout
|
|||
}
|
||||
|
||||
$oLayoutAdminModel = getAdminModel('layout');
|
||||
$siteDefaultLayoutSrl = $oLayoutAdminModel->getSiteDefaultLayout($layout_type, $site_srl);
|
||||
$siteDefaultLayoutSrl = $oLayoutAdminModel->getSiteDefaultLayout($layout_type);
|
||||
if($siteDefaultLayoutSrl)
|
||||
{
|
||||
$siteDefaultLayoutInfo = $this->getlayout($siteDefaultLayoutSrl);
|
||||
|
|
@ -81,10 +75,9 @@ class layoutModel extends layout
|
|||
*/
|
||||
public function getLayoutInstanceListForJSONP()
|
||||
{
|
||||
$siteSrl = Context::get('site_srl');
|
||||
$layoutType = Context::get('layout_type');
|
||||
|
||||
$layoutList = $this->getLayoutInstanceList($siteSrl, $layoutType);
|
||||
$layoutList = $this->getLayoutInstanceList(0, $layoutType);
|
||||
$thumbs = array();
|
||||
|
||||
foreach($layoutList as $key => $val)
|
||||
|
|
@ -127,17 +120,11 @@ class layoutModel extends layout
|
|||
*/
|
||||
function getLayoutInstanceList($siteSrl = 0, $layoutType = 'P', $layout = null, $columnList = array())
|
||||
{
|
||||
if (!$siteSrl)
|
||||
{
|
||||
$siteModuleInfo = Context::get('site_module_info');
|
||||
$siteSrl = (int)$siteModuleInfo->site_srl;
|
||||
}
|
||||
if ($columnList && !isset($columnList['layout_type']))
|
||||
{
|
||||
$columnList[] = 'layout_type';
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $siteSrl;
|
||||
$args->layout_type = $layoutType === 'P' ? 'P' : 'P,M';
|
||||
$args->layout = $layout;
|
||||
$output = executeQueryArray('layout.getLayoutList', $args, $columnList);
|
||||
|
|
@ -177,7 +164,6 @@ class layoutModel extends layout
|
|||
if(count($instanceList) < 1 && $downloadedList[$layout])
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layout;
|
||||
$insertArgs->title = $titleList[$layout];
|
||||
|
|
@ -195,7 +181,6 @@ class layoutModel extends layout
|
|||
foreach($noInstanceList as $layoutName)
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layoutName;
|
||||
$insertArgs->title = $titleList[$layoutName];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" filter="number" default="0" notnull="notnull" />
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
|
||||
<condition operation="in" column="layout_type" var="layout_type" default="P" pipe="and" />
|
||||
<condition operation="equal" column="layout" var="layout" pipe="and" />
|
||||
</conditions>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="layout_srl" var="layout_srl" filter="number" notnull="notnull" />
|
||||
<column name="site_srl" var="site_srl" filter="number" default="0" notnull="notnull" />
|
||||
<column name="site_srl" var="site_srl" filter="number" default="0" />
|
||||
<column name="layout" var="layout" notnull="notnull" />
|
||||
<column name="title" var="title" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue