* UpDate it.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-04-12 09:03:44 +00:00
parent 4ce74e5b52
commit a101d36dd5
5 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -321,12 +321,12 @@ class doc extends control
$changes = $this->doc->update($docID);
if(dao::isError()) die(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('doc', $docID);
if(!empty($changes) or !empty($files))
if($this->post->comment != '' or !empty($changes) or !empty($files))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
$fileAction = '';
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$actionID = $this->action->create('doc', $docID, $action, $fileAction);
$actionID = $this->action->create('doc', $docID, $action, $fileAction . $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));