From fb0a99cb55f75eae9efa6b9679222649c9e16864 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 13 Jun 2013 15:05:19 +0200 Subject: [PATCH 01/29] =?UTF-8?q?Fix=20[=20bug=20#934=20]=20Impossible=20d?= =?UTF-8?q?e=20cr=C3=A9er=20une=20facture=20pr=C3=A9d=C3=A9finie=20(pgsql)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 1 + htdocs/compta/facture/class/facture-rec.class.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddafb08d110..5ef0217d077 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.3.3 compared to 3.3.2 ***** - Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php +- Fix: [ bug #934 ] Error on proformat invoice creation (pgsql) ***** ChangeLog for 3.3.2 compared to 3.3.1 ***** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index b41fa735e7c..105885bfe1f 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -122,8 +122,8 @@ class FactureRec extends Facture $sql.= ", '".$facsrc->socid."'"; $sql.= ", ".$conf->entity; $sql.= ", ".$this->db->idate($now); - $sql.= ", '".$facsrc->amount."'"; - $sql.= ", '".$facsrc->remise."'"; + $sql.= ", ".(!empty($facsrc->amount)?$facsrc->amount:'0'); + $sql.= ", ".(!empty($facsrc->remise)?$this->remise:'0'); $sql.= ", '".$this->db->escape($this->note)."'"; $sql.= ", '".$user->id."'"; $sql.= ", ".(! empty($facsrc->fk_project)?"'".$facsrc->fk_project."'":"null"); From 676191c1f9a54c4cee32d6f0ce1ce07448403420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 19 Jun 2013 10:22:46 +0200 Subject: [PATCH 02/29] Fix: [ bug #947 ] Can't create proposal lines with unit price = 0 --- ChangeLog | 1 + htdocs/comm/propal.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ef0217d077..59549e19355 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ English Dolibarr ChangeLog - Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php - Fix: [ bug #934 ] Error on proformat invoice creation (pgsql) +- Fix: [ bug #947 ] Can't create proposal lines with unit price = 0 ***** ChangeLog for 3.3.2 compared to 3.3.1 ***** diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 330585b1e9d..c0179e3189c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -641,7 +641,8 @@ else if ($action == "addline" && $user->rights->propal->creer) setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); $error++; } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht != 0) || $price_ht == '')) // Unit price can be 0 but not ''. Also price can be negative for proposal. + + if ((empty($idprod) || GETPOST('usenewaddlineform')) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal. { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; From 76d9ba6a431281029dcf37ab98092ebef04cf4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 19 Jun 2013 10:24:24 +0200 Subject: [PATCH 03/29] Fixed es_ES translation typo --- htdocs/langs/es_ES/categories.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/es_ES/categories.lang b/htdocs/langs/es_ES/categories.lang index 7521b9c03dc..e51ab577533 100644 --- a/htdocs/langs/es_ES/categories.lang +++ b/htdocs/langs/es_ES/categories.lang @@ -42,7 +42,7 @@ ErrCatAlreadyExists=Este nombre esta siendo utilizado AddProductToCat=¿Añadir este producto a una categoría? ImpossibleAddCat=Imposible añadir la categoría ImpossibleAssociateCategory=Imposible asociar la categoría -WasAddedSuccessfully=se ha añadido con éxito. +WasAddedSuccessfully=La categoría se ha añadido con éxito. ObjectAlreadyLinkedToCategory=El elemento ya está enlazado a esta categoría CategorySuccessfullyCreated=La categoría %s se insertado correctamente. ProductIsInCategories=Este producto/servicio se encuentra en las siguientes categorías From ee1e266774e6ae54fbca61e9efe6121226762374 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 19 Jun 2013 11:22:53 +0200 Subject: [PATCH 04/29] Fix trad holidays module --- htdocs/langs/fr_FR/holiday.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index be368bf661a..c0954366b27 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -85,8 +85,8 @@ NewSoldeCP=Nouveau Solde alreadyCPexist=Une demande de congés à déjà été effectuée sur cette période. UserName=Nom Prénom Employee=Salarié -FirstDayOfHoliday=Premier jour de congès -LastDayOfHoliday=Dernier jour de congès +FirstDayOfHoliday=Premier jour de congés +LastDayOfHoliday=Dernier jour de congés HolidaysMonthlyUpdate=Mise à jour mensuelle ManualUpdate=Mise à jour manuelle From 8bc68959e1b639cc5c07b24f79a34e667778aed4 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 21 Jun 2013 11:23:53 +0200 Subject: [PATCH 05/29] Merge modif --- htdocs/product/liste.php | 2 +- .../societe/class/companybankaccount.class.php | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index a8ca8521a65..5c312886313 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -36,7 +36,7 @@ if (! empty($conf->categorie->enabled)) $langs->load("products"); $langs->load("stocks"); -$langs->load("suppliers"); +$langs->load("suppliers"); $action = GETPOST('action'); $sref=GETPOST("sref"); diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 5a18c9b9bcc..ce637588d8a 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -196,15 +196,15 @@ class CompanyBankAccount extends Account { global $langs; - if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) - { - $rib = $this->code_banque." ".$this->code_guichet." ".$this->number; - $rib.=($this->cle_rib?" (".$this->cle_rib.")":""); - } - else - { - $rib=$langs->trans("NoRIB"); - } + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) + { + $rib = $this->code_banque." ".$this->code_guichet." ".$this->number; + $rib.=($this->cle_rib?" (".$this->cle_rib.")":""); + } + else + { + $rib=$langs->trans("NoRIB"); + } return $rib; } From d6a7a0ed71d8438e2d3efe13497328ad70286ed8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 21 Jun 2013 15:14:32 +0200 Subject: [PATCH 06/29] Commit --- htdocs/adherents/index.php | 2 +- htdocs/comm/action/index.php | 2 +- .../class/bonprelevement.class.php | 4 +- htdocs/core/lib/functions2.lib.php | 154 +++++++++--------- 4 files changed, 81 insertions(+), 81 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 6c0b0dc4019..fd10d0e14de 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -27,7 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; $langs->load("companies"); $langs->load("members"); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 165101e3cfa..7facb9b5459 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -971,7 +971,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { - $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index a1ac8052222..54439aea9a3 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -795,7 +795,7 @@ class BonPrelevement extends CommonObject { require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; $soc = new Societe($this->db); - $bac = new CompanyBankAccount($this->db); + $bac = new CompanyBankAccount($this->db); // Check RIB $i = 0; @@ -810,7 +810,7 @@ class BonPrelevement extends CommonObject { if ($soc->fetch($fact->socid) >= 0) { - $bac->fetch(0,$soc->id); + $bac->fetch(0,$soc->id); if ($bac->verif() >= 1) { $factures_prev[$i] = $fac; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 469b9f2ac94..eac148deaa4 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1423,87 +1423,87 @@ function getSoapParams() return $params; } - -/** - * List urls of element - * - * @param int $objectid Id of record - * @param string $objecttype Type of object ('invoice', 'order', 'expedition_bon', ...) - * @param int $withpicto Picto to show - * @param string $option More options - * @return string URL of link to object id/type - */ -function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') -{ - global $db,$conf; + +/** + * List urls of element + * + * @param int $objectid Id of record + * @param string $objecttype Type of object ('invoice', 'order', 'expedition_bon', ...) + * @param int $withpicto Picto to show + * @param string $option More options + * @return string URL of link to object id/type + */ +function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='') +{ + global $db,$conf; $ret=''; - - // Parse element/subelement (ex: project_task) - $module = $element = $subelement = $objecttype; - if (preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) - { - $module = $element = $regs[1]; - $subelement = $regs[2]; - } - - $classpath = $element.'/class'; - - // To work with non standard path - if ($objecttype == 'facture' || $objecttype == 'invoice') { - $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; - } - if ($objecttype == 'commande' || $objecttype == 'order') { - $classpath = 'commande/class'; $module='commande'; $subelement='commande'; - } - if ($objecttype == 'propal') { - $classpath = 'comm/propal/class'; - } - if ($objecttype == 'shipping') { - $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; - } - if ($objecttype == 'delivery') { - $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; - } - if ($objecttype == 'invoice_supplier') { - $classpath = 'fourn/class'; - } - if ($objecttype == 'order_supplier') { - $classpath = 'fourn/class'; - } - if ($objecttype == 'contract') { - $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; - } - if ($objecttype == 'member') { - $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; - } - if ($objecttype == 'cabinetmed_cons') { - $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; - } - if ($objecttype == 'fichinter') { - $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; - } - - //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; - - $classfile = strtolower($subelement); $classname = ucfirst($subelement); - if ($objecttype == 'invoice_supplier') { - $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; - } - if ($objecttype == 'order_supplier') { - $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; - } - - if (! empty($conf->$module->enabled)) - { - $res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); - if ($res) - { - $object = new $classname($db); - $res=$object->fetch($objectid); + + // Parse element/subelement (ex: project_task) + $module = $element = $subelement = $objecttype; + if (preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) + { + $module = $element = $regs[1]; + $subelement = $regs[2]; + } + + $classpath = $element.'/class'; + + // To work with non standard path + if ($objecttype == 'facture' || $objecttype == 'invoice') { + $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; + } + if ($objecttype == 'commande' || $objecttype == 'order') { + $classpath = 'commande/class'; $module='commande'; $subelement='commande'; + } + if ($objecttype == 'propal') { + $classpath = 'comm/propal/class'; + } + if ($objecttype == 'shipping') { + $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; + } + if ($objecttype == 'delivery') { + $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; + } + if ($objecttype == 'invoice_supplier') { + $classpath = 'fourn/class'; + } + if ($objecttype == 'order_supplier') { + $classpath = 'fourn/class'; + } + if ($objecttype == 'contract') { + $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; + } + if ($objecttype == 'member') { + $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; + } + if ($objecttype == 'cabinetmed_cons') { + $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; + } + if ($objecttype == 'fichinter') { + $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; + } + + //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; + + $classfile = strtolower($subelement); $classname = ucfirst($subelement); + if ($objecttype == 'invoice_supplier') { + $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; + } + if ($objecttype == 'order_supplier') { + $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; + } + + if (! empty($conf->$module->enabled)) + { + $res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); + if ($res) + { + $object = new $classname($db); + $res=$object->fetch($objectid); if ($res > 0) $ret=$object->getNomUrl($withpicto,$option); unset($object); } } - return $ret; + return $ret; } \ No newline at end of file From 0d3b7f1a0f88eca590e50adb56969c1d4773ec6d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 24 Jun 2013 10:01:23 +0200 Subject: [PATCH 07/29] merge --- htdocs/compta/bank/account.php | 2 +- htdocs/core/lib/cron.lib.php | 92 +++++++++---------- htdocs/cron/card.php | 2 +- htdocs/cron/list.php | 10 +- htdocs/main.inc.php | 22 ++--- htdocs/opensurvey/public/index.php | 10 +- htdocs/public/cron/cron_run_jobs.php | 14 +-- htdocs/theme/bureau2crea/style.css.php | 6 +- .../email_expire_services_to_customers.php | 10 +- ...ail_expire_services_to_representatives.php | 10 +- .../email_unpaid_invoices_to_customers.php | 4 +- 11 files changed, 91 insertions(+), 91 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 80b71d1d919..ac36247fdba 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -762,7 +762,7 @@ if ($id > 0 || ! empty($ref)) print ""; - print "\n"; + print "\n"; dol_fiche_end(); diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index b66060e3607..4a81457afe1 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -75,53 +75,53 @@ function cron_prepare_head($object) return $head; } - -/** - * Show information with URLs to launch jobs - * - * @return int 0 - */ -function dol_print_cron_urls() -{ - global $conf, $langs, $user; - global $dolibarr_main_url_root; - - // Define $urlwithroot - $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); - $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - - // Cron launch - print ''.$langs->trans("URLToLaunchCronJobs").':
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; - print img_picto('','object_globe.png').' '.$url."
\n"; - print ' '.$langs->trans("OrToLaunchASpecificJob").'
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; - print img_picto('','object_globe.png').' '.$url."
\n"; - print '
'; - - - print ''.$langs->trans("FileToLaunchCronJobs").':
'; - - $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' [cronjobid]'; - print '
\n"; - print '
'; + +/** + * Show information with URLs to launch jobs + * + * @return int 0 + */ +function dol_print_cron_urls() +{ + global $conf, $langs, $user; + global $dolibarr_main_url_root; + + // Define $urlwithroot + $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); + $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + + // Cron launch + print ''.$langs->trans("URLToLaunchCronJobs").':
'; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; + print img_picto('','object_globe.png').' '.$url."
\n"; + print ' '.$langs->trans("OrToLaunchASpecificJob").'
'; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; + print img_picto('','object_globe.png').' '.$url."
\n"; + print '
'; + + + print ''.$langs->trans("FileToLaunchCronJobs").':
'; + + $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' [cronjobid]'; + print '
\n"; + print '
'; // Add note - $linuxlike=1; - if (preg_match('/^win/i',PHP_OS)) $linuxlike=0; - if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0; - print $langs->trans("Note").': '; - if ($linuxlike) - { - print $langs->trans("CronExplainHowToRunUnix"); - } - else - { - print $langs->trans("CronExplainHowToRunWin"); - } - - return 0; -} + $linuxlike=1; + if (preg_match('/^win/i',PHP_OS)) $linuxlike=0; + if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0; + print $langs->trans("Note").': '; + if ($linuxlike) + { + print $langs->trans("CronExplainHowToRunUnix"); + } + else + { + print $langs->trans("CronExplainHowToRunWin"); + } + + return 0; +} diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 2cdd27862b3..bad9171d5d4 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -456,7 +456,7 @@ if (($action=="create") || ($action=="edit")) print ""; print "\n"; - print ''; + print ''; print '

'; print ''; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 09e1f2fb1a8..7eb253c9ade 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -144,8 +144,8 @@ if ($result < 0) print "

"; -print '
'."\n"; -print ''; +print ''."\n"; +print ''; print ''; print ''; @@ -190,8 +190,8 @@ print ''; print ''; -if (count($object->lines) > 0) -{ +if (count($object->lines) > 0) +{ // Loop on each active job $style='impair'; foreach($object->lines as $line) @@ -291,7 +291,7 @@ else print '
'; -print ''; +print ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9c942cf2b99..e4a22c97285 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -679,7 +679,7 @@ if (GETPOST('theme')) $conf->theme=GETPOST('theme','alpha',1); $conf->css = "/theme/".$conf->theme."/style.css.php"; } - + // Set javascript option if (! GETPOST('nojs')) // If javascript was not disabled on URL @@ -703,18 +703,18 @@ if (! empty($conf->browser->phone)) $conf->dol_no_mouse_hover=1; } -// Disabled bugged themes -if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo'))) -{ - $conf->theme='eldy'; - $conf->css = "/theme/".$conf->theme."/style.css.php"; +// Disabled bugged themes +if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo'))) +{ + $conf->theme='eldy'; + $conf->css = "/theme/".$conf->theme."/style.css.php"; } -// Disabled bugged themes -if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo'))) -{ - $conf->theme='eldy'; - $conf->css = "/theme/".$conf->theme."/style.css.php"; +// Disabled bugged themes +if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo'))) +{ + $conf->theme='eldy'; + $conf->css = "/theme/".$conf->theme."/style.css.php"; } if (! defined('NOREQUIRETRAN')) diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index 73e7c672e20..2c78a86cb9d 100755 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -50,12 +50,12 @@ print '

'.$langs->trans("OpenSurveyDesc").' '.$langs->trans("OpenSurveyNoRegistration").'


'; -print $langs->trans("OrganizeYourMeetingEasily").' -
-
+print $langs->trans("OrganizeYourMeetingEasily").' +
+
-
-
+
+
'; llxFooterSurvey(); diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index 79eaf5e7013..8fc1d97d23d 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -43,10 +43,10 @@ dol_include_once("/cron/class/cronjob.class.php"); global $langs, $conf; -// Language Management -$langs->load("admin"); -$langs->load("cron"); - +// Language Management +$langs->load("admin"); +$langs->load("cron"); + @@ -101,9 +101,9 @@ if (! empty($id)) { if (! is_numeric($id)) { - echo "Error: Bad value for parameter job id"; - dol_syslog("cron_run_jobs.php Bad value for parameter job id", LOG_WARNING); - exit; + echo "Error: Bad value for parameter job id"; + dol_syslog("cron_run_jobs.php Bad value for parameter job id", LOG_WARNING); + exit; } $filter=array(); $filter['t.rowid']=$id; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 08f6198da6b..869c1976ffd 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -58,9 +58,9 @@ $fontsize=empty($conf->dol_optimize_smallscreen)?'12':'12'; $fontsizesmaller=empty($conf->dol_optimize_smallscreen)?'11':'11'; -$path=''; // This value may be used in future for external module to overwrite theme -$theme='bureau2crea'; // Value of theme -if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; } +$path=''; // This value may be used in future for external module to overwrite theme +$theme='bureau2crea'; // Value of theme +if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; } // Define image path files $fontlist='arial, sans-serif, verdana, helvetica'; diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 63d9c1b8733..96e97e13771 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -124,12 +124,12 @@ if ($resql) if (empty($obj->email)) print "Warning: Customer ".$customer." has no email. Notice disabled.\n"; } - // Define line content - $outputlangs=new Translate('',$conf); - $outputlangs->setDefaultLang(empty($obj->default_lang)?$langs->defaultlang:$obj->default_lang); // By default language of customer - $outputlangs->load("bills"); + // Define line content + $outputlangs=new Translate('',$conf); + $outputlangs->setDefaultLang(empty($obj->default_lang)?$langs->defaultlang:$obj->default_lang); // By default language of customer + $outputlangs->load("bills"); $outputlangs->load("main"); - $outputlangs->load("contracts"); + $outputlangs->load("contracts"); if (dol_strlen($oldemail)) { diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index ace84fa0582..08d068685e3 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -125,11 +125,11 @@ if ($resql) if (empty($obj->email)) print "Warning: Sale representative ".$salerepresentative." has no email. Notice disabled.\n"; } - // Define line content - $outputlangs=new Translate('',$conf); - $outputlangs->setDefaultLang(empty($obj->lang)?$langs->defaultlang:$obj->lang); // By default language of sale representative - $outputlangs->load("bills"); - $outputlangs->load("main"); + // Define line content + $outputlangs=new Translate('',$conf); + $outputlangs->setDefaultLang(empty($obj->lang)?$langs->defaultlang:$obj->lang); // By default language of sale representative + $outputlangs->load("bills"); + $outputlangs->load("main"); if (dol_strlen($obj->email)) { diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 0b2b9413002..c4051728aab 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -69,8 +69,8 @@ $error=0; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n"; $now=dol_now('tzserver'); -$duration_value=isset($argv[3])?$argv[3]:'none'; -$duration_value2=isset($argv[4])?$argv[4]:'none'; +$duration_value=isset($argv[3])?$argv[3]:'none'; +$duration_value2=isset($argv[4])?$argv[4]:'none'; $error = 0; print $script_file." launched with mode ".$mode." default lang=".$langs->defaultlang.(is_numeric($duration_value)?" delay=".$duration_value:"").(is_numeric($duration_value2)?" after=".$duration_value2:"")."\n"; From ac205aac2d71aaec65736ca2ba6a3872d2a61216 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 24 Jun 2013 10:05:29 +0200 Subject: [PATCH 08/29] Add search on siren (idprof1) --- htdocs/societe/societe.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 8253c98860d..97b18be18d3 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -226,6 +226,7 @@ if ($search_all) $sql.= " OR s.code_client LIKE '%".$db->escape($search_all)."%'"; $sql.= " OR s.email LIKE '%".$db->escape($search_all)."%'"; $sql.= " OR s.url LIKE '%".$db->escape($search_all)."%'"; + $sql.= " OR s.siren LIKE '%".$db->escape($search_all)."%'"; $sql.= ")"; } if ($search_nom) @@ -235,6 +236,7 @@ if ($search_nom) $sql.= " OR s.code_client LIKE '%".$db->escape($search_nom)."%'"; $sql.= " OR s.email LIKE '%".$db->escape($search_nom)."%'"; $sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'"; + $sql.= " OR s.siren LIKE '%".$db->escape($search_nom)."%'"; $sql.= ")"; } if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; From 7f3a06127a34eb95121e9e5c026c4e64f324bbf2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2013 19:55:23 +0200 Subject: [PATCH 09/29] Fix: Bad regex --- htdocs/public/paybox/paymentko.php | 2 +- htdocs/public/paybox/paymentok.php | 2 +- htdocs/public/paypal/paymentko.php | 2 +- htdocs/public/paypal/paymentok.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/public/paybox/paymentko.php b/htdocs/public/paybox/paymentko.php index c4457ff4d93..6316ad55434 100644 --- a/htdocs/public/paybox/paymentko.php +++ b/htdocs/public/paybox/paymentko.php @@ -64,7 +64,7 @@ dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox'); // Send an email -if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag)) +if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=/',$fulltag)) { $sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index b8940fa1a32..a093a28bbf0 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -94,7 +94,7 @@ dol_syslog("Call newpaymentok with token=".$token." paymentType=".$paymentType." */ // Send an email -if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag)) +if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=/',$fulltag)) { $sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 21d93f3eaa1..c2412a8a20b 100755 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -72,7 +72,7 @@ dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal'); // Send an email -if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag)) +if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=/',$fulltag)) { $sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index e4ea8a92095..173052318e9 100755 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -131,7 +131,7 @@ if ($PAYPALTOKEN) // Send an email - if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag)) + if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=/',$fulltag)) { $sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; From 109d1a71cb72d0abbb2a97b463a0889d888a3d06 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 25 Jun 2013 11:00:48 +0200 Subject: [PATCH 10/29] Merge --- htdocs/install/mysql/tables/llx_cronjob.sql | 100 ++++++++++---------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index ae7fddc28be..6c83994a936 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -1,51 +1,51 @@ --- =================================================================== --- Copyright (C) 2013 Laurent Destailleur --- Copyright (C) 2013 Florian Henry --- --- 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 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 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, see . --- --- =================================================================== - - -CREATE TABLE llx_cronjob -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, - datec datetime, - jobtype varchar(10) NOT NULL, - label text NOT NULL, - command varchar(255), - classesname varchar(255), - objectname varchar(255), - methodename varchar(255), - params text NOT NULL, - md5params varchar(32), - module_name varchar(255), - priority integer DEFAULT 0, - datelastrun datetime, - datenextrun datetime, - datestart datetime, - dateend datetime, - datelastresult datetime, - lastresult text, - lastoutput text, - unitfrequency integer NOT NULL DEFAULT 0, - frequency integer NOT NULL DEFAULT 0, - nbrun integer, - status integer NOT NULL DEFAULT 1, - fk_user_author integer DEFAULT NULL, - fk_user_mod integer DEFAULT NULL, - note text - +-- =================================================================== +-- Copyright (C) 2013 Laurent Destailleur +-- Copyright (C) 2013 Florian Henry +-- +-- 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 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- 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, see . +-- +-- =================================================================== + + +CREATE TABLE llx_cronjob +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + datec datetime, + jobtype varchar(10) NOT NULL, + label text NOT NULL, + command varchar(255), + classesname varchar(255), + objectname varchar(255), + methodename varchar(255), + params text NOT NULL, + md5params varchar(32), + module_name varchar(255), + priority integer DEFAULT 0, + datelastrun datetime, + datenextrun datetime, + datestart datetime, + dateend datetime, + datelastresult datetime, + lastresult text, + lastoutput text, + unitfrequency integer NOT NULL DEFAULT 0, + frequency integer NOT NULL DEFAULT 0, + nbrun integer, + status integer NOT NULL DEFAULT 1, + fk_user_author integer DEFAULT NULL, + fk_user_mod integer DEFAULT NULL, + note text + )ENGINE=innodb; \ No newline at end of file From 065b30f0d0a9b6d8c8da078f288a148677240ae5 Mon Sep 17 00:00:00 2001 From: simnandez Date: Tue, 25 Jun 2013 11:12:21 +0200 Subject: [PATCH 11/29] [Bug #958] LocalTax2 for Spain fails on Suppliers --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e72f196d4e1..3ec8c385e9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,7 @@ For users: - New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated. - New: [ task #823 ] Shipping_validate email notification. - New: [ task #900 ] Review code of ficheinter.class.php +- Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers For translators: - Update language files. diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8123feede72..1173c418d6a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2812,7 +2812,18 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") } } - if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0; + if ($local == 2) + { + + if ($thirdparty_seller->id==$mysoc->id) + { + if (! $thirdparty_buyer->localtax2_assuj) return 0; + } + else + { + if (! $thirdparty_seller->localtax2_assuj) return 0; + } + } } else { From b22b604d02405e868f40c108317cce3c7fa54f55 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 25 Jun 2013 11:14:00 +0200 Subject: [PATCH 12/29] Accountancy code on user object in prevision of the complete accountancy module --- .../install/mysql/migration/3.4.0-3.5.0.sql | 2 +- htdocs/install/mysql/tables/llx_user.sql | 3 ++- htdocs/user/class/user.class.php | 6 ++++++ htdocs/user/fiche.php | 21 +++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index b7a12f34262..5ab46b6c4f2 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -66,4 +66,4 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob DROP table llx_adherent_options; DROP table llx_adherent_options_label; - +ALTER TABLE `llx_user` ADD `accountancy_code` VARCHAR( 24 ) NULL; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 6042b0906ce..9fd1db59c91 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -62,5 +62,6 @@ create table llx_user statut tinyint DEFAULT 1, photo varchar(255), -- filename or url of photo lang varchar(6), - color varchar(6) + color varchar(6), + accountancy_code varchar(24) NULL )ENGINE=innodb; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index a98e5c5dbd8..39fc2132042 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -96,6 +96,8 @@ class User extends CommonObject var $users; // To store all tree of users hierarchy var $parentof; // To store an array of all parents for all ids. + + var $accountancy_code; // Accountancy code in prevision of the complete accountancy module /** @@ -149,6 +151,7 @@ class User extends CommonObject $sql.= " u.datepreviouslogin as datep,"; $sql.= " u.photo as photo,"; $sql.= " u.openid as openid,"; + $sql.= " u.accountancy_code,"; $sql.= " u.ref_int, u.ref_ext"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; @@ -209,6 +212,7 @@ class User extends CommonObject $this->openid = $obj->openid; $this->lang = $obj->lang; $this->entity = $obj->entity; + $this->accountancy_code = $obj->accountancy_code; $this->datec = $this->db->jdate($obj->datec); $this->datem = $this->db->jdate($obj->datem); @@ -1114,6 +1118,7 @@ class User extends CommonObject $this->address = empty($this->address)?'':$this->address; $this->zip = empty($this->zip)?'':$this->zip; $this->town = empty($this->town)?'':$this->town; + $this->accountancy_code = trim($this->accountancy_code); // Check parameters if (! empty($conf->global->USER_MAIL_REQUIRED) && ! isValidEMail($this->email)) @@ -1142,6 +1147,7 @@ class User extends CommonObject $sql.= ", email = '".$this->db->escape($this->email)."'"; $sql.= ", job = '".$this->db->escape($this->job)."'"; $sql.= ", signature = '".$this->db->escape($this->signature)."'"; + $sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'"; $sql.= ", note = '".$this->db->escape($this->note)."'"; $sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null"); $sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null"); diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 53de51df268..66cb62ef362 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -188,6 +188,7 @@ if ($action == 'add' && $canadduser) $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); + $object->accountancy_code = GETPOST("accountancy_code"); $object->note = GETPOST("note"); $object->ldap_sid = GETPOST("ldap_sid"); @@ -324,6 +325,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); + $object->accountancy_code = GETPOST("accountancy_code"); $object->openid = GETPOST("openid"); $object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0; @@ -1192,6 +1194,10 @@ else } print ''; print "\n"; + + // Accountancy code + print ''.$langs->trans("AccountancyCode").''; + print ''.$object->accountancy_code.''; // Status print ''.$langs->trans("Status").''; @@ -1821,6 +1827,21 @@ else } print ''; print "\n"; + + // Accountancy code + print ""; + print ''.$langs->trans("AccountancyCode").''; + print ''; + if ($caneditfield) + { + print ''; + } + else + { + print ''; + print $object->accountancy_code; + } + print ''; // Status print ''.$langs->trans("Status").''; From 76870622e46ebaa5f3e74adb9e12aaee62d37551 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 25 Jun 2013 14:54:29 +0200 Subject: [PATCH 13/29] Add turnover report by product / serv --- htdocs/compta/stats/cabyprodserv.php | 13 ++++++----- htdocs/core/menus/init_menu_auguria.sql | 1 + htdocs/paybox/admin/paybox.php | 30 ++++++++++++------------- htdocs/paypal/admin/paypal.php | 12 +++++----- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index ebfe0c4834b..3ae699709af 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -327,7 +327,7 @@ if ($modecompta == 'CREANCES-DETTES') { $var=!$var; print ""; - // Third party + // Product $fullname=$name[$key]; if ($key >= 0) { $linkname=''.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.''; @@ -339,23 +339,24 @@ if ($modecompta == 'CREANCES-DETTES') { // Amount w/o VAT print ''; - if ($key > 0) { + /*if ($key > 0) { print ''; } else { print ''; - } + }*/ print price($amount_ht[$key]); + //print ''; print ''; // Amount with VAT print ''; - if ($key > 0) { + /*if ($key > 0) { print ''; } else { print ''; - } + }*/ print price($amount[$key]); - print ''; + //print ''; print ''; // Percent; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index ceaa41b404c..fa0e48556c8 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -198,6 +198,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -- Check deposit diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index c55574d363a..0871aaf71e0 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -61,8 +61,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -93,12 +93,12 @@ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup'); -$h = 0; -$head = array(); - -$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; -$head[$h][1] = $langs->trans("Account"); -$head[$h][2] = 'payboxaccount'; +$h = 0; +$head = array(); + +$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; +$head[$h][1] = $langs->trans("Account"); +$head[$h][2] = 'payboxaccount'; $h++; dol_fiche_head($head, 'payboxaccount', ''); @@ -198,17 +198,17 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; -print ''; -print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +$var=!$var; +print ''; +print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; +print ''; +print '   '.$langs->trans("Example").': myemail@myserver.com'; +print ''; print '
'; print ''; -dol_fiche_end(); +dol_fiche_end(); print '

'; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 998f724dc68..c91e2ff0c80 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -67,8 +67,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -203,12 +203,12 @@ $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; +$var=!$var; +print ''; +print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; print ''; print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +print ''; $var=true; print ''; From c2654fa7e25ffbc75f8b81afbd6f8d52501f7509 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2013 15:00:10 +0200 Subject: [PATCH 14/29] Fix: Bad translation. Must use a different string than products --- htdocs/core/lib/project.lib.php | 2 +- htdocs/langs/en_US/projects.lang | 1 + htdocs/langs/fr_FR/projects.lang | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 3a8bd016e21..089a0920460 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -53,7 +53,7 @@ function project_prepare_head($object) || ! empty($conf->ficheinter->enabled) || ! empty($conf->agenda->enabled) || ! empty($conf->deplacement->enabled)) { $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$object->id; - $head[$h][1] = $langs->trans("Referers"); + $head[$h][1] = $langs->trans("ProjectReferers"); $head[$h][2] = 'element'; $h++; } diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 3851d6b9967..2db631e3d0e 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -105,3 +105,4 @@ TypeContact_project_task_internal_CONTRIBUTOR=Contributor TypeContact_project_task_external_CONTRIBUTOR=Contributor # Documents models DocumentModelBaleine=A complete project's report model (logo...) +ProjectReferers=Refering objects \ No newline at end of file diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 78661416180..e26e92322e5 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -107,3 +107,4 @@ TypeContact_project_task_external_CONTRIBUTOR=Intervenant DocumentModelBaleine=Modèle de rapport de projet complet (logo...) SelectElement=Eléments associable au projet : AddElement=Associer +ProjectReferers=Objets associés \ No newline at end of file From 54bf3fd51614d04fec9dccc3b329c7ec320c87ff Mon Sep 17 00:00:00 2001 From: jfefe Date: Tue, 25 Jun 2013 15:09:51 +0200 Subject: [PATCH 15/29] Add parameter to force user in dol_check_access_document function This required by webservice where global $user is not available --- htdocs/core/lib/files.lib.php | 113 ++++++++++++++-------------- htdocs/webservices/server_other.php | 2 +- 2 files changed, 59 insertions(+), 56 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1c26fbf5915..8ff9e6bbc47 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1235,13 +1235,16 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$ * * @param string $modulepart Module of document * @param string $original_file Relative path with filename + * @param User $fuser User object (forced) * @param string $entity Restrict onto entity * @return mixed Array with access information : accessallowed & sqlprotectagainstexternals & original_file (as full path name) */ -function dol_check_secure_access_document($modulepart,$original_file,$entity) +function dol_check_secure_access_document($modulepart,$original_file,$entity,$fuser='') { global $user, $conf; + if (! is_object($fuser)) $fuser=$user; + if (empty($modulepart)) return 'ErrorBadParameter'; if (empty($entity)) $entity=0; dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file); @@ -1271,101 +1274,101 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les apercu factures elseif ($modulepart == 'apercufacture') { - if ($user->rights->facture->lire) $accessallowed=1; + if ($fuser->rights->facture->lire) $accessallowed=1; $original_file=$conf->facture->dir_output.'/'.$original_file; } // Wrapping pour les apercu propal elseif ($modulepart == 'apercupropal') { - if ($user->rights->propale->lire) $accessallowed=1; + if ($fuser->rights->propale->lire) $accessallowed=1; $original_file=$conf->propal->dir_output.'/'.$original_file; } // Wrapping pour les apercu commande elseif ($modulepart == 'apercucommande') { - if ($user->rights->commande->lire) $accessallowed=1; + if ($fuser->rights->commande->lire) $accessallowed=1; $original_file=$conf->commande->dir_output.'/'.$original_file; } // Wrapping pour les apercu intervention elseif ($modulepart == 'apercufichinter') { - if ($user->rights->ficheinter->lire) $accessallowed=1; + if ($fuser->rights->ficheinter->lire) $accessallowed=1; $original_file=$conf->ficheinter->dir_output.'/'.$original_file; } // Wrapping pour les images des stats propales elseif ($modulepart == 'propalstats') { - if ($user->rights->propale->lire) $accessallowed=1; + if ($fuser->rights->propale->lire) $accessallowed=1; $original_file=$conf->propal->dir_temp.'/'.$original_file; } // Wrapping pour les images des stats commandes elseif ($modulepart == 'orderstats') { - if ($user->rights->commande->lire) $accessallowed=1; + if ($fuser->rights->commande->lire) $accessallowed=1; $original_file=$conf->commande->dir_temp.'/'.$original_file; } elseif ($modulepart == 'orderstatssupplier') { - if ($user->rights->fournisseur->commande->lire) $accessallowed=1; + if ($fuser->rights->fournisseur->commande->lire) $accessallowed=1; $original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file; } // Wrapping pour les images des stats factures elseif ($modulepart == 'billstats') { - if ($user->rights->facture->lire) $accessallowed=1; + if ($fuser->rights->facture->lire) $accessallowed=1; $original_file=$conf->facture->dir_temp.'/'.$original_file; } elseif ($modulepart == 'billstatssupplier') { - if ($user->rights->fournisseur->facture->lire) $accessallowed=1; + if ($fuser->rights->fournisseur->facture->lire) $accessallowed=1; $original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file; } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'expeditionstats') { - if ($user->rights->expedition->lire) $accessallowed=1; + if ($fuser->rights->expedition->lire) $accessallowed=1; $original_file=$conf->expedition->dir_temp.'/'.$original_file; } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'tripsexpensesstats') { - if ($user->rights->deplacement->lire) $accessallowed=1; + if ($fuser->rights->deplacement->lire) $accessallowed=1; $original_file=$conf->deplacement->dir_temp.'/'.$original_file; } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'memberstats') { - if ($user->rights->adherent->lire) $accessallowed=1; + if ($fuser->rights->adherent->lire) $accessallowed=1; $original_file=$conf->adherent->dir_temp.'/'.$original_file; } // Wrapping pour les images des stats produits elseif (preg_match('/^productstats_/i',$modulepart)) { - if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1; + if ($fuser->rights->produit->lire || $fuser->rights->service->lire) $accessallowed=1; $original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file; } // Wrapping for products or services elseif ($modulepart == 'tax') { - if ($user->rights->tax->charges->lire) $accessallowed=1; + if ($fuser->rights->tax->charges->lire) $accessallowed=1; $original_file=$conf->tax->dir_output.'/'.$original_file; } // Wrapping for products or services elseif ($modulepart == 'actions') { - if ($user->rights->agenda->myactions->read) $accessallowed=1; + if ($fuser->rights->agenda->myactions->read) $accessallowed=1; $original_file=$conf->agenda->dir_output.'/'.$original_file; } // Wrapping for categories elseif ($modulepart == 'category') { - if ($user->rights->categorie->lire) $accessallowed=1; + if ($fuser->rights->categorie->lire) $accessallowed=1; $original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file; } // Wrapping pour les prelevements elseif ($modulepart == 'prelevement') { - if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1408,7 +1411,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) elseif ($modulepart == 'scanner_user_temp') { $accessallowed=1; - $original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file; + $original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; } // Wrapping pour les images fckeditor elseif ($modulepart == 'fckeditor') @@ -1420,7 +1423,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping for third parties else if ($modulepart == 'company' || $modulepart == 'societe') { - if ($user->rights->societe->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->societe->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1431,7 +1434,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping for invoices else if ($modulepart == 'facture' || $modulepart == 'invoice') { - if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1441,7 +1444,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) else if ($modulepart == 'unpaid') { - if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1451,7 +1454,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les fiches intervention else if ($modulepart == 'ficheinter') { - if ($user->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1462,7 +1465,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les deplacements et notes de frais else if ($modulepart == 'deplacement') { - if ($user->rights->deplacement->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->deplacement->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1472,7 +1475,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les propales else if ($modulepart == 'propal') { - if ($user->rights->propale->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->propale->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1484,7 +1487,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les commandes else if ($modulepart == 'commande' || $modulepart == 'order') { - if ($user->rights->commande->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->commande->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1495,7 +1498,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les projets else if ($modulepart == 'project') { - if ($user->rights->projet->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1506,7 +1509,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les commandes fournisseurs else if ($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') { - if ($user->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1517,7 +1520,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les factures fournisseurs else if ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') { - if ($user->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1528,18 +1531,18 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les rapport de paiements else if ($modulepart == 'facture_paiement') { - if ($user->rights->facture->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } - if ($user->societe_id > 0) $original_file=$conf->facture->dir_output.'/payments/private/'.$user->id.'/'.$original_file; + if ($fuser->societe_id > 0) $original_file=$conf->facture->dir_output.'/payments/private/'.$fuser->id.'/'.$original_file; else $original_file=$conf->facture->dir_output.'/payments/'.$original_file; } // Wrapping pour les exports de compta else if ($modulepart == 'export_compta') { - if ($user->rights->compta->ventilation->creer || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->compta->ventilation->creer || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1549,7 +1552,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les expedition else if ($modulepart == 'expedition') { - if ($user->rights->expedition->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->expedition->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1559,7 +1562,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les bons de livraison else if ($modulepart == 'livraison') { - if ($user->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1569,7 +1572,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les actions else if ($modulepart == 'actions') { - if ($user->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1579,7 +1582,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les actions else if ($modulepart == 'actionsreport') { - if ($user->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1589,7 +1592,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les produits et services else if ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service') { - if (($user->rights->produit->lire || $user->rights->service->lire) || preg_match('/^specimen/i',$original_file)) + if (($fuser->rights->produit->lire || $fuser->rights->service->lire) || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1600,7 +1603,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les contrats else if ($modulepart == 'contract') { - if ($user->rights->contrat->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->contrat->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1610,7 +1613,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les dons else if ($modulepart == 'donation') { - if ($user->rights->don->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->don->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1620,7 +1623,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les remises de cheques else if ($modulepart == 'remisecheque') { - if ($user->rights->banque->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->banque->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1634,7 +1637,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Aucun test necessaire car on force le rep de download sur // le rep export qui est propre a l'utilisateur $accessallowed=1; - $original_file=$conf->export->dir_temp.'/'.$user->id.'/'.$original_file; + $original_file=$conf->export->dir_temp.'/'.$fuser->id.'/'.$original_file; } // Wrapping for import module @@ -1658,7 +1661,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour les backups else if ($modulepart == 'systemtools') { - if ($user->admin) + if ($fuser->admin) { $accessallowed=1; } @@ -1668,7 +1671,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping for upload file test else if ($modulepart == 'admin_temp') { - if ($user->admin) + if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_temp.'/'.$original_file; } @@ -1685,7 +1688,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Wrapping pour Foundation module else if ($modulepart == 'member') { - if ($user->rights->adherent->lire || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->adherent->lire || preg_match('/^specimen/i',$original_file)) { $accessallowed=1; } @@ -1696,7 +1699,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) else if ($modulepart == 'scanner_user_temp') { $accessallowed=1; - $original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file; + $original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; } // GENERIC Wrapping @@ -1709,18 +1712,18 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) // Define $accessallowed if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg)) { - if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1; - $original_file=$conf->$reg[1]->dir_temp.'/'.$user->id.'/'.$original_file; + if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1; + $original_file=$conf->$reg[1]->dir_temp.'/'.$fuser->id.'/'.$original_file; } else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) { - if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1; + if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1; $original_file=$conf->$reg[1]->dir_temp.'/'.$original_file; } else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) { - if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1; - $original_file=$conf->$reg[1]->dir_output.'/'.$user->id.'/'.$original_file; + if ($fuser->rights->$reg[1]->lire || $fuser->rights->$reg[1]->read || ($fuser->rights->$reg[1]->download)) $accessallowed=1; + $original_file=$conf->$reg[1]->dir_output.'/'.$fuser->id.'/'.$original_file; } else { @@ -1728,24 +1731,24 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) $subperm=GETPOST('subperm'); if ($perm || $subperm) { - if (($perm && ! $subperm && $user->rights->$modulepart->$perm) || ($perm && $subperm && $user->rights->$modulepart->$perm->$subperm)) $accessallowed=1; + if (($perm && ! $subperm && $fuser->rights->$modulepart->$perm) || ($perm && $subperm && $fuser->rights->$modulepart->$perm->$subperm)) $accessallowed=1; $original_file=$conf->$modulepart->dir_output.'/'.$original_file; } else { - if ($user->rights->$modulepart->lire || $user->rights->$modulepart->read) $accessallowed=1; + if ($fuser->rights->$modulepart->lire || $fuser->rights->$modulepart->read) $accessallowed=1; $original_file=$conf->$modulepart->dir_output.'/'.$original_file; } } if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen - if ($user->admin) $accessallowed=1; // If user is admin + if ($fuser->admin) $accessallowed=1; // If user is admin // For modules who wants to manage different levels of permissions for documents $subPermCategoryConstName = strtoupper($modulepart).'_SUBPERMCATEGORY_FOR_DOCUMENTS'; if (! empty($conf->global->$subPermCategoryConstName)) { $subPermCategory = $conf->global->$subPermCategoryConstName; - if (! empty($subPermCategory) && (($user->rights->$modulepart->$subPermCategory->lire) || ($user->rights->$modulepart->$subPermCategory->read) || ($user->rights->$modulepart->$subPermCategory->download))) + if (! empty($subPermCategory) && (($fuser->rights->$modulepart->$subPermCategory->lire) || ($fuser->rights->$modulepart->$subPermCategory->read) || ($fuser->rights->$modulepart->$subPermCategory->download))) { $accessallowed=1; } @@ -1759,7 +1762,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) eval('$sqlprotectagainstexternals = "'.$conf->global->$sqlProtectConstName.'";'); } } - + $ret = array( 'accessallowed' => $accessallowed, 'sqlprotectagainstexternals'=>$sqlprotectagainstexternals, diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index bb296f56794..f0e30449404 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -221,7 +221,7 @@ function getDocument($authentication, $modulepart, $file) $refname=basename(dirname($original_file)."/"); // Security check - $check_access = dol_check_secure_access_document($modulepart,$original_file,$conf->entity); + $check_access = dol_check_secure_access_document($modulepart,$original_file,$conf->entity,$fuser); $accessallowed = $check_access['accessallowed']; $sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals']; $original_file = $check_access['original_file']; From 285ea8da3f0eadd3c562b3d00583c5e8a4e6de5a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2013 15:47:59 +0200 Subject: [PATCH 16/29] More info into log --- htdocs/core/db/pgsql.class.php | 15 ++++++++------- htdocs/core/modules/DolibarrModules.class.php | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 2173738f4d5..6e670bd01c5 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -56,15 +56,16 @@ class DoliDBPgsql //! >=1 if a transaction is opened, 0 otherwise var $transaction_opened; var $lastquery; - var $lastqueryerror; // Ajout d'une variable en cas d'erreur - + // Saved last error + var $lastqueryerror; + var $lasterror; + var $lasterrno; + var $unescapeslashquot=0; // By default we do not force the unescape of \'. This is used only to process sql with mysql escaped data. var $standard_conforming_strings=1; // Database has option standard_conforming_strings to on var $ok; var $error; - var $lasterror; - /** @@ -583,17 +584,17 @@ class DoliDBPgsql { if (! $ret) { - if ($this->errno() != 'DB_ERROR_25P02') + if ($this->errno() != 'DB_ERROR_25P02') // Do not overwrite errors if this is a consecutive error { $this->lastqueryerror = $query; $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); } - dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." = ".$this->errno(), LOG_WARNING); + dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_WARNING); //print "\n>> ".$query."
\n"; //print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."
\n"; - if ($usesavepoint && $this->transaction_opened) + if ($usesavepoint && $this->transaction_opened) // Warning, after that errno will be erased { @pg_query($this->db, 'ROLLBACK TO SAVEPOINT mysavepoint'); } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 73bf0c9e3d5..fc20ebe0f2f 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -894,11 +894,12 @@ abstract class DolibarrModules if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS") { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::insert_permissions error ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::insert_permissions errno = ".$this->db->errno()." error ".$this->error, LOG_ERR); $err++; break; } else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO); + } $this->db->free($resqlinsert); From 187feff7d5eb21e24e60000fae6136b74658fb10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2013 20:40:22 +0200 Subject: [PATCH 17/29] Prepare 3.3.3 --- build/debian/changelog | 2 +- build/exe/doliwamp/doliwamp.iss | 4 ++-- build/makepack-dolibarr.pl | 2 +- build/perl/virtualmin/dolibarr.pl | 2 +- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- htdocs/filefunc.inc.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/debian/changelog b/build/debian/changelog index b9302cfc624..d364648aadc 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,4 +1,4 @@ -dolibarr (3.3.2+nmu1) unstable; urgency=low +dolibarr (3.3.3+nmu1) unstable; urgency=low * Non-maintainer upload. * New upstream release. diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 4f9b0fabea6..90d0595b41b 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -17,9 +17,9 @@ ; ----- Change this ----- AppName=DoliWamp ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -AppVerName=DoliWamp-3.3.2 +AppVerName=DoliWamp-3.3.3 ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -OutputBaseFilename=DoliWamp-3.3.2 +OutputBaseFilename=DoliWamp-3.3.3 ; Define full path from wich all relative path are defined ; You must modify this to put here your dolibarr root directory ;SourceDir=C:\Documents and Settings\ldestailleur\git\dolibarr_old diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index ee44ac8a493..2510da50a08 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -10,7 +10,7 @@ use Cwd; $PROJECT="dolibarr"; $MAJOR="3"; $MINOR="3"; -$BUILD="2"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate +$BUILD="3"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate $RPMSUBVERSION="auto"; # auto use value found into BUILD @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 0ede11d9968..0f7f95ff7d7 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" ); +return ( "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" ); } sub script_dolibarr_category diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 8f36bc14805..a72b4955342 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -332,5 +332,5 @@ fi %changelog -* Mon Apr 22 2013 Laurent Destailleur 3.3.2-0.3 +* Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 3e0bb99f586..efa2ba5b12b 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -521,5 +521,5 @@ fi %changelog -* Mon Apr 22 2013 Laurent Destailleur 3.3.2-0.3 +* Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index dad739ba8b9..54878c1c568 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -321,5 +321,5 @@ fi %changelog -* Mon Apr 22 2013 Laurent Destailleur 3.3.2-0.3 +* Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index efe8152687b..a996497f273 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -332,5 +332,5 @@ fi %changelog -* Mon Apr 22 2013 Laurent Destailleur 3.3.2-0.3 +* Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3 - Initial version (#723326) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index f3780d0876a..5249c47e4ea 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -29,7 +29,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.3.2'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.3.3'); if (! defined('EURO')) define('EURO',chr(128)); // Define syslog constants From 2af8f295b12f525cc37fafdc2a472d8e2abbdb50 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2013 21:25:09 +0200 Subject: [PATCH 18/29] Fix: warning not always visible. Depends if addon modules were installed. Var should provide a quick fix. --- htdocs/admin/index.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 41d52b93834..6bb21958b7c 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -68,7 +68,7 @@ print '
'; print '
'; //print '
'; print img_picto('','puce').' '.$langs->trans("SetupDescription4",DOL_URL_ROOT.'/admin/modules.php?mainmenu=home'); -if (count($conf->modules) <= 1) // If only user module enabled +if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->global->MAIN_MINNB_MODULE)) // If only user module enabled { $langs->load("errors"); $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 18becb5d0e4..c9f3dc02677 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -660,7 +660,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) } $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup").' '.$warnpicto,1); $warnpicto=''; - if (count($conf->modules) <= 1) // If only user module enabled + if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->global->MAIN_MINNB_MODULE)) // If only user module enabled { $langs->load("errors"); $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); From 9b235f68791d8891c4de32effb25d2c1372953df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 02:05:18 +0200 Subject: [PATCH 19/29] Fix: Remove space at end of binary files --- htdocs/core/lib/files.lib.php | 2 +- htdocs/document.php | 2 +- htdocs/viewimage.php | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 22a86cd7b3f..02cb6e663e2 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1248,7 +1248,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu if (empty($modulepart)) return 'ErrorBadParameter'; if (empty($entity)) $entity=0; - dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file); + dol_syslog('modulepart='.$modulepart.' original_file= '.$original_file); // We define $accessallowed and $sqlprotectagainstexternals $accessallowed=0; $sqlprotectagainstexternals=''; diff --git a/htdocs/document.php b/htdocs/document.php index 15ac9d0d9ca..c3c7e1fc523 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -178,4 +178,4 @@ header('Pragma: public'); readfile($original_file_osencoded); -?> +if (is_object($db)) $db->close(); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 200986dd08a..4a9e7538faa 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -198,4 +198,3 @@ else // Open and return file if (is_object($db)) $db->close(); -?> From 882d34fa881a0d4cb24356f36e1d9eb67b542cdf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 11:40:29 +0200 Subject: [PATCH 20/29] Fix: css --- htdocs/theme/eldy/style.css.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 3bc5c179d2e..f249e17da20 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2703,11 +2703,12 @@ a.ui-link { background: #fff; } -div.ui-radio +div.ui-radio, div.ui-checkbox { display: inline-block; + border-bottom: 0px !important; } -.ui-radio input { +ui-checkbox input, .ui-radio input { height: auto; width: auto; margin: 0; From 5f67142fc12a40dab09629412cd9c8bffa435c06 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 11:58:01 +0200 Subject: [PATCH 21/29] Start prototype for datatable --- htdocs/theme/eldy/style.css.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f249e17da20..43c9313367d 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1571,7 +1571,7 @@ span.butAction, span.butActionDelete { } -table.border { +table.border, table.dataTable { border: 1px solid #9CACBB; border-collapse: collapse; } @@ -1687,11 +1687,11 @@ table.liste td { .tagtr { display: table-row; } .tagtd { display: table-cell; } -tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel +tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr { height: 20px !important; } -div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel +div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr { background: rgb(); background-repeat: repeat-x; From 1de8ab37854b3566c92cb8446ebd50737049b534 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 14:38:56 +0200 Subject: [PATCH 22/29] Fix: CSS --- htdocs/core/class/html.form.class.php | 2 +- htdocs/theme/amarok/style.css.php | 8 ++++++-- htdocs/theme/auguria/style.css.php | 8 ++++++-- htdocs/theme/bureau2crea/style.css.php | 8 ++++++-- htdocs/theme/cameleo/style.css.php | 8 ++++++-- htdocs/theme/eldy/style.css.php | 8 ++++++-- 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8113d95a201..d0ed0b911eb 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3497,7 +3497,7 @@ class Form // Year if ($empty || $set_time == -1) { - $retstring.=''; + $retstring.=''; } else { diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index b81ae3a090e..7dd45121a00 100755 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -256,6 +256,10 @@ input:-webkit-autofill { background-image:none !important; -webkit-box-shadow: 0 0 0 50px inset; } +::-webkit-input-placeholder { color:#ccc; } +::-moz-placeholder { color:#ccc; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ +input:-moz-placeholder { color:#ccc; } legend { margin-bottom: 8px; } @@ -2150,10 +2154,10 @@ div.ui-radio { display: inline-block; } -.ui-radio input { +.ui-checkbox input, .ui-radio input { height: auto; width: auto; - margin: 0; + margin: 4px; position: static; } .ui-mobile fieldset diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 51ce8347492..3f6237ee36d 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -148,6 +148,10 @@ input:-webkit-autofill { background-image:none !important; -webkit-box-shadow: 0 0 0 50px inset; } +::-webkit-input-placeholder { color:#ccc; } +::-moz-placeholder { color:#ccc; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ +input:-moz-placeholder { color:#ccc; } legend { margin-bottom: 8px; } @@ -2283,10 +2287,10 @@ div.ui-radio { display: inline-block; } -.ui-radio input { +.ui-checkbox input, .ui-radio input { height: auto; width: auto; - margin: 0; + margin: 4px; position: static; } .ui-mobile fieldset diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 3984389566c..134083c7dd2 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -176,6 +176,10 @@ input.button[type=submit] { font-size: 10px; display: inline; } +::-webkit-input-placeholder { color:#ccc; } +::-moz-placeholder { color:#ccc; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ +input:-moz-placeholder { color:#ccc; } legend { margin-bottom: 8px; } @@ -2493,10 +2497,10 @@ div.ui-radio { display: inline-block; } -.ui-radio input { +.ui-checkbox input, .ui-radio input { height: auto; width: auto; - margin: 0; + margin: 4px; position: static; } .ui-mobile fieldset diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index d2074ed79e1..d71151f28bf 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -154,6 +154,10 @@ input.button[type=submit] { font-size: 11px; font-weight: bold; } +::-webkit-input-placeholder { color:#ccc; } +::-moz-placeholder { color:#ccc; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ +input:-moz-placeholder { color:#ccc; } legend { margin-bottom: 8px; } @@ -2384,10 +2388,10 @@ div.ui-radio { display: inline-block; } -.ui-radio input { +.ui-checkbox input, .ui-radio input { height: auto; width: auto; - margin: 0; + margin: 4px; position: static; } .ui-mobile fieldset diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 43c9313367d..82e7d22fe2e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -285,6 +285,10 @@ input:-webkit-autofill { background-image:none !important; -webkit-box-shadow: 0 0 0 50px inset; } +::-webkit-input-placeholder { color:#ccc; } +::-moz-placeholder { color:#ccc; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ +input:-moz-placeholder { color:#ccc; } legend { margin-bottom: 8px; } @@ -2708,10 +2712,10 @@ div.ui-radio, div.ui-checkbox display: inline-block; border-bottom: 0px !important; } -ui-checkbox input, .ui-radio input { +.ui-checkbox input, .ui-radio input { height: auto; width: auto; - margin: 0; + margin: 4px; position: static; } .ui-mobile fieldset From 59f99c416b8307a8d6ca6aa19fa7455f0054e566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Wed, 26 Jun 2013 15:19:02 +0200 Subject: [PATCH 23/29] CRLF to LF --- htdocs/paybox/admin/paybox.php | 30 +++++++++++++++--------------- htdocs/paypal/admin/paypal.php | 12 ++++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index c55574d363a..0871aaf71e0 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -61,8 +61,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -93,12 +93,12 @@ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup'); -$h = 0; -$head = array(); - -$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; -$head[$h][1] = $langs->trans("Account"); -$head[$h][2] = 'payboxaccount'; +$h = 0; +$head = array(); + +$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; +$head[$h][1] = $langs->trans("Account"); +$head[$h][2] = 'payboxaccount'; $h++; dol_fiche_head($head, 'payboxaccount', ''); @@ -198,17 +198,17 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; -print ''; -print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +$var=!$var; +print ''; +print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; +print ''; +print '   '.$langs->trans("Example").': myemail@myserver.com'; +print ''; print '
'; print ''; -dol_fiche_end(); +dol_fiche_end(); print '

'; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 998f724dc68..c91e2ff0c80 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -67,8 +67,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -203,12 +203,12 @@ $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; +$var=!$var; +print ''; +print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; print ''; print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +print ''; $var=true; print ''; From df94f3816c7a0058d343ba174efeac030f8650e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Thu, 20 Jun 2013 17:01:30 +0200 Subject: [PATCH 24/29] add hook to add line options in html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d33f8546f8a..082080a0316 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -529,6 +529,7 @@ class FormFile $out.= ($param?'&'.$param:''); $out.= '">'.img_printer().''; } + if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file); } $out.= ''; From bfedddd95ec5ba8420380bc1bd18dcef349d1f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Thu, 20 Jun 2013 19:01:32 +0200 Subject: [PATCH 25/29] init hook --- htdocs/core/class/html.formfile.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 082080a0316..8d8022a0264 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -207,7 +207,7 @@ class FormFile return $this->getDocumentsLink($modulepart, $filename, $filedir); } $printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false; - + $hookmanager->initHooks(array('formfile')); $forname='builddoc'; $out=''; $var=true; @@ -450,9 +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=''; - $out.= $genbutton; $out.= ''; From 117ddbdff2acfa4a95f3d568dc6e0f25f7b16105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Wed, 26 Jun 2013 11:09:03 +0200 Subject: [PATCH 26/29] add columns if active hooks use the formBuilddocLineOptions method --- htdocs/core/class/html.formfile.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 8d8022a0264..0d2e3163be6 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -455,7 +455,13 @@ class FormFile $out.= ''; if ($printer) $out.= ''; - + if($hookmanager->hooks['formfile']) + { + foreach($hookmanager->hooks['formfile'] as $module) + { + if(method_exists($module, 'formBuilddocLineOptions')) $out .= ''; + } + } $out.= ''; // Execute hooks From 696ad07871c5c81624dca7d3853a37bb49a23455 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 16:45:42 +0200 Subject: [PATCH 27/29] LF --- htdocs/core/db/pgsql.class.php | 4 +-- .../doc/doc_generic_invoice_odt.modules.php | 5 ++-- htdocs/document.php | 2 +- htdocs/langs/en_US/admin.lang | 4 +-- htdocs/langs/fr_FR/admin.lang | 4 +-- htdocs/paybox/admin/paybox.php | 30 +++++++++---------- htdocs/paypal/admin/paypal.php | 12 ++++---- 7 files changed, 31 insertions(+), 30 deletions(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index c4282fa8abd..255b2c6e66f 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -58,8 +58,8 @@ class DoliDBPgsql var $lastquery; // Saved last error var $lastqueryerror; - var $lasterror; - var $lasterrno; + var $lasterror; + var $lasterrno; var $unescapeslashquot=0; // By default we do not force the unescape of \'. This is used only to process sql with mysql escaped data. var $standard_conforming_strings=1; // Database has option standard_conforming_strings to on diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index d3611f2bea8..dbc7cdd8c9f 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -55,7 +55,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $langs->load("companies"); $this->db = $db; - $this->name = "ODT templates"; + $this->name = "ODT/ODS templates"; $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'FACTURE_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan @@ -114,6 +114,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures 'object_source_invoice_ref'=>$invoice_source->ref, 'object_hour'=>dol_print_date($object->date,'hour'), 'object_date'=>dol_print_date($object->date,'day'), + 'object_date_rfc'=>dol_print_date($object->date,'dayrfc'), 'object_date_limit'=>dol_print_date($object->date_lim_reglement,'day'), 'object_date_creation'=>dol_print_date($object->date_creation,'day'), 'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''), @@ -220,7 +221,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0); else { - $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt'); + $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)'); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); } } diff --git a/htdocs/document.php b/htdocs/document.php index c3c7e1fc523..9815bbdd7e6 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -178,4 +178,4 @@ header('Pragma: public'); readfile($original_file_osencoded); -if (is_object($db)) $db->close(); +if (is_object($db)) $db->close(); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1646c7f271e..90c7489089e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -313,7 +313,7 @@ LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory ExamplesWithCurrentSetup=Examples with current running setup ListOfDirectories=List of OpenDocument templates directories ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.

Put here full path of directories.
Add a carriage return between eah directory.
To add a directory of the GED module, add here DOL_DATA_ROOT/ecm/yourdirectoryname.

Files in those directories must end with .odt. -NumberOfModelFilesFound=Number of ODT templates files found in those directories +NumberOfModelFilesFound=Number of ODT/ODS templates files found in those directories ExampleOfDirectoriesForModelGen=Examples of syntax:
c:\mydir
/home/mydir
DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=
To know how to create your odt document templates, before storing them in those directories, read wiki documentation: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template @@ -1002,7 +1002,7 @@ ModuleCompanyCodeDigitaria=Accountancy code depends on third party code. The cod UseNotifications=Use notifications NotificationsDesc=EMails notifications feature allows you to silently send automatic mail, for some Dolibarr events, to third parties (customers or suppliers) that are configured to. Choice of active notification and targets contacts is made one third party at time. ModelModules=Documents templates -DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for OpenOffice, KOffice, TextEdit,...) +DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...) WatermarkOnDraft=Watermark on draft document CompanyIdProfChecker=Rules on Professional Ids MustBeUnique=Must be unique ? diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index ef98c76c657..f3b134eec83 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -314,7 +314,7 @@ LanguageFilesCachedIntoShmopSharedMemory=Fichiers .lang en mémoire partagée ExamplesWithCurrentSetup=Exemples avec le paramétrage actif courant ListOfDirectories=Liste des répertoires des modèles OpenDocument ListOfDirectoriesForModelGenODT=Liste des répertoires contenant des documents modèles OpenDocument.

Indiquer les chemins complets de répertoire.
Ajouter un retour à la ligne entre chaque répertoire.
Pour indiquer un répertoire du module GED, indiquer
DOL_DATA_ROOT/ecm/nomdurepertoireged

Les fichiers modèles dans ces répertoires doivent se terminer par .odt. -NumberOfModelFilesFound=Nombre de fichiers modèles ODT trouvés dans ce(s) répertoire(s) +NumberOfModelFilesFound=Nombre de fichiers modèles ODT/ODS trouvés dans ce(s) répertoire(s) ExampleOfDirectoriesForModelGen=Exemple de syntaxe :
c:\\mydir
/home/mydir
DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=
Pour savoir comment rédiger des modèles de document odt avant de les placer dans un de ces répertoires, consulter la documentation du wiki : FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Créer_un_modèle_de_document_ODT @@ -1004,7 +1004,7 @@ ModuleCompanyCodeDigitaria=Renvoie un code comptable composé suivant le code ti UseNotifications=Utiliser les notifications NotificationsDesc=La fonction des notifications par emails permet d'envoyer automatiquement un email, pour certains événements Dolibarr, aux tiers (sociétés clients, prospects ou fournisseurs) configurés pour. Le choix des notifications et contacts destinataires se fait tiers par tiers. ModelModules=Modèle de documents -DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT OpenOffice, KOffice, TextEdit…) +DocumentModelOdt=Génération depuis des modèles OpenDocument (Fichier .ODT ou .ODS OpenOffice, KOffice, TextEdit…) WatermarkOnDraft=Filigrane sur les documents brouillons CompanyIdProfChecker=Règles sur les Identifiants professionnels MustBeUnique=Doit être unique ? diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index c55574d363a..0871aaf71e0 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -61,8 +61,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -93,12 +93,12 @@ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup'); -$h = 0; -$head = array(); - -$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; -$head[$h][1] = $langs->trans("Account"); -$head[$h][2] = 'payboxaccount'; +$h = 0; +$head = array(); + +$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php"; +$head[$h][1] = $langs->trans("Account"); +$head[$h][2] = 'payboxaccount'; $h++; dol_fiche_head($head, 'payboxaccount', ''); @@ -198,17 +198,17 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; -print ''; -print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +$var=!$var; +print ''; +print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; +print ''; +print '   '.$langs->trans("Example").': myemail@myserver.com'; +print ''; print '
'; print ''; -dol_fiche_end(); +dol_fiche_end(); print '

'; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 998f724dc68..c91e2ff0c80 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -67,8 +67,8 @@ if ($action == 'setvalue' && $user->admin) if (! $result > 0) $error++; $result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO'),'chaine',0,'',$conf->entity); if (! $result > 0) $error++; - $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); - if (! $result > 0) $error++; + $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity); + if (! $result > 0) $error++; if (! $error) { @@ -203,12 +203,12 @@ $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'' $doleditor->Create(); print ''; -$var=!$var; -print ''; -print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; +$var=!$var; +print ''; +print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; print ''; print '   '.$langs->trans("Example").': myemail@myserver.com'; -print ''; +print ''; $var=true; print ''; From f02fa8a41dc861f5d2f26cea4c21726d5c049718 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jun 2013 17:58:34 +0200 Subject: [PATCH 28/29] Fix: css when using checkbox into label --- htdocs/theme/amarok/style.css.php | 4 ++++ htdocs/theme/auguria/style.css.php | 4 ++++ htdocs/theme/bureau2crea/style.css.php | 4 ++++ htdocs/theme/cameleo/style.css.php | 4 ++++ htdocs/theme/eldy/style.css.php | 3 +++ 5 files changed, 19 insertions(+) diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 7dd45121a00..0428b87081c 100755 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -2160,6 +2160,10 @@ div.ui-radio margin: 4px; position: static; } +div.ui-checkbox label+input, div.ui-radio label+input { + position: absolute; +} + .ui-mobile fieldset { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 3f6237ee36d..fd859c014dd 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -2293,6 +2293,10 @@ div.ui-radio margin: 4px; position: static; } +div.ui-checkbox label+input, div.ui-radio label+input { + position: absolute; +} + .ui-mobile fieldset { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 134083c7dd2..abd072e9292 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -2503,6 +2503,10 @@ div.ui-radio margin: 4px; position: static; } +div.ui-checkbox label+input, div.ui-radio label+input { + position: absolute; +} + .ui-mobile fieldset { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index d71151f28bf..fe214708ee3 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -2394,6 +2394,10 @@ div.ui-radio margin: 4px; position: static; } +div.ui-checkbox label+input, div.ui-radio label+input { + position: absolute; +} + .ui-mobile fieldset { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 82e7d22fe2e..7352c2bf407 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2718,6 +2718,9 @@ div.ui-radio, div.ui-checkbox margin: 4px; position: static; } +div.ui-checkbox label+input, div.ui-radio label+input { + position: absolute; +} .ui-mobile fieldset { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; From 1580f92b1164786cd22c8be27d9ac466e75578f2 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 27 Jun 2013 08:09:28 +0200 Subject: [PATCH 29/29] Fix bug for PGSQL Migration 3.4->3.5 Fix bug on create invoice from contract --- htdocs/commande/fiche.php | 2 +- htdocs/compta/facture.php | 12 ++++++------ htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 203dbe4be96..cf054a6cfc8 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -315,7 +315,7 @@ else if ($action == 'add' && $user->rights->commande->creer) } //Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i],'fetch_optionals') ) // For avoid conflicts if trigger used { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_option=$lines[$i]->array_options; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d8379a02a07..dcacf578843 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1008,12 +1008,12 @@ else if ($action == 'add' && $user->rights->facture->creer) $fk_parent_line = 0; } - //Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $lines[$i]->fetch_optionals($lines[$i]->rowid); - $array_option=$lines[$i]->array_options; - } + //Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i],'fetch_optionals')) + { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_option=$lines[$i]->array_options; + } $result = $object->addline( $id, diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 5ab46b6c4f2..e1285d52c1a 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -66,4 +66,4 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob DROP table llx_adherent_options; DROP table llx_adherent_options_label; -ALTER TABLE `llx_user` ADD `accountancy_code` VARCHAR( 24 ) NULL; +ALTER TABLE llx_user ADD accountancy_code VARCHAR( 24 ) NULL;