* fix a bug for showImport.
This commit is contained in:
+14
-14
@@ -838,27 +838,27 @@ class testcase extends control
|
||||
|
||||
if($field == 'story')
|
||||
{
|
||||
if($cellValue == 0)
|
||||
if(strrpos($cellValue, '(#') !== false)
|
||||
{
|
||||
$case->$field = 0;
|
||||
}
|
||||
elseif(preg_match('/^#\d+$/', $cellValue))
|
||||
{
|
||||
$case->$field = substr($cellValue, 1);
|
||||
}
|
||||
$id = trim(substr($cellValue, strrpos($cellValue,'(#') + 2), ')');
|
||||
$case->$field = $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selectedID = 0;
|
||||
foreach($stories as $id => $story)
|
||||
{
|
||||
if(strpos($story, $cellValue) !== false) $selectedID = $id;
|
||||
}
|
||||
$case->$field = $selectedID;
|
||||
$case->$field = 0;
|
||||
}
|
||||
}
|
||||
elseif($field == 'module')
|
||||
{
|
||||
$case->$field = array_search($cellValue, $modules);
|
||||
if(strrpos($cellValue, '(#') !== false)
|
||||
{
|
||||
$id = trim(substr($cellValue, strrpos($cellValue,'(#') + 2), ')');
|
||||
$case->$field = $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$case->$field = 0;
|
||||
}
|
||||
}
|
||||
elseif(in_array($field, $caseConfig->export->listFields))
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ function closeWindow()
|
||||
<table class='table-1 mt-10px'>
|
||||
<caption><?php echo $lang->testcase->exportTemplet?></caption>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<td align='center' style="padding:30px">
|
||||
<?php
|
||||
echo $lang->testcase->num;
|
||||
echo html::input('num', '10');
|
||||
@@ -31,7 +31,7 @@ function closeWindow()
|
||||
echo html::submitButton();
|
||||
?>
|
||||
</td>
|
||||
<tr>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<table class='table-1 mt-10px'>
|
||||
<caption><?php echo $lang->testcase->import?></caption>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<td align='center' style="padding:30px">
|
||||
<input type='file' name='file'/>
|
||||
<?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8');?>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
<tr>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user