+ finish the task #650.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-12-21 01:46:00 +00:00
parent 842c41442d
commit 5c52685cab
13 changed files with 104 additions and 17 deletions
+9 -4
View File
@@ -454,13 +454,18 @@ class bug extends control
* @access public
* @return void
*/
public function edit($bugID)
public function edit($bugID, $comment = false)
{
if(!empty($_POST))
{
$changes = $this->bug->update($bugID);
if(dao::isError()) die(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
$changes = array();
$files = array();
if($comment == false)
{
$changes = $this->bug->update($bugID);
if(dao::isError()) die(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
}
if($this->post->comment != '' or !empty($changes) or !empty($files))
{
$action = !empty($changes) ? 'Edited' : 'Commented';