From 1b0020ce2df3b56fa5d49e1d32841c1849b44d73 Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Tue, 10 Jan 2012 01:27:33 +0000 Subject: [PATCH] * adjust code for manageMembers in project, if the same account has been selected unset it. --- module/project/model.php | 1 + module/story/control.php | 10 +++------- module/story/view/view.html.php | 2 +- module/testcase/control.php | 13 ++++--------- module/testcase/view/view.html.php | 2 +- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 7bc806911b..283908ef14 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -791,6 +791,7 @@ class projectModel extends model { extract($_POST); + $accounts = array_unique($accounts); foreach($accounts as $key => $account) { if(empty($account)) continue; diff --git a/module/story/control.php b/module/story/control.php index cf982d5e03..a49a078eba 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -236,17 +236,13 @@ class story extends control * @access public * @return void */ - public function edit($storyID, $comment = false) + public function edit($storyID) { $this->loadModel('action'); if(!empty($_POST)) { - $changes = array(); - if($comment == false) - { - $changes = $this->story->update($storyID); - if(dao::isError()) die(js::error(dao::getError())); - } + $changes = $this->story->update($storyID); + if(dao::isError()) die(js::error(dao::getError())); if($this->post->comment != '' or !empty($changes)) { $action = !empty($changes) ? 'Edited' : 'Commented'; diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 8f7ff3d003..a751b4f8a0 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -65,7 +65,7 @@