mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
issue 2168 set member skin through theme. And update path of theme skin using for '|@|'.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11016 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b36ed4295b
commit
2b6f473b26
15 changed files with 344 additions and 98 deletions
|
|
@ -79,6 +79,18 @@
|
|||
|
||||
if(!is_dir('./files/ruleset')) return true;
|
||||
|
||||
$args->skin = '.';
|
||||
$output = executeQueryArray('module.getModuleSkinDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $item)
|
||||
{
|
||||
$skin_path = explode('.', $item->skin);
|
||||
if(count($skin_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/modules/%s', $skin_path[0], $skin_path[1]))) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -315,6 +327,24 @@
|
|||
$oDB->addColumn('module_config', 'site_srl', 'number', 11, 0, true);
|
||||
}
|
||||
FileHandler::makeDir('./files/ruleset');
|
||||
|
||||
$args->skin = '.';
|
||||
$output = executeQueryArray('module.getModuleSkinDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $item)
|
||||
{
|
||||
$skin_path = explode('.', $item->skin);
|
||||
if(count($skin_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/modules/%s', $skin_path[0], $skin_path[1])))
|
||||
{
|
||||
unset($args);
|
||||
$args->skin = $item->skin;
|
||||
$args->new_skin = implode('|@|', $skin_path);
|
||||
$output = executeQuery('module.updateSkinAll', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
15
modules/module/queries/getModuleSkinDotList.xml
Normal file
15
modules/module/queries/getModuleSkinDotList.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="getModuleSkinDotList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module" />
|
||||
<column name="skin" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like" column="skin" var="skin" default="." />
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="skin" />
|
||||
</groups>
|
||||
</query>
|
||||
11
modules/module/queries/updateSkinAll.xml
Normal file
11
modules/module/queries/updateSkinAll.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updateSkinAll" action="update">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="skin" var="new_skin" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="skin" var="skin" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue