* adjust code.

This commit is contained in:
wangyidong
2017-03-21 15:06:38 +08:00
parent a6c7eed490
commit dc812fd161
41 changed files with 181 additions and 429 deletions
+3 -4
View File
@@ -370,10 +370,9 @@ class task extends control
$tasks = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($taskIDList)->fetchAll('id');
/* Judge whether the editedTasks is too large and set session. */
$showSuhosinInfo = false;
$showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting(count($tasks), count(explode(',', $this->config->task->custom->batchEditFields)) + 3);
$this->app->session->set('showSuhosinInfo', $showSuhosinInfo);
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? $this->lang->suhosinInfo : $this->lang->maxVarsInfo;
$countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3);
$showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars);
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
/* Set Custom*/
foreach(explode(',', $this->config->task->customBatchEditFields) as $field) $customFields[$field] = $this->lang->task->$field;