diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 4304437196a..5007dca817f 100755
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -54,7 +54,7 @@ abstract class CommonDocGenerator
'myuser_fax'=>$user->office_fax,
'myuser_mobile'=>$user->user_mobile,
'myuser_email'=>$user->email,
- //'myuser_web'=>$user->url // FIXME url not exist in $user object
+ 'myuser_web'=>'' // url not exist in $user object
);
}
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 97481a4edf4..514d6e06cad 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -383,7 +383,7 @@ class Conf
if (! isset($this->global->MAIN_MAX_DECIMALS_SHOWN)) $this->global->MAIN_MAX_DECIMALS_SHOWN=8;
// Default max file size for upload
- $this->maxfilesize = (! empty($this->global->MAIN_UPLOAD_DOC) ? $this->global->MAIN_UPLOAD_DOC * 1024 : 2097152);
+ $this->maxfilesize = (! empty($this->global->MAIN_UPLOAD_DOC) ? $this->global->MAIN_UPLOAD_DOC * 1024 : 0);
// Timeouts
if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10;
diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php
index 7bb8b77f399..dc33a4eb17d 100644
--- a/htdocs/core/db/mysql.class.php
+++ b/htdocs/core/db/mysql.class.php
@@ -714,10 +714,10 @@ class DoliDBMysql
global $conf;
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
- $cryptType = (isset($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
+ $cryptType = (! empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
- $cryptKey = (! empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
+ $cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
$return = ($withQuotes?"'":"").$this->escape($fieldorvalue).($withQuotes?"'":"");
@@ -747,7 +747,7 @@ class DoliDBMysql
global $conf;
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
- $cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
+ $cryptType = (!empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php
index 4d4b9d9be1b..8db96ca32a1 100644
--- a/htdocs/core/db/mysqli.class.php
+++ b/htdocs/core/db/mysqli.class.php
@@ -709,10 +709,10 @@ class DoliDBMysqli
global $conf;
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
- $cryptType = (isset($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
+ $cryptType = (!empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
- $cryptKey = (! empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
+ $cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
$return = ($withQuotes?"'":"").$this->escape($fieldorvalue).($withQuotes?"'":"");
@@ -742,7 +742,7 @@ class DoliDBMysqli
global $conf;
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
- $cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
+ $cryptType = (!empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 86ad6f2a2fb..77449463d57 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3034,12 +3034,12 @@ function get_exdir($num,$level=3,$alpha=0,$withoutslash=0)
* Creation of a directory (this can create recursive subdir)
*
* @param string $dir Directory to create (Separator must be '/'. Example: '/mydir/mysubdir')
- * @param string $dataroot Data root directory (to avoid having the data root in the loop)
+ * @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning on first dir PHP has no permission when open_basedir is used)
* @return int < 0 if KO, 0 = already exists, > 0 if OK
*/
function dol_mkdir($dir, $dataroot='')
{
- global $db, $conf;
+ global $conf;
dol_syslog("functions.lib::dol_mkdir: dir=".$dir,LOG_INFO);
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 0e676200fcb..f07b72c4d2f 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -1170,7 +1170,7 @@ abstract class DolibarrModules
$err=0;
- if (isset($this->dirs) && is_array($this->dirs) && ! empty($this->dirs))
+ if (isset($this->dirs) && is_array($this->dirs))
{
foreach ($this->dirs as $key => $value)
{
diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php
index ba4c61555a4..87c0db7a972 100644
--- a/htdocs/core/modules/import/modules_import.php
+++ b/htdocs/core/modules/import/modules_import.php
@@ -94,12 +94,12 @@ class ModeleImports
// Picto
$this->picto[$module->id]=$module->picto;
// Driver properties
- $this->_driverlabel[$module->id]=$module->getDriverLabel();
- $this->_driverdesc[$module->id]=$module->getDriverDesc();
- $this->_driverversion[$module->id]=$module->getDriverVersion();
+ $this->_driverlabel[$module->id]=$module->getDriverLabel('');
+ $this->_driverdesc[$module->id]=$module->getDriverDesc('');
+ $this->_driverversion[$module->id]=$module->getDriverVersion('');
// If use an external lib
- $this->_liblabel[$module->id]=$module->getLibLabel();
- $this->_libversion[$module->id]=$module->getLibVersion();
+ $this->_liblabel[$module->id]=$module->getLibLabel('');
+ $this->_libversion[$module->id]=$module->getLibVersion('');
$i++;
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 3c1b9e99493..d8f30d69d96 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1000,7 +1000,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print ''."\n";
}
// jQuery File Upload
- if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || defined('REQUIRE_JQUERY_FILEUPLOAD'))
+ if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD')))
{
print ''."\n";
print ''."\n";