From 22147a542c3c7bd35ed2834d6fa8eb7c6aa8f40b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Feb 2022 11:02:55 +0800 Subject: [PATCH 1/3] * Fix Kanban import bug menu error. --- module/execution/view/kanban.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 0262c60045..9fb867869f 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -170,7 +170,7 @@ js::set('hasTaskButton', $hasTaskButton); ' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '';?> ';?> ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '';?> - ' . html::a(helper::createLink('execution', 'importBug', "executionID=$executionID", '', true), $lang->execution->importBug, '', "class='ifram'") . '';?> + ' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='ifram'") . '';?> ' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '';?> From f7f9450c7983507cbc2cb0956789c4b992be7024 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Feb 2022 12:11:45 +0800 Subject: [PATCH 2/3] * Modify course playback path. --- module/file/model.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/module/file/model.php b/module/file/model.php index 399f895d1c..fd3080760e 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -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 = $this->app->getWwwRoot() . '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 = $this->app->getWwwRoot() . 'data/course/' . $file->pathname; + } return $file; } From 70a665df3c0c65b64489005614f0d170d1d79ac3 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Feb 2022 13:11:48 +0800 Subject: [PATCH 3/3] * Modify course loading path. --- module/file/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/file/model.php b/module/file/model.php index fd3080760e..c666989beb 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -62,7 +62,7 @@ class fileModel extends model else { $file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname; - $file->webPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname; + $file->webPath = 'data/course/' . $file->pathname; } } @@ -90,7 +90,7 @@ class fileModel extends model else { $file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname; - $file->webPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname; + $file->webPath = 'data/course/' . $file->pathname; } return $file; }