diff --git a/module/testcase/control.php b/module/testcase/control.php index 9fb683a8cf..47d766ef16 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1365,6 +1365,12 @@ class testcase extends control */ public function export($productID, $orderBy, $taskID = 0, $browseType = '') { + if(strpos($orderBy, 'case') !== false) + { + list($field, $sort) = explode('_', $orderBy); + $orderBy = '`' . $field . '`_' . $sort; + } + $product = $this->loadModel('product')->getById($productID); if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type]; if($_POST) diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index db1001db61..b87f82e4bf 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -131,7 +131,7 @@ id", $case, 'button', '', '', 'showinonlybody'); if(!$isLibCase and $case->auto != 'unit') common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy'); - if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "", '', "class='btn' title='{$lang->testcase->copy}'"); + if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id"), "", '', "class='btn' title='{$lang->testcase->copy}'"); common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin', ''); ?> diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php index 5d55265d62..ea8c25bd69 100644 --- a/module/testtask/view/caseheader.html.php +++ b/module/testtask/view/caseheader.html.php @@ -37,7 +37,7 @@
id", $task, 'button', 'link'); - common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'export'); + common::printIcon('testcase', 'export', "productID=$productID&orderBy=case_desc&taskID=$task->id", '', 'button', '', '', 'export'); common::printIcon('testtask', 'report', "productID=$productID&taskID=$task->id&browseType=$browseType&branchID=$task->branch&moduleID=" . (empty($moduleID) ? '' : $moduleID)); common::printIcon('testtask', 'view', "taskID=$task->id", '', 'button', 'list-alt'); common::printBack($this->session->testtaskList, 'btn btn-link');