* Code for task#106493.

This commit is contained in:
xieqiyu
2023-11-23 09:59:19 +08:00
parent eaa385547e
commit 2ea974ac8d
2 changed files with 12 additions and 9 deletions
+3
View File
@@ -18,3 +18,6 @@ $config->admin->form->sso['key'] = array('type' => 'string', 'required' =>
$config->admin->form->setmodule = array();
$config->admin->form->setmodule['module'] = array('type'=> 'array', 'required' => true, 'default' => array('myScore' => 0, 'productRoadmap' => 1, 'productTrack' => 1, 'productUR' => 1, 'otherDevops' => 1, 'otherKanban' => 1));
$config->admin->form->log = array();
$config->admin->form->log['days'] = array('type' => 'int', 'required' => true, 'default' => 30);
+9 -9
View File
@@ -289,8 +289,7 @@ class admin extends control
return print(js::locate($this->createLink('mail', 'ztCloud'), 'parent'));
}
$this->view->title = $this->lang->admin->certifyEmail;
$this->view->title = $this->lang->admin->certifyEmail;
$this->view->email = helper::safe64Decode($email);
$this->display();
}
@@ -312,8 +311,7 @@ class admin extends control
return print(js::locate($this->createLink('mail', 'ztCloud'), 'parent'));
}
$this->view->title = $this->lang->admin->certifyMobile;
$this->view->title = $this->lang->admin->certifyMobile;
$this->view->mobile = helper::safe64Decode($mobile);
$this->display();
}
@@ -334,14 +332,14 @@ class admin extends control
return print(js::locate($this->createLink('mail', 'ztCloud'), 'parent'));
}
$this->view->title = $this->lang->admin->ztCompany;
$this->view->title = $this->lang->admin->ztCompany;
$this->view->fields = explode(',', $fields);
$this->display();
}
/**
* Ajax send code.
* 获取验证码。
* Get the verification code.
*
* @param string $type
* @access public
@@ -353,6 +351,7 @@ class admin extends control
}
/**
* 设置日志保存天数。
* Set save days of log.
*
* @access public
@@ -362,9 +361,10 @@ class admin extends control
{
if($_POST)
{
if(!validater::checkInt($this->post->days)) return $this->send(array('result' => 'fail', 'message' => array('days' => sprintf($this->lang->admin->notice->int, $this->lang->admin->days))));
$days = form::data()->get()->days;
if(!validater::checkInt($days)) return $this->send(array('result' => 'fail', 'message' => array('days' => sprintf($this->lang->admin->notice->int, $this->lang->admin->days))));
$this->loadModel('setting')->setItem('system.admin.log.saveDays', $this->post->days);
$this->loadModel('setting')->setItem('system.admin.log.saveDays', (string)$days);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true, 'closeModal' => true));
}