2013-06-12 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_reporting.php: fixed the empty serialize vars.
	
	Fixes: #2276
	
	MERGED FROM THE BRANCH PANDORA_4.0




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8305 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-06-12 16:09:10 +00:00
parent 13c6d0e3e0
commit e0782a7522
2 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2013-06-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: fixed the empty serialize vars.
Fixes: #2276
MERGED FROM THE BRANCH PANDORA_4.0
2013-06-12 Miguel de Dios <miguel.dedios@artica.es>
* operation/tree.php: improved the source code style.

View File

@ -4184,16 +4184,18 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
foreach ($result as $row) {
$date = date ($config["date_format"], $row['utimestamp']);
$serialized = $row['datos'];
$rowsUnserialize = (array)$serialized;
if (!empty($content['line_separator'])) {
$rowsUnserialize = explode($line_separator,
$serialized);
if (empty($content['line_separator']) ||
empty($serialized)) {
$rowsUnserialize = array($row['datos']);
}
else {
$rowsUnserialize = explode($content['line_separator'], $serialized);
}
foreach ($rowsUnserialize as $rowUnser) {
$columnsUnserialize = (array)$rowUnser;
if (!empty($content['column_separator'])) {
if (empty($content['column_separator'])) {
$columnsUnserialize = array($rowUnser);
}
else {
$columnsUnserialize = explode($content['column_separator'], $rowUnser);
}