This commit is contained in:
tianshujie
2021-08-31 10:56:25 +08:00
parent 454ddd6394
commit 1cdf0f171d
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -395,7 +395,7 @@ class commonModel extends model
$iconWord = $objectType == 'doc' ? 'W' : ''; // No ducument icon, print word instead of icon.
$params = '';
if($objectType == 'bug' or $objectType == 'testcase') $params = "productID=$productID";
if(strpos('bug|testcase|story', $objectType) !== false) $params = "productID=$productID";
if($objectType == 'doc') $params = "objectType=&objectID=0&libID=0";
$html .= '<li>' . html::a(helper::createLink($objectType, $createMethod, $params, '', $isOnlyBody), "<i class='icon icon-$objectIcon'>$iconWord</i> " . $lang->createObjects[$objectType], '', $isOnlyBody ? "class='iframe'" : '') . '</li>';
+2
View File
@@ -48,6 +48,8 @@ class story extends control
*/
public function create($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $objectID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '', $type = 'story')
{
if($productID == 0) $this->locate($this->createLink('product', 'create'));
$this->story->replaceURLang($type);
if($this->app->tab == 'product')
{