* finish task #3158.

This commit is contained in:
wangyidong
2017-08-15 17:04:15 +08:00
parent fc3f537836
commit 27a57e6ee3
+18
View File
@@ -177,6 +177,24 @@ class custom extends control
if($_POST)
{
$this->loadModel('setting')->setItem('system.custom.productProject', $this->post->productProject);
/* Change block title. */
$oldConfig = isset($this->config->custom->productProject) ? $this->config->custom->productProject : '0_0';
$newConfig = $this->post->productProject;
list($oldProductIndex, $oldProjectIndex) = explode('_', $oldConfig);
list($newProductIndex, $newProjectIndex) = explode('_', $newConfig);
foreach($this->config->productCommonList as $clientLang => $productCommonList)
{
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$productCommonList[$oldProductIndex]}', '{$productCommonList[$newProductIndex]}')")->where('source')->eq('product')->exec();
}
foreach($this->config->projectCommonList as $clientLang => $projectCommonList)
{
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec();
}
die(js::reload('parent'));
}