diff --git a/module/bug/control.php b/module/bug/control.php index b43777dcbc..46a675dd6a 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -646,7 +646,7 @@ class bug extends control /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($bugs) * (count(explode(',', $this->config->bug->custom->batchEditFields)) + 2); - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); /* Set Custom*/ diff --git a/module/common/model.php b/module/common/model.php index 2f317a632b..373e8dafb7 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -915,10 +915,11 @@ class commonModel extends model * Judge Suhosin Setting whether the actual size of post data is large than the setting size. * * @param int $countInputVars + * @static * @access public * @return bool */ - public function judgeSuhosinSetting($countInputVars) + public static function judgeSuhosinSetting($countInputVars) { if(extension_loaded('suhosin')) { diff --git a/module/story/control.php b/module/story/control.php index a6858acf54..738cd26edd 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -458,7 +458,7 @@ class story extends control /* Judge whether the editedStories is too large and set session. */ $countInputVars = count($stories) * (count(explode(',', $this->config->story->custom->batchEditFields)) + 3); - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); $this->view->position[] = $this->lang->story->common; @@ -810,7 +810,7 @@ class story extends control /* Judge whether the editedStories is too large and set session. */ $countInputVars = count($stories) * $this->config->story->batchClose->columns; - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); $this->view->position[] = $this->lang->story->common; diff --git a/module/task/control.php b/module/task/control.php index 14f7c81cb3..c383f350c0 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -371,7 +371,7 @@ class task extends control /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3); - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); /* Set Custom*/ diff --git a/module/testcase/control.php b/module/testcase/control.php index b5cd2e7df7..4145eeb93b 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -706,7 +706,7 @@ class testcase extends control /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($cases) * (count(explode(',', $this->config->testcase->custom->batchEditFields)) + 3); - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); $this->loadModel('story'); @@ -1479,7 +1479,7 @@ class testcase extends control /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($caseData) * 12 + $stepVars; - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars); $this->view->title = $this->lang->testcase->common . $this->lang->colon . $this->lang->testcase->showImport; diff --git a/module/todo/control.php b/module/todo/control.php index 08bfe973c2..21b3ad204e 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -187,7 +187,7 @@ class todo extends control /* Judge whether the edited todos is too large. */ $countInputVars = count($editedTodos) * $columns; - $showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting($countInputVars); + $showSuhosinInfo = common::judgeSuhosinSetting($countInputVars); /* Set Custom*/ foreach(explode(',', $this->config->todo->list->customBatchEditFields) as $field) $customFields[$field] = $this->lang->todo->$field;