Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-03-15 23:48:14 +01:00
commit 6f95a7c2b1
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/ * or see http://www.gnu.org/
* *
* Get a distant dump file and load it into a mysql database * Get a distant dump file and load it into a mysql database
*/ */
@ -92,7 +92,7 @@ if ($connection)
{ {
if (! @ssh2_auth_password($connection, $login, $password)) if (! @ssh2_auth_password($connection, $login, $password))
{ {
dol_syslog("Could not authenticate with username ".$login." . and password ".$password,LOG_ERR); dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password),LOG_ERR);
exit(-5); exit(-5);
} }
else else

View File

@ -1451,7 +1451,7 @@ function dol_set_user_param($db, $conf, &$user, $tab)
foreach ($tab as $key => $value) foreach ($tab as $key => $value)
{ {
if ($i > 0) $sql.=','; if ($i > 0) $sql.=',';
$sql.="'".$this->db->escape($key)."'"; $sql.="'".$db->escape($key)."'";
$i++; $i++;
} }
$sql.= ")"; $sql.= ")";
@ -1472,7 +1472,7 @@ function dol_set_user_param($db, $conf, &$user, $tab)
{ {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,entity,param,value)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,entity,param,value)";
$sql.= " VALUES (".$user->id.",".$conf->entity.","; $sql.= " VALUES (".$user->id.",".$conf->entity.",";
$sql.= " '".$this->db->escape($key)."','".$db->escape($value)."')"; $sql.= " '".$db->escape($key)."','".$db->escape($value)."')";
dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG); dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG);
$result=$db->query($sql); $result=$db->query($sql);