* Fix bug when create task and story error.
This commit is contained in:
@@ -978,7 +978,7 @@ class story extends control
|
||||
$version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version');
|
||||
$files = $this->loadModel('file')->saveUpload($story->type, $storyID, $version);
|
||||
|
||||
if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
|
||||
if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
|
||||
|
||||
if($this->post->comment != '' or !empty($changes) or !empty($files))
|
||||
{
|
||||
|
||||
@@ -465,7 +465,7 @@ class task extends control
|
||||
$changes = $this->task->update($taskID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('task', $taskID);
|
||||
if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
|
||||
if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
|
||||
}
|
||||
|
||||
$task = $this->task->getById($taskID);
|
||||
|
||||
Reference in New Issue
Block a user