* Fix bug for task#54350.

This commit is contained in:
liumengyi
2022-05-19 10:24:14 +08:00
parent b8c091aa27
commit ff4e5ba635
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -555,25 +555,25 @@ class actionModel extends model
if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff);
}
}
elseif($actionName == 'linkedstory')
elseif($actionName == 'linkstory')
{
$extra = '';
foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id ") . ', ' : "#$id, ";
$action->extra = trim(trim($extra), ',');
}
elseif($actionName == 'unlinkedstory')
elseif($actionName == 'unlinkstory')
{
$extra = '';
foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id ") . ', ' : "#$id, ";
$action->extra = trim(trim($extra), ',');
}
elseif($actionName == 'linkedbug')
elseif($actionName == 'linkbug')
{
$extra = '';
foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('bug', 'view') ? html::a(helper::createLink('bug', 'view', "bugID=$id"), "#$id ") . ', ' : "#$id, ";
$action->extra = trim(trim($extra), ',');
}
elseif($actionName == 'unlinkedbug')
elseif($actionName == 'unlinkbug')
{
$extra = '';
foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('bug', 'view') ? html::a(helper::createLink('bug', 'view', "bugID=$id"), "#$id ") . ', ' : "#$id, ";
+4 -4
View File
@@ -702,7 +702,7 @@ class productplan extends control
else
{
$this->productplan->unlinkStory($storyID, $planID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkedstory', '', $storyID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkstory', '', $storyID);
/* if ajax request, send result. */
if($this->server->ajax)
@@ -735,7 +735,7 @@ class productplan extends control
public function batchUnlinkStory($planID, $orderBy = 'id_desc')
{
foreach($this->post->storyIdList as $storyID) $this->productplan->unlinkStory($storyID, $planID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkedstory', '', implode(',', $this->post->storyIdList));
$this->loadModel('action')->create('productplan', $planID, 'unlinkstory', '', implode(',', $this->post->storyIdList));
echo js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story&orderBy=$orderBy"), 'parent');
}
@@ -844,7 +844,7 @@ class productplan extends control
else
{
$this->productplan->unlinkBug($bugID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkedbug', '', $bugID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkbug', '', $bugID);
/* if ajax request, send result. */
if($this->server->ajax)
@@ -877,7 +877,7 @@ class productplan extends control
public function batchUnlinkBug($planID, $orderBy = 'id_desc')
{
foreach($this->post->bugIDList as $bugID) $this->productplan->unlinkBug($bugID);
$this->loadModel('action')->create('productplan', $planID, 'unlinkedbug', '', implode(',', $this->post->bugIDList));
$this->loadModel('action')->create('productplan', $planID, 'unlinkbug', '', implode(',', $this->post->bugIDList));
echo js::locate($this->createLink('productplan', 'view', "planID=$planID&type=bug&orderBy=$orderBy"), 'parent');
}
+2 -2
View File
@@ -908,7 +908,7 @@ class productplanModel extends model
$this->story->setStage($storyID);
}
$this->action->create('productplan', $planID, 'linkedstory', '', implode(',', $this->post->stories));
$this->action->create('productplan', $planID, 'linkstory', '', implode(',', $this->post->stories));
}
/**
@@ -956,7 +956,7 @@ class productplanModel extends model
$this->action->create('bug', $bugID, 'linked2plan', '', $planID);
}
$this->action->create('productplan', $planID, 'linkedbug', '', implode(',', $this->post->bugs));
$this->action->create('productplan', $planID, 'linkbug', '', implode(',', $this->post->bugs));
}
/**