|
13 | 13 | * |
14 | 14 | * |
15 | 15 | */ |
16 | | -require('../../config.inc.php'); |
17 | | - |
18 | | -// Must be included BEFORE common.php |
19 | | -require_once('../../third_party/codeplex/PHPExcel.php'); |
20 | | - |
21 | | -require_once('common.php'); |
22 | | -require_once('displayMgr.php'); |
23 | | -require_once('users.inc.php'); |
24 | | -require_once('exttable.class.php'); |
25 | | -require_once('exec.inc.php'); // used for bug string lookup |
| 16 | +require_once '../../config.inc.php'; |
| 17 | +require_once '../../third_party/codeplex/PHPExcel.php'; // Must be included BEFORE common.php |
| 18 | +require_once 'common.php'; |
| 19 | +require_once 'displayMgr.php'; |
| 20 | +require_once 'users.inc.php'; |
| 21 | +require_once 'exttable.class.php'; |
| 22 | +require_once 'exec.inc.php'; // used for bug string lookup |
26 | 23 |
|
27 | 24 | // IMPORTANT NOTICE/WARNING about XLS generation |
28 | 25 | // Seams that \n are not liked |
@@ -62,8 +59,8 @@ function initScript(&$dbH) { |
62 | 59 |
|
63 | 60 | // done here in order to get some config about images |
64 | 61 | $smarty = new TLSmarty(); |
65 | | -if (!is_null($metrics) and count($metrics) > 0) { |
66 | | - if ($args->addOpAccess) { |
| 62 | +if (!is_null($metrics) && !empty($metrics)) { |
| 63 | + if ($args->addOpAccess) { |
67 | 64 | $links = featureLinks($labels,$smarty->getImages()); |
68 | 65 | } |
69 | 66 |
|
@@ -305,8 +302,7 @@ function initScript(&$dbH) { |
305 | 302 | 'format' => $args->format, |
306 | 303 | 'show_platforms' => $gui->show_platforms); |
307 | 304 |
|
308 | | - $gui->tableSet[] = buildMatrix($gui->dataSet, $args, $tableOpt , |
309 | | - $gui->platformSet,$cfSet); |
| 305 | + $gui->tableSet[] = buildMatrix($gui->dataSet, $args, $gui->platformSet, $tableOpt, $cfSet); |
310 | 306 | break; |
311 | 307 | } |
312 | 308 |
|
@@ -522,7 +518,7 @@ function buildMailCfg(&$guiObj) |
522 | 518 | * return tlExtTable |
523 | 519 | * |
524 | 520 | */ |
525 | | -function buildMatrix($dataSet, &$args, $options = array(), $platforms,$customFieldColumns=null) |
| 521 | +function buildMatrix($dataSet, &$args, $platforms, $options = array(), $customFieldColumns=null) |
526 | 522 | { |
527 | 523 | $default_options = array('bugInterfaceOn' => false,'show_platforms' => false, |
528 | 524 | 'status_not_run' => false,'format' => FORMAT_HTML); |
@@ -910,10 +906,10 @@ function xlsStepOne($oj,$style,$lbl,$gui) |
910 | 906 | foreach($lines2write as $zdx => $fields) |
911 | 907 | { |
912 | 908 | $cdx = $zdx+1; |
913 | | - $oj->setActiveSheetIndex(0)->setCellValue("A{$cdx}", current($fields)) |
914 | | - ->setCellValue("B{$cdx}", end($fields)); |
| 909 | + $oj->setActiveSheetIndex(0)->setCellValue("A[$cdx]", current($fields)) |
| 910 | + ->setCellValue("B[$cdx]", end($fields)); |
915 | 911 | } |
916 | | - $cellArea .= "A{$cdx}"; |
| 912 | + $cellArea .= "A[$cdx]"; |
917 | 913 | $oj->getActiveSheet()->getStyle($cellArea) |
918 | 914 | ->applyFromArray($style['ReportContext']); |
919 | 915 |
|
|
0 commit comments