Merge branch 'sprint/186_tianshujie_fixbug' into 'sprint/185'

Sprint/186 tianshujie fixbug

See merge request easycorp/zentaopms!1946
This commit is contained in:
孙广明
2022-02-24 05:38:40 +00:00
2 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ js::set('hasTaskButton', $hasTaskButton);
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$executionID", '', true), $lang->execution->importBug, '', "class='ifram'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='ifram'") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
</ul>
</div>
+12 -4
View File
@@ -62,7 +62,7 @@ class fileModel extends model
else
{
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = '/data/course/' . $file->pathname;
$file->webPath = 'data/course/' . $file->pathname;
}
}
@@ -81,9 +81,17 @@ class fileModel extends model
$file = $this->dao->findById($fileID)->from(TABLE_FILE)->fetch();
if(empty($file)) return false;
$realPathName = $this->getRealPathName($file->pathname);
$file->realPath = $this->savePath . $realPathName;
$file->webPath = $this->webPath . $realPathName;
if($file->objectType != 'traincourse' and $file->objectType != 'traincontents')
{
$realPathName = $this->getRealPathName($file->pathname);
$file->realPath = $this->savePath . $realPathName;
$file->webPath = $this->webPath . $realPathName;
}
else
{
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = 'data/course/' . $file->pathname;
}
return $file;
}