Merge remote-tracking branch 'origin/3.6' into develop

Conflicts:
	htdocs/admin/dict.php
	htdocs/core/db/mysql.class.php
	htdocs/core/db/mysqli.class.php
	htdocs/core/lib/ajax.lib.php
This commit is contained in:
Laurent Destailleur 2014-08-17 19:34:12 +02:00
commit be6f99c10e
8 changed files with 27 additions and 17 deletions

View File

@ -204,20 +204,23 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
Fix: Fusion PDF button on unpaid invoice is no more displayed
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click)
Fix: Fusion PDF button on unpaid invoice is no more displayed.
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click).
Fix: Pb when showing log list of holiday module with some mysql versions.
Fix: Error with bad timezone pushed by some browsers.
Fix: shipping list SQL request was not filtering on shipping element
Fix: debian package provided by dolibarr team must use embedded libraries.
Fix: [ bug #1528 ] Leopard Services numeration module description is not translated.
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas
Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances.
Fix: Update impayees.php
Fix: Link product, In list view and label product
Fix: Link product, In list view and label product.
Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
Fix: When disabled, all fields to add time into task line must be disabled.
Fix: Missing include files.lib.php in some pages that use dol_delete_recursive
Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive.
Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref.
Fix: [ bug #1553 ] Saving User displays setup removes menu.
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.

View File

@ -570,7 +570,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$result = $db->query($sql);
if ($result) // Add is ok
{
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
setEventMessage($langs->transnoentities("RecordSaved"));
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
}
else
{

View File

@ -680,6 +680,7 @@ class ExtraFields
}
$out.='<select class="flat" name="options_'.$key.$keyprefix.'" id="options_'.$key.$keyprefix.'" '.($moreparam?$moreparam:'').'>';
$out.='<option value="0">&nbsp;</option>';
foreach ($param['options'] as $key=>$val )
{
list($val, $parent) = explode('|', $val);

View File

@ -274,8 +274,7 @@ class DoliDBMysql extends DoliDB
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR);
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERR);
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterrno." ".$this->lasterror, LOG_ERR);
}
$this->lastquery=$query;
$this->_results = $ret;
@ -833,6 +832,11 @@ class DoliDBMysql extends DoliDB
{
return -1;
}
else
{
// If user already exists, we continue to set permissions
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
}
}
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log

View File

@ -277,8 +277,7 @@ class DoliDBMysqli extends DoliDB
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR);
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERR);
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterrno." ".$this->lasterror, LOG_ERR);
}
$this->lastquery=$query;
$this->_results = $ret;
@ -838,6 +837,11 @@ class DoliDBMysqli extends DoliDB
{
return -1;
}
else
{
// If user already exists, we continue to set permissions
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
}
}
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log

View File

@ -985,7 +985,8 @@ class DoliDBPgsql extends DoliDB
*/
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
$sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."' with password '".$this->escape($dolibarr_main_db_pass)."'";
// Note: using ' on user does not works with pgsql
$sql = "CREATE USER ".$this->escape($dolibarr_main_db_user)." with password '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
$resql=$this->query($sql);

View File

@ -1075,7 +1075,7 @@ else
$type = $langs->trans('Product');
if ($object->isservice()) $type = $langs->trans('Service');
print_fiche_titre($langs->trans('Modify').' '.$type.' : '.$object->ref, "");
print_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), "");
// Main official, simple, and not duplicated code
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n";

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro.com>
*
@ -87,8 +87,6 @@ if ($action == 'update' && ($caneditfield || ! empty($user->admin)))
if ($_POST["check_MAIN_LANG_DEFAULT"]=="on") $tabparam["MAIN_LANG_DEFAULT"]=$_POST["main_lang_default"];
else $tabparam["MAIN_LANG_DEFAULT"]='';
$tabparam["MAIN_MENU_STANDARD"]=$_POST["MAIN_MENU_STANDARD"];
if ($_POST["check_SIZE_LISTE_LIMIT"]=="on") $tabparam["MAIN_SIZE_LISTE_LIMIT"]=$_POST["main_size_liste_limit"];
else $tabparam["MAIN_SIZE_LISTE_LIMIT"]='';
@ -101,8 +99,6 @@ if ($action == 'update' && ($caneditfield || ! empty($user->admin)))
$result=dol_set_user_param($db, $conf, $fuser, $tabparam);
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
}