* [task#133684,done,1h,0h] Finish upgrade charter file config.
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ CREATE TABLE IF NOT EXISTS `zt_approval` (
|
||||
`version` mediumint(9) NOT NULL DEFAULT '0',
|
||||
`status` varchar(20) NOT NULL DEFAULT 'doing',
|
||||
`result` varchar(20) NOT NULL DEFAULT '',
|
||||
`extra` text NULL;
|
||||
`extra` text NULL,
|
||||
`createdBy` char(30) NOT NULL DEFAULT '',
|
||||
`createdDate` datetime NULL,
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0',
|
||||
|
||||
@@ -10510,4 +10510,27 @@ class upgradeModel extends model
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对立项附件配置做升级处理。
|
||||
* Process charter file config.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function processCharterFileConfig()
|
||||
{
|
||||
$oldCharterFileConfig = $this->loadModel('custom')->getItems('owner=system&module=charter§ion=charterList&vision=or');
|
||||
if(!$oldCharterFileConfig) return false;
|
||||
|
||||
$projectApprovalFiles = array();
|
||||
foreach($oldCharterFileConfig as $oldCharterFile) $projectApprovalFiles[] = array('index' => $oldCharterFile->key, 'name' => $oldCharterFile->value);
|
||||
|
||||
$charterFiles = json_decode($this->config->custom->charterFiles, true);
|
||||
foreach($charterFiles as $index => $charterFile) $charterFiles[$index]['projectApproval'] = $projectApprovalFiles;
|
||||
|
||||
$this->loadModel('setting')->setItem('system.custom.charterFiles', json_encode($charterFiles));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user