* adjust for save file not with extension.

This commit is contained in:
wangyidong
2017-06-26 14:47:58 +08:00
parent c8f4f4fc0f
commit 794fb575db
20 changed files with 118 additions and 99 deletions
+3 -3
View File
@@ -90,7 +90,7 @@ class testreportModel extends model
->remove('files,labels,uid')
->get();
$data = $this->loadModel('file')->processEditor($date, $this->config->testreport->editor->create['id'], $this->post->uid);
$data = $this->loadModel('file')->processImgURL($date, $this->config->testreport->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_TESTREPORT)->data($data)->autocheck()
->batchCheck($this->config->testreport->create->requiredFields, 'notempty')
->batchCheck('start,end', 'notempty')
@@ -122,7 +122,7 @@ class testreportModel extends model
->join('members', ',')
->remove('files,labels,uid')
->get();
$data = $this->loadModel('file')->processEditor($date, $this->config->testreport->editor->edit['id'], $this->post->uid);
$data = $this->loadModel('file')->processImgURL($date, $this->config->testreport->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TESTREPORT)->data($data)->autocheck()
->batchCheck($this->config->testreport->edit->requiredFields, 'notempty')
->batchCheck('start,end', 'notempty')
@@ -145,7 +145,7 @@ class testreportModel extends model
public function getById($reportID)
{
$report = $this->dao->select('*')->from(TABLE_TESTREPORT)->where('id')->eq($reportID)->fetch();
$report = $this->loadModel('file')->revertRealSRC($report, 'report');
$report = $this->loadModel('file')->replaceImgURL($report, 'report');
$report->files = $this->file->getByObject('testreport', $reportID);
return $report;
}