* Add comment.

This commit is contained in:
tianshujie98
2020-11-30 09:23:48 +08:00
parent fb45ee0c56
commit 9d66e7c103
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -646,6 +646,7 @@ class programplanModel extends model
*/
public function update($planID = 0, $projectID = 0)
{
/* Get oldPlan and the data from the post. */
$oldPlan = $this->getByID($planID);
$plan = fixer::input('post')
->setDefault('begin', '0000-00-00')
@@ -655,6 +656,7 @@ class programplanModel extends model
->join('output', ',')
->get();
/* Judgment of required items. */
if($plan->begin == '0000-00-00') dao::$errors['begin'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->begin);
if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end);
@@ -682,6 +684,7 @@ class programplanModel extends model
}
else
{
/* Synchronously update sub-phase permissions. */
$childrenIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq($oldPlan->id)->fetch('id');
if(!empty($childrenIDList)) $this->dao->update(TABLE_PROJECT)->set('acl')->eq($plan->acl)->where('id')->in($childrenIDList)->exec();
+2 -2
View File
@@ -305,7 +305,7 @@ class projectModel extends model
* @param int $copyProjectID
*
* @access public
* @return void
* @return bool|int
*/
public function create($copyProjectID = '')
{
@@ -449,7 +449,7 @@ class projectModel extends model
*
* @param int $projectID
* @access public
* @return array
* @return array|bool
*/
public function update($projectID)
{
+1
View File
@@ -329,6 +329,7 @@ class task extends control
* Edit a task.
*
* @param int $taskID
* @param bool $comment
* @access public
* @return void
*/