diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php
index cf3fa89c655..73907fd5f23 100644
--- a/htdocs/core/lib/json.lib.php
+++ b/htdocs/core/lib/json.lib.php
@@ -54,7 +54,7 @@ function dol_json_encode($elements)
$output = '[';
for ($i = 0, $last = ($num - 1); isset($elements[$i]); ++$i)
{
- if (is_array($elements[$i])) $output.= json_encode($elements[$i]);
+ if (is_array($elements[$i]) || is_object($elements[$i])) $output.= json_encode($elements[$i]);
else $output .= _val($elements[$i]);
if($i !== $last) $output.= ',';
}
diff --git a/htdocs/includes/odtphp/Segment.php b/htdocs/includes/odtphp/Segment.php
index 83dff7f206a..0a3ad21c7f2 100644
--- a/htdocs/includes/odtphp/Segment.php
+++ b/htdocs/includes/odtphp/Segment.php
@@ -34,7 +34,7 @@ class Segment implements IteratorAggregate, Countable
$this->xml = (string) $xml;
$this->odf = $odf;
$zipHandler = $this->odf->getConfig('ZIP_PROXY');
- $this->file = new $zipHandler();
+ $this->file = new $zipHandler($this->odf->getConfig('PATH_TO_TMP'));
$this->_analyseChildren($this->xml);
}
/**
@@ -96,7 +96,7 @@ class Segment implements IteratorAggregate, Countable
$this->file->addFile($imageKey, 'Pictures/' . $imageValue);
}
}
- $this->file->close();
+ $this->file->close();
return $this->xmlParsed;
}
/**
@@ -162,7 +162,7 @@ IMG;
$this->images[$value] = $file;
$this->setVars($key, $xml, false);
return $this;
- }
+ }
/**
* Shortcut to retrieve a child
*
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index ff5c7299ee1..37e10f9d42f 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -885,7 +885,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
else print ''."\n"; // JQuery
print ''."\n"; // Tooltip
print ''."\n"; // JNotify
- if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)) // jQuery fileupload
+ if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload
{
print ''."\n";
}
@@ -1164,7 +1164,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
elseif ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
-
+
// For backward compatibility with old modules
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);