* Finish task #9095.

This commit is contained in:
tianshujie98
2021-01-26 14:10:23 +08:00
parent 704c2b0bb0
commit 570b32a2d4
8 changed files with 365 additions and 306 deletions
-10
View File
@@ -364,16 +364,6 @@ class custom extends control
$data = fixer::input('post')->get();
/* Judgment of required items. */
if(($unit != $_POST['hourPoint']) and empty($_POST['scaleFactor']))
{
dao::$errors['scaleFactor'] = sprintf($this->lang->error->notempty, $this->lang->custom->convertRelations);
$this->send(array('result' => 'fail', 'message' => dao::getError()));
}
elseif(($unit != $_POST['hourPoint']) and !is_numeric($_POST['scaleFactor']))
{
dao::$errors['scaleFactor'] = sprintf($this->lang->error->float, $this->lang->custom->convertRelations);
$this->send(array('result' => 'fail', 'message' => dao::getError()));
}
$this->setting->setItem('system.custom.hourPoint', $data->hourPoint);
$this->setting->setItem('system.custom.scaleFactor', $data->scaleFactor);