From bf2d61515d4e8bc68605539386100236f6b05e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sun, 16 Jun 2013 21:33:05 +0200 Subject: [PATCH 1/6] CR fix Git required me to commit these changes --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/lib/ajax.lib.php | 22 +- htdocs/core/menus/standard/auguria.lib.php | 2 +- test/soapui/Dolibarr-soapui-project.xml | 560 ++++++++++----------- 4 files changed, 293 insertions(+), 293 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a3c1ed0acd9..86eb04b970f 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -450,7 +450,7 @@ class FormFile $langs->load("errors"); $genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated")); } - if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; + if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; $out.= $genbutton; $out.= ''; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 7f82247397c..5045283abe3 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -312,17 +312,17 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0) /* Some properties for combobox: minLengthToAutocomplete: 2, - comboboxContainerClass: "comboboxContainer", - comboboxValueContainerClass: "comboboxValueContainer", - comboboxValueContentClass: "comboboxValueContent", - comboboxDropDownClass: "comboboxDropDownContainer", - comboboxDropDownButtonClass: "comboboxDropDownButton", - comboboxDropDownItemClass: "comboboxItem", - comboboxDropDownItemHoverClass: "comboboxItemHover", - comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", - comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", - animationType: "slide", - width: "500px" */ + comboboxContainerClass: "comboboxContainer", + comboboxValueContainerClass: "comboboxValueContainer", + comboboxValueContentClass: "comboboxValueContent", + comboboxDropDownClass: "comboboxDropDownContainer", + comboboxDropDownButtonClass: "comboboxDropDownButton", + comboboxDropDownItemClass: "comboboxItem", + comboboxDropDownItemHoverClass: "comboboxItemHover", + comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", + comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", + animationType: "slide", + width: "500px" */ $msg = ''."\n"; if (constant('JS_JQUERY_UI')) print ''."\n"; else print ''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; // jQuery Layout if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) From 834a3fd3c567517832607bca42c81a7185aaaa88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Jun 2013 14:12:59 +0200 Subject: [PATCH 4/6] Qual: Clean code. Removed useless functions and params --- htdocs/core/lib/date.lib.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 29870c1ce95..6802d9d8cd2 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -163,21 +163,6 @@ function getParentCompanyTimeZoneInt($refgmtdate='now') }*/ -/** - * Add a delay of a timezone to a date - * - * @param timestamp $time Date timestamp - * @param string $timezone Timezone - * @return timestamp New timestamp - */ -function dol_time_plus_timezone($time,$timezone) -{ - // TODO Finish function - - return $time; -} - - /** * Add a delay to a date * @@ -329,14 +314,12 @@ function convertSecondToTime($iSecond,$format='all',$lengthOfDay=86400,$lengthOf * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore) * @param int $gm 1 =Input date is GM date, * 0 =Input date is local date using PHP server timezone - * -1=Input date is local date using timezone provided as third parameter - * @param string $tz Timezone to use. This means param $gm=-1 * @return date Date * 19700101020000 -> 7200 with gm=1 * * @see dol_print_date, dol_mktime, dol_getdate */ -function dol_stringtotime($string, $gm=1, $tz='') +function dol_stringtotime($string, $gm=1) { // Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used. if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i',$string,$reg)) @@ -380,10 +363,6 @@ function dol_stringtotime($string, $gm=1, $tz='') $string=preg_replace('/([^0-9])/i','',$string); $tmp=$string.'000000'; $date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),($gm?1:0)); - if ($gm == -1) - { - $date=dol_time_plus_timezone($date,$tz); - } return $date; } From ac16127894df05f45c4eebd1e76341803389352f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Jun 2013 14:47:14 +0200 Subject: [PATCH 5/6] Fix: Solve some problem of redirect when logout --- htdocs/user/logout.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index edd860426aa..77a382d9d0e 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -76,9 +76,10 @@ session_name($sessionname); session_destroy(); dol_syslog("End of session ".$sessionname); -// TODO Not sure this is required +// Not sure this is required unset($_SESSION['dol_login']); unset($_SESSION['dol_entity']); -header("Location: ".$url); -?> +if (GETPOST('noredirect')) return; +header("Location: ".$url); // Default behaviour is redirect to index.php page +?> \ No newline at end of file From 326387ab75517d4d175fba43896c53505a703a29 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Jun 2013 15:00:40 +0200 Subject: [PATCH 6/6] Fix: Missing lang --- htdocs/societe/class/companybankaccount.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index add9a5f1b5c..5a18c9b9bcc 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -194,6 +194,8 @@ class CompanyBankAccount extends Account */ function getRibLabel() { + global $langs; + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) { $rib = $this->code_banque." ".$this->code_guichet." ".$this->number;