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:
devjin 2012-08-09 12:09:18 +00:00
parent b36ed4295b
commit 2b6f473b26
15 changed files with 344 additions and 98 deletions

View file

@ -25,7 +25,20 @@
*
* @return bool
**/
function checkUpdate() {
function checkUpdate()
{
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('integration_search');
if($config->skin)
{
$config_parse = explode('.', $config->skin);
if (count($config_parse) > 1)
{
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
if(is_dir($template_path)) return true;
}
}
return false;
}
@ -34,7 +47,26 @@
*
* @return Object
**/
function moduleUpdate() {
function moduleUpdate()
{
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('message');
if($config->skin)
{
$config_parse = explode('.', $config->skin);
if (count($config_parse) > 1)
{
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
if(is_dir($template_path))
{
$config->skin = implode('|@|', $config_parse);
$oModuleController = &getController('module');
$oModuleController->updateModuleConfig('integration_search', $config);
}
}
}
return new Object(0, 'success_updated');
}