Bug 28795
This commit is contained in:
@@ -919,15 +919,16 @@ class execution extends control
|
||||
* View a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function storyView($storyID)
|
||||
public function storyView($storyID, $executionID = 0)
|
||||
{
|
||||
$this->session->set('productList', $this->app->getURI(true), 'product');
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->execution);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . ($executionID ? $executionID : $this->session->execution));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+19
-1
@@ -318,7 +318,7 @@ class file extends control
|
||||
$this->view->method = $method;
|
||||
$this->view->showDelete = $showDelete;
|
||||
|
||||
if(strpos('view,edit', $method) !== false) return $this->display('file', 'viewfiles');
|
||||
if(strpos('view,edit', $method) !== false and $this->app->clientDevice != 'mobile') return $this->display('file', 'viewfiles');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -353,8 +353,26 @@ class file extends control
|
||||
if($file->objectType == 'testcase' and $file->title != $fileName) $this->file->updateTestcaseVersion($file);
|
||||
$newFile = $this->file->getByID($fileID);
|
||||
|
||||
if($this->app->clientDevice == 'mobile') return print(js::reload('parent.parent'));
|
||||
echo json_encode($newFile);
|
||||
}
|
||||
|
||||
if($this->app->clientDevice == 'mobile')
|
||||
{
|
||||
$file = $this->file->getById($fileID);
|
||||
if(strrpos($file->title, '.') !== false)
|
||||
{
|
||||
/* Fix the file name exe.exe */
|
||||
$title = explode('.', $file->title);
|
||||
$extension = end($title);
|
||||
if($file->extension == 'txt' && $extension != $file->extension) $file->extension = $extension;
|
||||
array_pop($title);
|
||||
$file->title = join('.', $title);
|
||||
}
|
||||
|
||||
$this->view->file = $file;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1262,7 +1262,8 @@ class story extends control
|
||||
$from = $this->app->tab;
|
||||
if($from == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($param);
|
||||
$result = $this->execution->setMenu($param);
|
||||
if($result) return;
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
|
||||
@@ -4646,7 +4646,7 @@ class storyModel extends model
|
||||
}
|
||||
elseif($tab == 'execution')
|
||||
{
|
||||
$storyLink = helper::createLink('execution', 'storyView', "storyID=$story->id");
|
||||
$storyLink = helper::createLink('execution', 'storyView', "storyID=$story->id&execution={$this->session->execution}");
|
||||
$canView = common::hasPriv('execution', 'storyView');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user