diff --git a/module/custom/control.php b/module/custom/control.php index e08553c235..ebc3f740a2 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -395,7 +395,7 @@ class custom extends control $this->lang->custom->menu = new stdclass(); $this->lang->navGroup->custom = 'system'; - if(strtolower($this->server->request_method) == "post") + if($_POST) { $data = fixer::input('post')->get(); $this->loadModel('setting')->setItem('system.custom.planStatus', $data->planStatus); diff --git a/module/durationestimation/config.php b/module/durationestimation/config.php index 75689ab17f..14492e4944 100644 --- a/module/durationestimation/config.php +++ b/module/durationestimation/config.php @@ -1,4 +1,4 @@ durationestimation = new stdclass; -$config->durationestimation->index = new stdclass; +$config->durationestimation = new stdclass(); +$config->durationestimation->index = new stdclass(); $config->durationestimation->index->requiredFields = 'scale,productivity,scale,duration,unitLaborCost,totalLaborCost'; diff --git a/module/durationestimation/control.php b/module/durationestimation/control.php index 9f2b55a3a4..e9d8998aeb 100644 --- a/module/durationestimation/control.php +++ b/module/durationestimation/control.php @@ -1,13 +1,13 @@ * @package durationestimation * @version $Id$ - * @link http://www.chanzhi.org + * @link http://www.zentao.net */ class durationestimation extends control { @@ -51,7 +51,9 @@ class durationestimation extends control $total = 0; foreach($this->post->workload as $value) $total += $value; if($total != 100) $this->send(array('result' => 'fail', 'message' => $this->lang->durationestimation->workloadError)); + $this->durationestimation->save($programID); + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('index', "currentProgram={$programID}"))); }