From 0c6c2eca8aa84ceda21b33eff5957c70474b0a1f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jan 2013 13:11:36 +0100 Subject: [PATCH 1/6] Fix: Removed warning --- htdocs/filefunc.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 35404140050..be56733bd6b 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -92,9 +92,9 @@ if (! empty($dolibarr_main_prod)) ini_set('display_errors','Off'); // Clean parameters $dolibarr_main_data_root=trim($dolibarr_main_data_root); $dolibarr_main_url_root=trim($dolibarr_main_url_root); -$dolibarr_main_url_root_alt=trim($dolibarr_main_url_root_alt); -$dolibarr_main_document_root=trim($dolibarr_main_document_root); -$dolibarr_main_document_root_alt=trim($dolibarr_main_document_root_alt); +$dolibarr_main_url_root_alt=(empty($dolibarr_main_url_root_alt)?'':trim($dolibarr_main_url_root_alt)); +$dolibarr_main_document_root=trim($dolibarr_main_document_root); +$dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt)); if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=0; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' From 1851aa46463fea25316244f5e3538c1547a65661 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jan 2013 15:26:46 +0100 Subject: [PATCH 2/6] Fix: Move not stable feature as experimental. Disabled box by default because there is still some bug (pgsl support, filters) and major problem to solve (it slow down seriously Dolibarr, result not accurate for some status). --- htdocs/core/boxes/box_activity.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 817bf77ddd1..104868d7d38 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -1,5 +1,7 @@ + * Copyright (C) 2005-2013 Laurent Destailleur + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -34,7 +36,8 @@ class box_activity extends ModeleBoxes var $db; var $param; - + var $enabled = 1; + var $info_box_head = array(); var $info_box_contents = array(); @@ -43,7 +46,7 @@ class box_activity extends ModeleBoxes */ function __construct() { - global $langs; + global $langs,$conf; $langs->load("boxes"); $langs->load("bills"); @@ -51,6 +54,9 @@ class box_activity extends ModeleBoxes $langs->load("orders"); $this->boxlabel = $langs->transnoentitiesnoconv("BoxGlobalActivity"); + + // Disabled by default because, still has some bug (pgsl support, filters) and slow down seriously Dolibarr + $this->enabled = (! empty($conf->global->MAIN_FEATURES_LEVEL) || ! empty($conf->global->MAIN_BOX_ACTIVITY_ENABLED)); } /** From b6b9f06a7256309a1c67548e322188e521dfad1e Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 15 Jan 2013 18:32:14 +0100 Subject: [PATCH 3/6] Remove bad retrun parameters --- htdocs/webservices/server_actioncomm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index 7014c8d331f..f7c5be74ba8 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -454,7 +454,7 @@ function createActionComm($authentication,$actioncomm) if (! $error) { $db->commit(); - $objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref); + $objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id); } else { From 3b8e99dd4ecbfa70b534855721d763c81c6efb5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jan 2013 18:49:53 +0100 Subject: [PATCH 4/6] Fix: Bad menu def --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 77989a5bfa6..d05c86406c5 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -11,7 +11,7 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '$conf->societe->enabled || $conf->fournisseur->enabled', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 3, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '$conf->societe->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 6, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 7, __ENTITY__); From b8dfee2a3bdfcc3617cb58b5f76c984c058f31f9 Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 15 Jan 2013 23:03:03 +0100 Subject: [PATCH 5/6] Fix bug [ bug #692 ] Can't search for suppliers invoice --- htdocs/fourn/facture/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 089033fafce..b6cb75e4125 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -126,7 +126,7 @@ if (GETPOST('filtre')) if (GETPOST("search_ref")) { - $sql .= " AND fac.rowid LIKE '%".$db->escape(GETPOST("search_ref"))."%'"; + $sql .= " AND fac.rowid = ".$db->escape(GETPOST("search_ref")); } if (GETPOST("search_ref_supplier")) { From ff06b05b3d5333fb1f8132188e42c23bdc93dd7d Mon Sep 17 00:00:00 2001 From: fhenry Date: Tue, 15 Jan 2013 23:04:42 +0100 Subject: [PATCH 6/6] Fix Bug [ bug #681 ] Can't modify a line a business proposal --- htdocs/comm/propal/class/propal.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 0e5e6e661c8..bcf0e1bc3e0 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2786,7 +2786,6 @@ class PropaleLigne } $sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'"; $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; - $sql.= " , info_bits=".$this->info_bits; if (strlen($this->special_code)) $sql.= " , special_code=".$this->special_code; $sql.= " , fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null"); if (! empty($this->rang)) $sql.= ", rang=".$this->rang;