projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e98f27f
)
Fix #5642 - Report designer - hebe
author
Edward
<edward@roojs.com>
Mon, 7 Jan 2019 07:22:15 +0000
(15:22 +0800)
committer
Edward
<edward@roojs.com>
Mon, 7 Jan 2019 07:22:15 +0000
(15:22 +0800)
Pman/Roo.php
patch
|
blob
|
history
diff --git
a/Pman/Roo.php
b/Pman/Roo.php
index
e116afa
..
78c897f
100644
(file)
--- a/
Pman/Roo.php
+++ b/
Pman/Roo.php
@@
-454,11
+454,18
@@
class Pman_Roo extends Pman
if ($cols == '*') { /// did we get cols sent to us?
$cols = array_keys($x);
}
if ($cols == '*') { /// did we get cols sent to us?
$cols = array_keys($x);
}
+
+ if(!is_array($cols)) {
+ $cols = explode(',', $cols);
+ }
if ($titles !== false) {
if ($titles== '*') {
$titles= array_keys($x);
}
if ($titles !== false) {
if ($titles== '*') {
$titles= array_keys($x);
}
+ if(!is_array($titles)) {
+ $titles = explode(',', $titles);
+ }
foreach($cols as $i=>$col) {
$se_config['cols'][] = array(
'header'=> isset($titles[$i]) ? $titles[$i] : $col,
foreach($cols as $i=>$col) {
$se_config['cols'][] = array(
'header'=> isset($titles[$i]) ? $titles[$i] : $col,
@@
-494,13
+501,24
@@
class Pman_Roo extends Pman
foreach($data as $x) {
//echo "<PRE>"; print_r(array($_REQUEST['csvCols'], $x->toArray())); exit;
$line = array();
foreach($data as $x) {
//echo "<PRE>"; print_r(array($_REQUEST['csvCols'], $x->toArray())); exit;
$line = array();
- if ($titles== '*') {
- $titles= array_keys($x);
- }
+
if ($cols== '*') {
$cols= array_keys($x);
}
if ($cols== '*') {
$cols= array_keys($x);
}
+
+ if(!is_array($cols)) {
+ $cols = explode(',', $cols);
+ }
+
if ($titles !== false) {
if ($titles !== false) {
+ if ($titles== '*') {
+ $titles= array_keys($x);
+ }
+
+ if(!is_array($titles)) {
+ $titles = explode(',', $titles);
+ }
+
foreach($cols as $i=>$col) {
$se_config['cols'][] = array(
'header'=> isset($titles[$i]) ? $titles[$i] : $col,
foreach($cols as $i=>$col) {
$se_config['cols'][] = array(
'header'=> isset($titles[$i]) ? $titles[$i] : $col,
@@
-520,17
+538,15
@@
class Pman_Roo extends Pman
$titles = false;
}
$titles = false;
}
-
-
$se->addLine($se_config['workbook'], $x);
}
$se->addLine($se_config['workbook'], $x);
}
+
if(!$se){
$this->jerr('no data found');
}
if(!$se){
$this->jerr('no data found');
}
+
$se->send($fn .'.xls');
exit;
$se->send($fn .'.xls');
exit;
-
-
}
}