From bf807c27e54ba0419a7ca43d9f4d58e9b335f741 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 23 Jul 2012 11:01:36 +0200 Subject: [PATCH 1/3] Fix: uniformize code --- htdocs/commissions/css/commissions.css | 3 - htdocs/commissions/img/commissions.png | Bin 1676 -> 0 bytes htdocs/commissions/img/object_commissions.png | Bin 651 -> 0 bytes htdocs/commissions/index.php | 59 ++++---- htdocs/commissions/lib/commissions.lib.php | 19 +-- .../core/class/commondocgenerator.class.php | 8 +- htdocs/core/modules/modCommissions.class.php | 143 ++++++++---------- htdocs/langs/fr_FR/commissions.lang | 2 +- 8 files changed, 105 insertions(+), 129 deletions(-) delete mode 100644 htdocs/commissions/css/commissions.css delete mode 100644 htdocs/commissions/img/commissions.png delete mode 100644 htdocs/commissions/img/object_commissions.png diff --git a/htdocs/commissions/css/commissions.css b/htdocs/commissions/css/commissions.css deleted file mode 100644 index 72eeed1895c..00000000000 --- a/htdocs/commissions/css/commissions.css +++ /dev/null @@ -1,3 +0,0 @@ -div.mainmenu.commissions { - background : url('../img/commissions.png') no-repeat 20px 0; -} \ No newline at end of file diff --git a/htdocs/commissions/img/commissions.png b/htdocs/commissions/img/commissions.png deleted file mode 100644 index b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#mv2w8@CGy1*CvwjvNT&;0}HbkuFY?MDBfYyDd3WT&vZ*KWD5?NoP%j7mD34H@p1>-M111D@lCTF+m$=s@?X}TJP@OzV zW*F>QPzLBM{hjsuH|YiO?+z5;@!x(W`=&=3oSgwNK-_JkWQI|KbqK07Hfq>;2h+Cb zHR@RT95U!3TU9_sjLnfYSGaTS7TQ4q=(ixK@sKxQDKlv9`} zm-%q2NZNe#jtqo7L;%9O2k{g#H-|oYhT)+mX?p=x+0H=a1p_|5SLNonw_eY{n`kv| z)miUKvKvi=y+rEVBM}<1>tm)(g08oh0bQY(-^qY&DbE8ORIAly3)u`&y*iyc3`DPB;K#HoUuZRap;gP&vC9)Mvs0_G-6oV0PiA=dv`5X0C?B1sf5O;e zU}$8LBOeseI*+#)5Rd-)OIbKP_Rd=U_x0P@xiYPKg-$0%rjovr$>3!F76Toxy2Asj zwE~)981F@^%gZf}l%GO<4S&O9-3{rbF-9)=aR%O(R;SPY{CSsSiS@=BQofpj}2QO||}$cy{&tmzu8qT2YNDB|Gv$t7}Mq71^z@ zS@T)h@OZirQ)_k+iiv4D=!U~kf0h$-M>#n&NOSEWD~pRfd1m9St*~D4skZ|%xtM%T z-3qN44!yX5leKn^WJ^~*m!&?92n(+Zt{1Vo+MwAAalH^tw?H*fWe5>lirAO# zk4_G9_xs1(nqS3o6wHkEGW2c+{=Z}@Z?yd6T*eU$j*T!nJIJhjUXHl7h`*~G-+uG2 zeY@Ond64o?pR;i1QABB|!1#C{gCmoiI9l52f!&&YcJ=(1s-|92HIuh3M`pg(7 zjyVuST>a*Mh*V`-xg zZ#VJmb2Wo7BGvmjG-T0VvN=BY6OMe)Pd0wC|2$xtCWZV692uj#vP7`4{N@wSHq&J- zgF{7!oDuTz=^^ZV0Spr*ZgTJYyRV-IMD+oRRw6rc8fR>Z#9JU~b?AC^I&s8?Yf@_r zY_X7-G2_QaF_jRT4f2LZt7B1la*ui|q}~o*GB9e9cV3>5uFCnn0d{NInnBf?WQ+xz zA<5*--rDc>K&t~tkP>2aQpKQ)#b!H4BXY=?x@()_k3#U(?f~-@S3UKvwKoiv{IOG{ zUWo7lTJ7jYno7Ef_)eAL#&7;~=f)Oy+jmzK<&zZUVi1JCjW*W`Z(IA9UlxCL{twsP z-KV?XdgZ@i_49I4U&(WUWnTY&beN=rDb>9ml>M)E^9LX#h>q9d6P}IuO9%B WL$*wD{RmJ10000mh diff --git a/htdocs/commissions/img/object_commissions.png b/htdocs/commissions/img/object_commissions.png deleted file mode 100644 index 39f09967046b32c8563a44af9da1b0b454175626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h diff --git a/htdocs/commissions/index.php b/htdocs/commissions/index.php index 69e799c99f1..65e2ad70b21 100644 --- a/htdocs/commissions/index.php +++ b/htdocs/commissions/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Christophe Battarel * * 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 @@ -16,28 +16,27 @@ */ /** - * \file htdocs/custom/commissions/index.php + * \file htdocs/commissions/index.php * \ingroup commissions * \brief Page des commissions par agent commercial - * \version $Id: facture.php,v 1.84 2011/08/08 16:07:47 eldy Exp $ */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); -if ($conf->marges->enabled) - require_once(DOL_DOCUMENT_ROOT."/marges/lib/marges.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); +if (! empty($conf->margin->enabled)) + require_once(DOL_DOCUMENT_ROOT."/margin/lib/margins.lib.php"); $langs->load("companies"); $langs->load("bills"); $langs->load("products"); -if ($conf->marges->enabled) - $langs->load("marges"); $langs->load("commissions"); - +if (! empty($conf->margin->enabled)) + $langs->load("margins"); + // Security check -$agentid = isset($_REQUEST["agentid"])?$_REQUEST["agentid"]:''; +$agentid = GETPOST('agentid','int'); $mesg = ''; @@ -57,7 +56,7 @@ if (!empty($_POST['enddatemonth'])) /* * View */ - + $userstatic = new User($db); $companystatic = new Societe($db); $invoicestatic=new Facture($db); @@ -65,10 +64,10 @@ $invoicestatic=new Facture($db); $form = new Form($db); llxHeader('',$langs->trans("Commissions")); - + $text=$langs->trans("Commissions"); print_fiche_titre($text); - + print '
'; print ''; @@ -78,7 +77,7 @@ if ($agentid > 0) { print ''; - + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="s.nom"; } @@ -91,7 +90,7 @@ else { if (! $sortfield) $sortfield="u.login"; } -// Date début +// Date d�but print ''; print '
'; print $form->select_dolusers($selected=$agentid,$htmlname='agentid',$show_empty=1,$exclude='',$disabled=0,$include='',$enableonly=''); print '
'.$langs->trans('StartDate').''; $form->select_date($startdate,'startdate','','',1,"sel",1,1); @@ -181,25 +180,25 @@ if ($result) print '
'; print_barre_liste($langs->trans("CommissionDetails"),$page,$_SERVER["PHP_SELF"],"&socid=$societe->id",$sortfield,$sortorder,'',$num,0,''); - + $i = 0; print ""; print ''; - if ($agentid > 0) + if ($agentid > 0) print_liste_field_titre($langs->trans("Customer"),$_SERVER["PHP_SELF"],"s.nom","","&agentid=".$_REQUEST["agentid"],'align="center"',$sortfield,$sortorder); else print_liste_field_titre($langs->trans("CommercialAgent"),$_SERVER["PHP_SELF"],"u.login","","&agentid=".$_REQUEST["agentid"],'align="center"',$sortfield,$sortorder); - + // product commission if ($conf->global->COMMISSION_BASE == "MARGES") print_liste_field_titre($langs->trans("ProductMargin"),$_SERVER["PHP_SELF"],"productBase","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); elseif ($conf->global->COMMISSION_BASE == "CA") print_liste_field_titre($langs->trans("ProductCA"),$_SERVER["PHP_SELF"],"productBase","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); - + print_liste_field_titre($langs->trans("CommissionRate"),$_SERVER["PHP_SELF"],"","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ProductCommission"),$_SERVER["PHP_SELF"],"","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); - + // service commission if ($conf->global->COMMISSION_BASE == "MARGES") print_liste_field_titre($langs->trans("ServiceMargin"),$_SERVER["PHP_SELF"],"serviceBase","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); @@ -210,7 +209,7 @@ if ($result) print_liste_field_titre($langs->trans("ServiceCommission"),$_SERVER["PHP_SELF"],"","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); // total commission print_liste_field_titre($langs->trans("TotalCommission"),$_SERVER["PHP_SELF"],"","","&agentid=".$_REQUEST["agentid"],'align="right"',$sortfield,$sortorder); - + print "\n"; $cumul_base_produit = 0; @@ -222,7 +221,7 @@ if ($result) $var=True; while ($i < $num && $i < $conf->liste_limit) { - $objp = $db->fetch_object($result); + $objp = $db->fetch_object($result); $var=!$var; @@ -288,25 +287,23 @@ else } $db->free($result); + +llxFooter(); $db->close(); - -llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.84 $'); ?> \ No newline at end of file diff --git a/htdocs/commissions/lib/commissions.lib.php b/htdocs/commissions/lib/commissions.lib.php index b2145470df3..316718aa329 100644 --- a/htdocs/commissions/lib/commissions.lib.php +++ b/htdocs/commissions/lib/commissions.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Christophe Battarel * * 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 @@ -12,16 +12,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * or see http://www.gnu.org/ + * along with this program. If not, see . */ /** - * \file /marges/lib/commissions.lib.php - * \ingroup marges + * \file /htdocs/commissions/lib/commissions.lib.php + * \ingroup commissions * \brief Library for common commissions functions - * \version $Id:$ */ /** @@ -31,20 +28,20 @@ function commissions_admin_prepare_head() { global $langs, $conf; - + $h = 0; $head = array(); - $head[$h][0] = dol_buildpath("/commissions/admin/commissions.php",1); + $head[$h][0] = DOL_URL_ROOT.'/commissions/admin/commissions.php'; $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'parameters'; $h++; - + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf,$langs,$object,$head,$h,'margesadmin'); + complete_head_from_modules($conf,$langs,$object,$head,$h,'commissionsadmin'); return $head; } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index d64b5b98916..494867ec94f 100755 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -78,10 +78,10 @@ abstract class CommonDocGenerator { $mysoc->country=$outputlangs->transnoentitiesnoconv("Country".$mysoc->country_code); } - if (empty($mysoc->state) && ! empty($mysoc->state_code)) - { - $mysoc->state=getState($mysoc->state_code,0); - } + if (empty($mysoc->state) && ! empty($mysoc->state_code)) + { + $mysoc->state=getState($mysoc->state_code,0); + } $logotouse=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; diff --git a/htdocs/core/modules/modCommissions.class.php b/htdocs/core/modules/modCommissions.class.php index b517cd6644e..119328aa322 100644 --- a/htdocs/core/modules/modCommissions.class.php +++ b/htdocs/core/modules/modCommissions.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Christophe Battarel * * 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 @@ -16,99 +16,81 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/** \defgroup mymodule Module MyModule - * \brief Example of a module descriptor. - * Such a file must be copied into htdocs/includes/module directory. - */ - /** - * \file htdocs/includes/modules/modMyModule.class.php - * \ingroup mymodule - * \brief Description and activation file for module MyModule - * \version $Id: modMyModule.class.php,v 1.26 2008/12/15 18:27:00 eldy Exp $ + * \defgroup commissions Module Commissions + * \brief Example of a module descriptor. + * \file htdocs/core/modules/modCommissions.class.php + * \ingroup commissions + * \brief Description and activation file for module Commissions */ include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); -/** \class modMyModule - * \brief Description and activation class for module MyModule +/** + * \class modCommissions + * \brief Description and activation class for module Commissions */ class modCommissions extends DolibarrModules { /** - * \brief Constructor. Define names, constants, directories, boxes, permissions - * \param DB Database handler - */ - function modCommissions($DB) + * Constructor + * + * @param DoliDB $db Database handler + */ + function modCommissions($db) { - $this->db = $DB; - + $this->db = $db; + // Id for module (must be unique). // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). $this->numero = 60000; // Key text used to identify module (for permissions, menus, etc...) $this->rights_class = 'Commissions'; - + // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' - // It is used to group modules in module setup page - $this->family = "financial"; + // It is used to group modules in module setup page + $this->family = "financial"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = mb_ereg_replace('^mod','',get_class($this), "i"); + $this->name = preg_replace('/^mod/i','',get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) - $this->description = "Gestion des commissions"; + $this->description = "Commissions management"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = '1.0'; + $this->version = 'dolibarr'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Where to store the module in setup page (0=common,1=interface,2=other) $this->special = 0; // Name of png file (without png) used for this module. - // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png. - $this->picto='commissions@commissions'; - + // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png. + $this->picto='commissions'; + // Data directories to create when module is enabled. $this->dirs = array(); - //$this->dirs[0] = DOL_DATA_ROOT.'/Marges'; - //$this->dirs[1] = DOL_DATA_ROOT.'/mymodule/temp; - - // Relative path to module style sheet if exists. Example: '/mymodule/mycss.css'. - $this->style_sheet = '/commissions/css/commissions.css'; // Config pages. Put here list of php page names stored in admmin directory used to setup module. $this->config_page_url = array("commissions.php"); - + // Dependencies - $this->depends = array("modFacture", "modMarges"); // List of modules id that must be enabled if this module is enabled + $this->depends = array("modFacture", "modMargin"); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->phpmin = array(4,1); // Minimum version of PHP required by module - $this->need_dolibarr_version = array(3,1); // Minimum version of Dolibarr required by module + $this->phpmin = array(5,1); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(3,2); // Minimum version of Dolibarr required by module $this->langfiles = array("commissions"); - + // Constants $this->const = array(); // List of particular constants to add when module is enabled - //$this->const = array( 0=>array('MAIN_MODULE_MARGES_HOOKS', 'chaine', 'propalcard', 'Hooks list for displaying Marges data on entity lists', 0, 'current', 1) ); - - // New pages on tabs - $this->tabs = array( - ); - - - // Boxes - $this->boxes = array(); // List of boxes - $r=0; - - // Add here list of php file(s) stored in includes/boxes that contains class to show a box. - // Example: - //$this->boxes[$r][1] = "myboxa.php"; - //$r++; - //$this->boxes[$r][1] = "myboxb.php"; - //$r++; - + // New pages on tabs + $this->tabs = array(); + + // Boxes + $this->boxes = array(); // List of boxes + $r=0; + // Permissions $this->rights = array(); // Permission array used by this module $r=0; - + // Add here list of permission defined by an id, a label, a boolean and two constant strings. // Example: // $this->rights[$r][0] = 2000; // Permission id (must not be already used) @@ -118,13 +100,14 @@ class modCommissions extends DolibarrModules // $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) // $r++; - + // Main menu entries $this->menu = array(); // List of menus to add $r = 0; - // left menu entry - $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu + // left menu entry + $this->menu[$r]=array( + 'fk_menu'=>0, // Put 0 if this is a top menu 'type'=>'top', // This is a Top menu entry 'titre'=>'Commissions', 'mainmenu'=>'commissions', @@ -136,30 +119,31 @@ class modCommissions extends DolibarrModules 'perms'=>'1', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - + $r++; } /** - * \brief Function called when module is enabled. - * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. - * It also creates data directories. - * \return int 1 if OK, 0 if KO + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories. + * + * @return int 1 if OK, 0 if KO */ function init() { $sql = array(); - + $result=$this->load_tables(); - + return $this->_init($sql); } /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted. + * + * @return int 1 if OK, 0 if KO */ function remove() { @@ -168,15 +152,16 @@ class modCommissions extends DolibarrModules return $this->_remove($sql); } - + /** - * \brief Create tables and keys required by module - * Files mymodule.sql and mymodule.key.sql with create table and create keys - * commands must be stored in directory /mymodule/sql/ - * This function is called by this->init. - * \return int <=0 if KO, >0 if OK - */ - function load_tables() + * Create tables and keys required by module + * Files mymodule.sql and mymodule.key.sql with create table and create keys + * commands must be stored in directory /mymodule/sql/ + * This function is called by this->init. + * + * @return int <=0 if KO, >0 if OK + */ + function load_tables() { return; } diff --git a/htdocs/langs/fr_FR/commissions.lang b/htdocs/langs/fr_FR/commissions.lang index a38a9e58612..350b12a8099 100644 --- a/htdocs/langs/fr_FR/commissions.lang +++ b/htdocs/langs/fr_FR/commissions.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - fr_FR - marges +# Dolibarr language file - fr_FR - commissions CHARSET=UTF-8 commissionsSetup=Paramétrage de la gestion des commissions From 3fe8b5bc58d06d57f007ce87fa48d00339713531 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 23 Jul 2012 11:01:52 +0200 Subject: [PATCH 2/3] Change-Id: Ia9f609c8a1264d245ff5074b981305f7d1792aef --- htdocs/theme/amarok/img/commissions.png | Bin 0 -> 1676 bytes htdocs/theme/amarok/img/object_commissions.png | Bin 0 -> 651 bytes htdocs/theme/auguria/img/commissions.png | Bin 0 -> 1676 bytes htdocs/theme/auguria/img/object_commissions.png | Bin 0 -> 651 bytes htdocs/theme/bureau2crea/img/commissions.png | Bin 0 -> 1676 bytes .../theme/bureau2crea/img/object_commissions.png | Bin 0 -> 651 bytes htdocs/theme/cameleo/img/commissions.png | Bin 0 -> 1676 bytes htdocs/theme/cameleo/img/object_commissions.png | Bin 0 -> 651 bytes htdocs/theme/eldy/img/commissions.png | Bin 0 -> 1676 bytes htdocs/theme/eldy/img/object_commissions.png | Bin 0 -> 651 bytes 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 htdocs/theme/amarok/img/commissions.png create mode 100644 htdocs/theme/amarok/img/object_commissions.png create mode 100644 htdocs/theme/auguria/img/commissions.png create mode 100644 htdocs/theme/auguria/img/object_commissions.png create mode 100644 htdocs/theme/bureau2crea/img/commissions.png create mode 100644 htdocs/theme/bureau2crea/img/object_commissions.png create mode 100644 htdocs/theme/cameleo/img/commissions.png create mode 100644 htdocs/theme/cameleo/img/object_commissions.png create mode 100644 htdocs/theme/eldy/img/commissions.png create mode 100644 htdocs/theme/eldy/img/object_commissions.png diff --git a/htdocs/theme/amarok/img/commissions.png b/htdocs/theme/amarok/img/commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c GIT binary patch literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#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Dc>K&t~tkP>2aQpKQ)#b!H4BXY=?x@()_k3#U(?f~-@S3UKvwKoiv{IOG{ zUWo7lTJ7jYno7Ef_)eAL#&7;~=f)Oy+jmzK<&zZUVi1JCjW*W`Z(IA9UlxCL{twsP z-KV?XdgZ@i_49I4U&(WUWnTY&beN=rDb>9ml>M)E^9LX#h>q9d6P}IuO9%B WL$*wD{RmJ10000mh literal 0 HcmV?d00001 diff --git a/htdocs/theme/amarok/img/object_commissions.png b/htdocs/theme/amarok/img/object_commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..39f09967046b32c8563a44af9da1b0b454175626 GIT binary patch literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h literal 0 HcmV?d00001 diff --git a/htdocs/theme/auguria/img/commissions.png b/htdocs/theme/auguria/img/commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c GIT binary patch literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#mv2w8@CGy1*CvwjvNT&;0}HbkuFY?MDBfYyDd3WT&vZ*KWD5?NoP%j7mD34H@p1>-M111D@lCTF+m$=s@?X}TJP@OzV zW*F>QPzLBM{hjsuH|YiO?+z5;@!x(W`=&=3oSgwNK-_JkWQI|KbqK07Hfq>;2h+Cb zHR@RT95U!3TU9_sjLnfYSGaTS7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O9%B WL$*wD{RmJ10000mh literal 0 HcmV?d00001 diff --git a/htdocs/theme/auguria/img/object_commissions.png b/htdocs/theme/auguria/img/object_commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..39f09967046b32c8563a44af9da1b0b454175626 GIT binary patch literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h literal 0 HcmV?d00001 diff --git a/htdocs/theme/bureau2crea/img/commissions.png b/htdocs/theme/bureau2crea/img/commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c GIT binary patch literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#mv2w8@CGy1*CvwjvNT&;0}HbkuFY?MDBfYyDd3WT&vZ*KWD5?NoP%j7mD34H@p1>-M111D@lCTF+m$=s@?X}TJP@OzV zW*F>QPzLBM{hjsuH|YiO?+z5;@!x(W`=&=3oSgwNK-_JkWQI|KbqK07Hfq>;2h+Cb zHR@RT95U!3TU9_sjLnfYSGaTS7TQ4q=(ixK@sKxQDKlv9`} zm-%q2NZNe#jtqo7L;%9O2k{g#H-|oYhT)+mX?p=x+0H=a1p_|5SLNonw_eY{n`kv| z)miUKvKvi=y+rEVBM}<1>tm)(g08oh0bQY(-^qY&DbE8ORIAly3)u`&y*iyc3`DPB;K#HoUuZRap;gP&vC9)Mvs0_G-6oV0PiA=dv`5X0C?B1sf5O;e zU}$8LBOeseI*+#)5Rd-)OIbKP_Rd=U_x0P@xiYPKg-$0%rjovr$>3!F76Toxy2Asj zwE~)981F@^%gZf}l%GO<4S&O9-3{rbF-9)=aR%O(R;SPY{CSsSiS@=BQofpj}2QO||}$cy{&tmzu8qT2YNDB|Gv$t7}Mq71^z@ zS@T)h@OZirQ)_k+iiv4D=!U~kf0h$-M>#n&NOSEWD~pRfd1m9St*~D4skZ|%xtM%T z-3qN44!yX5leKn^WJ^~*m!&?92n(+Zt{1Vo+MwAAalH^tw?H*fWe5>lirAO# zk4_G9_xs1(nqS3o6wHkEGW2c+{=Z}@Z?yd6T*eU$j*T!nJIJhjUXHl7h`*~G-+uG2 zeY@Ond64o?pR;i1QABB|!1#C{gCmoiI9l52f!&&YcJ=(1s-|92HIuh3M`pg(7 zjyVuST>a*Mh*V`-xg zZ#VJmb2Wo7BGvmjG-T0VvN=BY6OMe)Pd0wC|2$xtCWZV692uj#vP7`4{N@wSHq&J- zgF{7!oDuTz=^^ZV0Spr*ZgTJYyRV-IMD+oRRw6rc8fR>Z#9JU~b?AC^I&s8?Yf@_r zY_X7-G2_QaF_jRT4f2LZt7B1la*ui|q}~o*GB9e9cV3>5uFCnn0d{NInnBf?WQ+xz zA<5*--rDc>K&t~tkP>2aQpKQ)#b!H4BXY=?x@()_k3#U(?f~-@S3UKvwKoiv{IOG{ zUWo7lTJ7jYno7Ef_)eAL#&7;~=f)Oy+jmzK<&zZUVi1JCjW*W`Z(IA9UlxCL{twsP z-KV?XdgZ@i_49I4U&(WUWnTY&beN=rDb>9ml>M)E^9LX#h>q9d6P}IuO9%B WL$*wD{RmJ10000mh literal 0 HcmV?d00001 diff --git a/htdocs/theme/bureau2crea/img/object_commissions.png b/htdocs/theme/bureau2crea/img/object_commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..39f09967046b32c8563a44af9da1b0b454175626 GIT binary patch literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h literal 0 HcmV?d00001 diff --git a/htdocs/theme/cameleo/img/commissions.png b/htdocs/theme/cameleo/img/commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c GIT binary patch literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#mv2w8@CGy1*CvwjvNT&;0}HbkuFY?MDBfYyDd3WT&vZ*KWD5?NoP%j7mD34H@p1>-M111D@lCTF+m$=s@?X}TJP@OzV zW*F>QPzLBM{hjsuH|YiO?+z5;@!x(W`=&=3oSgwNK-_JkWQI|KbqK07Hfq>;2h+Cb zHR@RT95U!3TU9_sjLnfYSGaTS7TQ4q=(ixK@sKxQDKlv9`} zm-%q2NZNe#jtqo7L;%9O2k{g#H-|oYhT)+mX?p=x+0H=a1p_|5SLNonw_eY{n`kv| z)miUKvKvi=y+rEVBM}<1>tm)(g08oh0bQY(-^qY&DbE8ORIAly3)u`&y*iyc3`DPB;K#HoUuZRap;gP&vC9)Mvs0_G-6oV0PiA=dv`5X0C?B1sf5O;e zU}$8LBOeseI*+#)5Rd-)OIbKP_Rd=U_x0P@xiYPKg-$0%rjovr$>3!F76Toxy2Asj zwE~)981F@^%gZf}l%GO<4S&O9-3{rbF-9)=aR%O(R;SPY{CSsSiS@=BQofpj}2QO||}$cy{&tmzu8qT2YNDB|Gv$t7}Mq71^z@ zS@T)h@OZirQ)_k+iiv4D=!U~kf0h$-M>#n&NOSEWD~pRfd1m9St*~D4skZ|%xtM%T z-3qN44!yX5leKn^WJ^~*m!&?92n(+Zt{1Vo+MwAAalH^tw?H*fWe5>lirAO# zk4_G9_xs1(nqS3o6wHkEGW2c+{=Z}@Z?yd6T*eU$j*T!nJIJhjUXHl7h`*~G-+uG2 zeY@Ond64o?pR;i1QABB|!1#C{gCmoiI9l52f!&&YcJ=(1s-|92HIuh3M`pg(7 zjyVuST>a*Mh*V`-xg zZ#VJmb2Wo7BGvmjG-T0VvN=BY6OMe)Pd0wC|2$xtCWZV692uj#vP7`4{N@wSHq&J- zgF{7!oDuTz=^^ZV0Spr*ZgTJYyRV-IMD+oRRw6rc8fR>Z#9JU~b?AC^I&s8?Yf@_r zY_X7-G2_QaF_jRT4f2LZt7B1la*ui|q}~o*GB9e9cV3>5uFCnn0d{NInnBf?WQ+xz zA<5*--rDc>K&t~tkP>2aQpKQ)#b!H4BXY=?x@()_k3#U(?f~-@S3UKvwKoiv{IOG{ zUWo7lTJ7jYno7Ef_)eAL#&7;~=f)Oy+jmzK<&zZUVi1JCjW*W`Z(IA9UlxCL{twsP z-KV?XdgZ@i_49I4U&(WUWnTY&beN=rDb>9ml>M)E^9LX#h>q9d6P}IuO9%B WL$*wD{RmJ10000mh literal 0 HcmV?d00001 diff --git a/htdocs/theme/cameleo/img/object_commissions.png b/htdocs/theme/cameleo/img/object_commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..39f09967046b32c8563a44af9da1b0b454175626 GIT binary patch literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/img/commissions.png b/htdocs/theme/eldy/img/commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e139e3fbad0fd57430b5f2e9e2639a7ef92a8c GIT binary patch literal 1676 zcmV;726Op|P)F!yWy~l%DCIe%H$N?#mv2w8@CGy1*CvwjvNT&;0}HbkuFY?MDBfYyDd3WT&vZ*KWD5?NoP%j7mD34H@p1>-M111D@lCTF+m$=s@?X}TJP@OzV zW*F>QPzLBM{hjsuH|YiO?+z5;@!x(W`=&=3oSgwNK-_JkWQI|KbqK07Hfq>;2h+Cb zHR@RT95U!3TU9_sjLnfYSGaTS7TQ4q=(ixK@sKxQDKlv9`} zm-%q2NZNe#jtqo7L;%9O2k{g#H-|oYhT)+mX?p=x+0H=a1p_|5SLNonw_eY{n`kv| z)miUKvKvi=y+rEVBM}<1>tm)(g08oh0bQY(-^qY&DbE8ORIAly3)u`&y*iyc3`DPB;K#HoUuZRap;gP&vC9)Mvs0_G-6oV0PiA=dv`5X0C?B1sf5O;e zU}$8LBOeseI*+#)5Rd-)OIbKP_Rd=U_x0P@xiYPKg-$0%rjovr$>3!F76Toxy2Asj zwE~)981F@^%gZf}l%GO<4S&O9-3{rbF-9)=aR%O(R;SPY{CSsSiS@=BQofpj}2QO||}$cy{&tmzu8qT2YNDB|Gv$t7}Mq71^z@ zS@T)h@OZirQ)_k+iiv4D=!U~kf0h$-M>#n&NOSEWD~pRfd1m9St*~D4skZ|%xtM%T z-3qN44!yX5leKn^WJ^~*m!&?92n(+Zt{1Vo+MwAAalH^tw?H*fWe5>lirAO# zk4_G9_xs1(nqS3o6wHkEGW2c+{=Z}@Z?yd6T*eU$j*T!nJIJhjUXHl7h`*~G-+uG2 zeY@Ond64o?pR;i1QABB|!1#C{gCmoiI9l52f!&&YcJ=(1s-|92HIuh3M`pg(7 zjyVuST>a*Mh*V`-xg zZ#VJmb2Wo7BGvmjG-T0VvN=BY6OMe)Pd0wC|2$xtCWZV692uj#vP7`4{N@wSHq&J- zgF{7!oDuTz=^^ZV0Spr*ZgTJYyRV-IMD+oRRw6rc8fR>Z#9JU~b?AC^I&s8?Yf@_r zY_X7-G2_QaF_jRT4f2LZt7B1la*ui|q}~o*GB9e9cV3>5uFCnn0d{NInnBf?WQ+xz zA<5*--rDc>K&t~tkP>2aQpKQ)#b!H4BXY=?x@()_k3#U(?f~-@S3UKvwKoiv{IOG{ zUWo7lTJ7jYno7Ef_)eAL#&7;~=f)Oy+jmzK<&zZUVi1JCjW*W`Z(IA9UlxCL{twsP z-KV?XdgZ@i_49I4U&(WUWnTY&beN=rDb>9ml>M)E^9LX#h>q9d6P}IuO9%B WL$*wD{RmJ10000mh literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/img/object_commissions.png b/htdocs/theme/eldy/img/object_commissions.png new file mode 100644 index 0000000000000000000000000000000000000000..39f09967046b32c8563a44af9da1b0b454175626 GIT binary patch literal 651 zcmV;60(AX}P)FVe>ug)pt&qqU8XGoQof21v4uoQYD?CsA}0 zssidqY_F|yu=I*@xyHEx^+UmKw1T|<5?3X`*77&zKgDqxZY=8(t+sU>aF!@Vk&Q+n zOOsb4wHhJ1U8baV;|mQ^Lt&ubCcdzMdXcEC*uv}@AYj$l%jCH`HAOPE@drWLeD<&r zyghzO6abFH^O+|MUu`B8PqMm_Ang=!8~O>t|A;C(Rk9Tg;r63>Tkv&to*)2XFPXMo z)pw9vKPAexJgmiw^o@*S1@n09X8fVh3Bu3UQ#O#(bT`cIO&1qR zG&EgMt40!e+0IDqBX!M+h^j8!rKUMaW>!^IjUEn<+O^G*N&002ovPDHLkV1jd4IY$5h literal 0 HcmV?d00001 From b63505ff15db4f2ebf0199949f74d5e9a52bb025 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Jul 2012 11:02:53 +0200 Subject: [PATCH 3/3] Better fix --- htdocs/core/db/pgsql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 34297a7c1fc..d43aee672ca 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -380,7 +380,7 @@ class DoliDBPgsql if (! $name) $name="postgres"; // When try to connect using admin user // try first Unix domain socket (local) - if ((empty($host) || $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT')) + if ((! empty($host) && $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT')) { $con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty $this->db = pg_connect($con_string);