From 213a64edcc9c2d379246a47934ad4bc8b92d224e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Feb 2014 01:36:15 +0100 Subject: [PATCH 1/4] Fix for missing param. --- htdocs/comm/propal/class/propal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 7a9e2301191..7dfb5a506e1 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1629,7 +1629,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers * @return int <0 if KO, >0 if OK */ - function reopen($user, $statut, $note, $notrigger=0) + function reopen($user, $statut, $note='', $notrigger=0) { global $langs,$conf; From e62b6c1cc4e89c3d4e87f8451abbe188f1d09a11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Feb 2014 16:09:21 +0100 Subject: [PATCH 2/4] Fix: Not using correct vars names --- htdocs/install/check.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 6690f6fc61f..5d9b2effb09 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -393,7 +393,7 @@ else foreach ($migrationscript as $migarray) { $count++; - $version=preg_split('/[\.-]/',DOL_VERSION); + $version=DOL_VERSION; $versionfrom=$migarray['from']; $versionto=$migarray['to']; $versionarray=preg_split('/[\.-]/',$version); @@ -403,7 +403,7 @@ else $newversionfrom=preg_replace('/(\.[0-9]+)$/i','.*',$versionfrom); $newversionto=preg_replace('/(\.[0-9]+)$/i','.*',$versionto); $newversionfrombis=''; - if (versioncompare($dolibarrversiontoarray,$version) < -2) // From x.y.z -> x.y.z+1 + if (versioncompare($dolibarrversiontoarray,$versionarray) < -2) // From x.y.z -> x.y.z+1 { $newversionfrombis=' '.$langs->trans("or").' '.$versionto; } @@ -417,7 +417,7 @@ else { // Now we check if this is the first qualified choice if ($allowupgrade && empty($foundrecommandedchoice) && - (versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray,$version) < -2) + (versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray,$versionarray) < -2) ) { print '
'; From 4869b9560156c08c306614b4fe0d518b01ced7b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Feb 2014 00:01:22 +0100 Subject: [PATCH 3/4] Fix: Default size too long making screen hang. --- htdocs/comm/index.php | 2 +- htdocs/comm/propal/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 64ca064063a..989f8fbb245 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -475,7 +475,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index cdd7e6840c9..409d76f2505 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -315,7 +315,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) print '
'.$langs->trans("ProposalsOpened").' ('.$num.')
'; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); From 266b413139ffd9b48546fb0c21be21969f567934 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Feb 2014 00:23:15 +0100 Subject: [PATCH 4/4] Fix: colspan for extrafields --- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/product/fiche.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 869a989e55d..8f45a53e059 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2144,7 +2144,7 @@ abstract class CommonObject $error=0; if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used - + if (! empty($this->array_options)) { // Check parameters @@ -2303,7 +2303,7 @@ abstract class CommonObject $label = ''.$label.''; $out .= ''; - $out .=''; // Other attributes - $parameters=array('colspan' => ' colspan="2"'); + $parameters=array('colspan' => 0); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { - print $object->showOptionals($extrafields,'edit'); + print $object->showOptionals($extrafields,'edit',$parameters); } // Note (private, no output on invoices, propales...)
'.$langs->trans("ProposalsOpened").' ('.$num.')
'.$label.''; + $out .=''; switch($mode) { case "view": diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 9193b8e103e..1ab03bb6a9b 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -800,11 +800,11 @@ else print '