From 6332ce5eea1fd7619c5ee93ad39feb19bdae6f01 Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Fri, 4 Dec 2020 17:01:56 -0600 Subject: [PATCH 01/73] Translate phpDocs --- .../fourn/class/fournisseur.facture.class.php | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 09c74dd5d92..0073b7d3f77 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -336,7 +336,7 @@ class FactureFournisseur extends CommonInvoice /** * Create supplier invoice into database * - * @param User $user object utilisateur qui cree + * @param User $user user object that creates * @return int Id invoice created if OK, < 0 if KO */ public function create($user) @@ -1251,8 +1251,8 @@ class FactureFournisseur extends CommonInvoice * Tag invoice as a payed invoice * * @param User $user Object user - * @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet. Not implementd yet. - * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet. + * @param string $close_code Code indicates whether the class has paid in full while payment is incomplete. Not implementd yet. + * @param string $close_note Comment informs if the class has been paid while payment is incomplete. Not implementd yet. * @return int <0 si ko, >0 si ok */ public function set_paid($user, $close_code = '', $close_note = '') @@ -1294,9 +1294,9 @@ class FactureFournisseur extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED - * Fonction utilisee quand un paiement prelevement est refuse, - * ou quand une facture annulee et reouverte. + * Tag the invoice as not fully paid + trigger call BILL_UNPAYED + * Function used when a direct debit payment is refused, + * or when the invoice was canceled and reopened. * * @param User $user Object user that change status * @return int <0 si ok, >0 si ok @@ -1579,25 +1579,25 @@ class FactureFournisseur extends CommonInvoice /** - * Ajoute une ligne de facture (associe a aucun produit/service predefini) - * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel - * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,idprod) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue). + * Adds an invoice line (associated with no predefined product/service) + * The parameters are already supposed to be correct and with final values when calling + * this method. Also, for the VAT rate, it must already have been defined by the caller by + * by the get_default_tva method(vendor_company, buying company, idprod) and the desc must + * already have the right value (the caller has to manage the multilanguage). * - * @param string $desc Description de la ligne - * @param double $pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note) + * @param string $desc Description of the line + * @param double $pu Unit price (HT or TTC according to price_base_type, > 0 even for credit note) * @param double $txtva Force Vat rate to use, -1 for auto. * @param double $txlocaltax1 LocalTax1 Rate * @param double $txlocaltax2 LocalTax2 Rate - * @param double $qty Quantite + * @param double $qty Quantity * @param int $fk_product Product/Service ID predefined * @param double $remise_percent Percentage discount of the line - * @param integer $date_start Date de debut de validite du service - * @param integer $date_end Date de fin de validite du service - * @param string $ventil Code de ventilation comptable - * @param int $info_bits Bits de type de lines - * @param string $price_base_type HT ou TTC + * @param integer $date_start Service start date + * @param integer $date_end Service expiry date + * @param string $ventil Accounting breakdown code + * @param int $info_bits Line type bits + * @param string $price_base_type HT or TTC * @param int $type Type of line (0=product, 1=service) * @param int $rang Position of line * @param int $notrigger Disable triggers @@ -2046,9 +2046,9 @@ class FactureFournisseur extends CommonInvoice /** - * Charge les informations d'ordre info dans l'objet facture + * Loads the info order information into the invoice object * - * @param int $id Id de la facture a charger + * @param int $id Id of the invoice to load * @return void */ public function info($id) @@ -2095,11 +2095,11 @@ class FactureFournisseur extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi liste des factures remplacables - * Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee + * Return list of replaceable invoices + * Status valid or abandoned for other reason + not paid + no payment + not already replaced * - * @param int $socid Id societe - * @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) + * @param int $socid Thirdparty id + * @return array|int Table of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) * <0 if error */ public function list_replacable_supplier_invoices($socid = 0) @@ -2144,12 +2144,12 @@ class FactureFournisseur extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi liste des factures qualifiables pour correction par avoir - * Les factures qui respectent les regles suivantes sont retournees: - * (validee + paiement en cours) ou classee (payee completement ou payee partiellement) + pas deja remplacee + pas deja avoir + * Return list of qualifying invoices for correction by credit note + * Invoices that respect the following rules are returned: + * (validated + payment in progress) or classified (paid in full or paid in part) + not already replaced + not already having * - * @param int $socid Id societe - * @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) + * @param int $socid Thirdparty id + * @return array|int Table of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) * <0 if error */ public function list_qualified_avoir_supplier_invoices($socid = 0) From cccc670c05c7d7a7948940c7ef2b9799a38f7e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 08:45:58 +0100 Subject: [PATCH 02/73] fix trans removing html --- htdocs/admin/sms.php | 92 ++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 823d4804121..fd1bcb69bdb 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2011 Laurent Destailleur * Copyright (C) 2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2020 Frédéric France * * 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 @@ -30,15 +31,16 @@ $langs->loadLangs(array("companies", "admin", "products", "sms", "other", "error $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button -if (!$user->admin) -accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $substitutionarrayfortest = array( -'__ID__' => 'TESTIdRecord', -'__PHONEFROM__' => 'TESTPhoneFrom', -'__PHONETO__' => 'TESTPhoneTo', -'__LASTNAME__' => 'TESTLastname', -'__FIRSTNAME__' => 'TESTFirstname' + '__ID__' => 'TESTIdRecord', + '__PHONEFROM__' => 'TESTPhoneFrom', + '__PHONETO__' => 'TESTPhoneTo', + '__LASTNAME__' => 'TESTLastname', + '__FIRSTNAME__' => 'TESTFirstname' ); $action = GETPOST('action', 'aZ09'); @@ -48,8 +50,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'update' && !$cancel) -{ +if ($action == 'update' && !$cancel) { dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", GETPOST("MAIN_DISABLE_ALL_SMS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SMS_SENDMODE", GETPOST("MAIN_SMS_SENDMODE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -64,13 +65,16 @@ if ($action == 'update' && !$cancel) /* * Send sms */ -if ($action == 'send' && !$_POST['cancel']) -{ +if ($action == 'send' && !$_POST['cancel']) { $error = 0; $smsfrom = ''; - if (!empty($_POST["fromsms"])) $smsfrom = GETPOST("fromsms", 'alphanohtml'); - if (empty($smsfrom)) $smsfrom = GETPOST("fromname", 'alphanohtml'); + if (!empty($_POST["fromsms"])) { + $smsfrom = GETPOST("fromsms", 'alphanohtml'); + } + if (empty($smsfrom)) { + $smsfrom = GETPOST("fromname", 'alphanohtml'); + } $sendto = GETPOST("sendto", 'alphanohtml'); $body = GETPOST('message', 'alphanohtml'); $deliveryreceipt = GETPOST("deliveryreceipt", 'alphanohtml'); @@ -83,32 +87,27 @@ if ($action == 'send' && !$_POST['cancel']) include_once DOL_DOCUMENT_ROOT.'/core/class/html.formsms.class.php'; $formsms = new FormSms($db); - if (!empty($formsms->error)) - { + if (!empty($formsms->error)) { setEventMessages($formsms->error, $formsms->errors, 'errors'); $action = 'test'; $error++; } - if (empty($body)) - { + if (empty($body)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors'); $action = 'test'; $error++; } - if (empty($smsfrom) || !str_replace('+', '', $smsfrom)) - { + if (empty($smsfrom) || !str_replace('+', '', $smsfrom)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsFrom")), null, 'errors'); $action = 'test'; $error++; } - if (empty($sendto) || !str_replace('+', '', $sendto)) - { + if (empty($sendto) || !str_replace('+', '', $sendto)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsTo")), null, 'errors'); $action = 'test'; $error++; } - if (!$error) - { + if (!$error) { // Make substitutions into message complete_substitutions_array($substitutionarrayfortest, $langs); $body = make_substitutions($body, $substitutionarrayfortest); @@ -118,8 +117,7 @@ if ($action == 'send' && !$_POST['cancel']) $smsfile = new CSMSFile($sendto, $smsfrom, $body, $deliveryreceipt, $deferred, $priority, $class); // This define OvhSms->login, pass, session and account $result = $smsfile->sendfile(); // This send SMS - if ($result) - { + if ($result) { setEventMessages($langs->trans("SmsSuccessfulySent", $smsfrom, $sendto), null, 'mesgs'); setEventMessages($smsfile->error, $smsfile->errors, 'mesgs'); } else { @@ -138,8 +136,12 @@ if ($action == 'send' && !$_POST['cancel']) */ $linuxlike = 1; -if (preg_match('/^win/i', PHP_OS)) $linuxlike = 0; -if (preg_match('/^mac/i', PHP_OS)) $linuxlike = 0; +if (preg_match('/^win/i', PHP_OS)) { + $linuxlike = 0; +} +if (preg_match('/^mac/i', PHP_OS)) { + $linuxlike = 0; +} $wikihelp = 'EN:Setup Sms|FR:Paramétrage Sms|ES:Configuración Sms'; llxHeader('', $langs->trans("Setup"), $wikihelp); @@ -153,11 +155,14 @@ print "
\n"; $listofmethods = (is_array($conf->modules_parts['sms']) ? $conf->modules_parts['sms'] : array()); asort($listofmethods); -if ($action == 'edit') -{ - $form = new Form($db); +if (!count($listofmethods)) { + $descnosms = $langs->trans("NoSmsEngine", '{Dolistore}'); + $descnosms = str_replace('{Dolistore}', 'DoliStore', $descnosms); + print '
'.$descnosms.'
'; +} - if (!count($listofmethods)) print '
'.$langs->trans("NoSmsEngine", 'DoliStore').'
'; +if ($action == 'edit') { + $form = new Form($db); print '
'; print ''; @@ -178,8 +183,11 @@ if ($action == 'edit') // Method print ''.$langs->trans("MAIN_SMS_SENDMODE").''; - if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE', $listofmethods, $conf->global->MAIN_SMS_SENDMODE, 1); - else print ''.$langs->trans("None").''; + if (count($listofmethods)) { + print $form->selectarray('MAIN_SMS_SENDMODE', $listofmethods, $conf->global->MAIN_SMS_SENDMODE, 1); + } else { + print ''.$langs->trans("None").''; + } print ''; // From @@ -204,8 +212,6 @@ if ($action == 'edit') print '
'; print '
'; } else { - if (!count($listofmethods)) print '
'.$langs->trans("NoSmsEngine", 'DoliStore').'
'; - print ''; print ''; @@ -218,14 +224,18 @@ if ($action == 'edit') // Method print ''; // From print ''; print ''; // Autocopy to @@ -234,7 +244,7 @@ if ($action == 'edit') print ''; - */ + */ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_SMS_SENDMODE").''; $text = $listofmethods[$conf->global->MAIN_SMS_SENDMODE]; - if (empty($text)) $text = $langs->trans("Undefined").' '.img_warning(); + if (empty($text)) { + $text = $langs->trans("Undefined").' '.img_warning(); + } print $text; print '
'.$langs->trans("MAIN_MAIL_SMS_FROM", $langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_SMS_FROM; - if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && !isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); + if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && !isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) { + print ' '.img_warning($langs->trans("ErrorBadPhone")); + } print '
'.$conf->global->MAIN_MAIL_AUTOCOPY_TO; if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO) && ! isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail")); print '
'; @@ -257,8 +267,7 @@ if ($action == 'edit') print ''.$langs->trans("DoTestServerAvailability").''; }*/ - if (count($listofmethods) && !empty($conf->global->MAIN_SMS_SENDMODE)) - { + if (count($listofmethods) && !empty($conf->global->MAIN_SMS_SENDMODE)) { print ''.$langs->trans("DoTestSend").''; } else { print ''.$langs->trans("DoTestSend").''; @@ -290,8 +299,7 @@ if ($action == 'edit') }*/ // Affichage formulaire de TEST simple - if ($action == 'test') - { + if ($action == 'test') { print '
'; print load_fiche_titre($langs->trans("DoTestSend")); From e9a12b5324064adc35e5cd3a4ae0ea7f9cf5058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 08:56:17 +0100 Subject: [PATCH 03/73] fix missing fields in box --- htdocs/core/boxes/box_produits.php | 43 ++++++++++++++++-------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index dc7f79721d1..57f964d09ce 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -84,21 +84,25 @@ class box_produits extends ModeleBoxes $this->info_box_head = array('text' => $langs->trans("BoxTitleLastProducts", $max)); - if ($user->rights->produit->lire || $user->rights->service->lire) - { + if ($user->rights->produit->lire || $user->rights->service->lire) { $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.fk_price_expression, p.entity"; $sql .= ", p.accountancy_code_sell"; $sql .= ", p.accountancy_code_sell_intra"; $sql .= ", p.accountancy_code_sell_export"; $sql .= ", p.accountancy_code_buy"; + $sql .= ", p.accountancy_code_buy_intra"; + $sql .= ", p.accountancy_code_buy_export"; $sql .= ', p.barcode'; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= ' WHERE p.entity IN ('.getEntity($productstatic->element).')'; - if (empty($user->rights->produit->lire)) $sql .= ' AND p.fk_product_type != 0'; - if (empty($user->rights->service->lire)) $sql .= ' AND p.fk_product_type != 1'; + if (empty($user->rights->produit->lire)) { + $sql .= ' AND p.fk_product_type != 0'; + } + if (empty($user->rights->service->lire)) { + $sql .= ' AND p.fk_product_type != 1'; + } // Add where from hooks - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('boxproductlist'=>1); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -107,18 +111,15 @@ class box_produits extends ModeleBoxes $sql .= $this->db->plimit($max, 0); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $line = 0; - while ($line < $num) - { + while ($line < $num) { $objp = $this->db->fetch_object($result); $datem = $this->db->jdate($objp->tms); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sqld = "SELECT label"; $sqld .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sqld .= " WHERE fk_product=".$objp->rowid; @@ -126,11 +127,11 @@ class box_produits extends ModeleBoxes $sqld .= " LIMIT 1"; $resultd = $this->db->query($sqld); - if ($resultd) - { + if ($resultd) { $objtp = $this->db->fetch_object($resultd); - if (isset($objtp->label) && $objtp->label != '') + if (isset($objtp->label) && $objtp->label != '') { $objp->label = $objtp->label; + } } } $productstatic->id = $objp->rowid; @@ -145,6 +146,8 @@ class box_produits extends ModeleBoxes $productstatic->accountancy_code_sell_intra = $objp->accountancy_code_sell_intra; $productstatic->accountancy_code_sell_export = $objp->accountancy_code_sell_export; $productstatic->accountancy_code_buy = $objp->accountancy_code_buy; + $productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra; + $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export; $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', @@ -162,13 +165,12 @@ class box_produits extends ModeleBoxes $price_base_type = $langs->trans($objp->price_base_type); $price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc); } else //Parse the dynamic price - { + { $productstatic->fetch($objp->rowid, '', '', 1); $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProduct($productstatic); if ($price_result >= 0) { - if ($objp->price_base_type == 'HT') - { + if ($objp->price_base_type == 'HT') { $price_base_type = $langs->trans("HT"); } else { $price_result = $price_result * (1 + ($productstatic->tva_tx / 100)); @@ -176,7 +178,7 @@ class box_produits extends ModeleBoxes } $price = price($price_result); } - } + } $this->info_box_contents[$line][] = array( 'td' => 'class="right"', 'text' => $price, @@ -206,11 +208,12 @@ class box_produits extends ModeleBoxes $line++; } - if ($num == 0) + if ($num == 0) { $this->info_box_contents[$line][0] = array( 'td' => 'class="center"', 'text'=>$langs->trans("NoRecordedProducts"), ); + } $this->db->free($result); } else { From 325951877be9ae30aef2fbc30f78e8ff5a7f1138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 08:58:20 +0100 Subject: [PATCH 04/73] fix missing fields in box --- htdocs/core/boxes/box_produits.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 57f964d09ce..f36b0500655 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -164,8 +164,8 @@ class box_produits extends ModeleBoxes if (empty($conf->dynamicprices->enabled) || empty($objp->fk_price_expression)) { $price_base_type = $langs->trans($objp->price_base_type); $price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc); - } else //Parse the dynamic price - { + } else { + //Parse the dynamic price $productstatic->fetch($objp->rowid, '', '', 1); $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProduct($productstatic); From 8996dd9803d4ed0cdba3b71491daddb5bc0d4c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 10:28:40 +0100 Subject: [PATCH 05/73] fix style --- htdocs/admin/boxes.php | 151 +++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 81 deletions(-) diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 4fc1ad28da7..63c3350fd9d 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -31,7 +31,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'boxes', 'accountancy')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $rowid = GETPOST('rowid', 'int'); $action = GETPOST('action', 'aZ09'); @@ -46,8 +48,7 @@ $boxes = array(); * Actions */ -if ($action == 'addconst') -{ +if ($action == 'addconst') { dolibarr_set_const($db, "MAIN_BOXES_MAXLINES", $_POST["MAIN_BOXES_MAXLINES"], '', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"], 'chaine', 0, '', $conf->entity); } @@ -59,8 +60,7 @@ if ($action == 'add') { $db->begin(); if (is_array($boxids)) { foreach ($boxids as $boxid) { - if (is_numeric($boxid['pos']) && $boxid['pos'] >= 0) // 0=Home, 1=... - { + if (is_numeric($boxid['pos']) && $boxid['pos'] >= 0) { // 0=Home, 1=... $pos = $boxid['pos']; // Initialize distinct fk_user with all already existing values of fk_user (user that use a personalized view of boxes for page "pos") @@ -72,12 +72,10 @@ if ($action == 'add') { $sql .= " AND entity = ".$conf->entity; dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $distinctfkuser[$obj->fk_user] = $obj->fk_user; $i++; @@ -90,26 +88,28 @@ if ($action == 'add') { $distinctfkuser['0'] = '0'; // Add entry for fk_user = 0. We must use string as key and val - foreach ($distinctfkuser as $fk_user) - { - if (!$error && $fk_user != '') - { + foreach ($distinctfkuser as $fk_user) { + if (!$error && $fk_user != '') { $arrayofexistingboxid = array(); $nbboxonleft = $nbboxonright = 0; $sql = "SELECT box_id, box_order FROM ".MAIN_DB_PREFIX."boxes"; $sql .= " WHERE position = ".$pos." AND fk_user = ".$fk_user." AND entity = ".$conf->entity; dol_syslog("boxes.php activate box", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $boxorder = $obj->box_order; - if (preg_match('/A/', $boxorder)) $nbboxonleft++; - if (preg_match('/B/', $boxorder)) $nbboxonright++; + if (preg_match('/A/', $boxorder)) { + $nbboxonleft++; + } + if (preg_match('/B/', $boxorder)) { + $nbboxonright++; + } $arrayofexistingboxid[$obj->box_id] = 1; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } if (empty($arrayofexistingboxid[$boxid['value']])) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes ("; @@ -120,8 +120,7 @@ if ($action == 'add') { dol_syslog("boxes.php activate box", LOG_DEBUG); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { setEventMessages($db->lasterror(), null, 'errors'); $error++; } @@ -133,8 +132,7 @@ if ($action == 'add') { } } } - if (!$error) - { + if (!$error) { $db->commit(); $action = ''; } else { @@ -142,15 +140,13 @@ if ($action == 'add') { } } -if ($action == 'delete') -{ +if ($action == 'delete') { $sql = "SELECT box_id FROM ".MAIN_DB_PREFIX."boxes"; $sql .= " WHERE rowid=".((int) $rowid); $resql = $db->query($sql); $obj = $db->fetch_object($resql); - if (!empty($obj->box_id)) - { + if (!empty($obj->box_id)) { $db->begin(); // Remove all personalized setup when a box is activated or disabled (why removing all ? We removed only removed boxes) @@ -168,8 +164,7 @@ if ($action == 'delete') } } -if ($action == 'switch') -{ +if ($action == 'switch') { // We switch values of field box_order for the 2 lines of table boxes $db->begin(); @@ -181,12 +176,10 @@ if ($action == 'switch') $resultupdatefrom = 0; $resultupdateto = 0; - if (is_object($objfrom) && is_object($objto)) - { + if (is_object($objfrom) && is_object($objto)) { $newfirst = $objto->box_order; $newsecond = $objfrom->box_order; - if ($newfirst == $newsecond) - { + if ($newfirst == $newsecond) { $newsecondchar = preg_replace('/[0-9]+/', '', $newsecond); $newsecondnum = preg_replace('/[a-zA-Z]+/', '', $newsecond); $newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1); @@ -194,16 +187,19 @@ if ($action == 'switch') $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newfirst)."' WHERE rowid=".((int) $objfrom->rowid); dol_syslog($sql); $resultupdatefrom = $db->query($sql); - if (!$resultupdatefrom) { dol_print_error($db); } + if (!$resultupdatefrom) { + dol_print_error($db); + } $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newsecond)."' WHERE rowid=".((int) $objto->rowid); dol_syslog($sql); $resultupdateto = $db->query($sql); - if (!$resultupdateto) { dol_print_error($db); } + if (!$resultupdateto) { + dol_print_error($db); + } } - if ($resultupdatefrom && $resultupdateto) - { + if ($resultupdatefrom && $resultupdateto) { $db->commit(); } else { $db->rollback(); @@ -240,33 +236,31 @@ $sql .= " ORDER by b.position, b.box_order"; dol_syslog("Search available boxes", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); // Check record to know if we must recalculate sort order $i = 0; $decalage = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $boxes[$obj->position][$obj->box_id] = 1; $i++; array_push($actives, $obj->box_id); - if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++; + if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) { + $decalage++; + } // We renumber the order of the boxes if one of them is in '' // This occurs just after an insert. - if ($decalage) - { + if ($decalage) { $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($decalage)."' WHERE rowid=".$obj->rowid; $db->query($sql); } } - if ($decalage) - { + if ($decalage) { // If we have renumbered, we correct the field box_order // This occurs just after an insert. $sql = "SELECT box_order"; @@ -276,32 +270,24 @@ if ($resql) dol_syslog("Execute requests to renumber box order", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { - while ($record = $db->fetch_array($result)) - { - if (dol_strlen($record['box_order']) == 1) - { - if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) - { + if ($result) { + while ($record = $db->fetch_array($result)) { + if (dol_strlen($record['box_order']) == 1) { + if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) { $box_order = "A0".$record['box_order']; $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'"; $resql = $db->query($sql); - } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) - { + } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) { $box_order = "B0".$record['box_order']; $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'"; $resql = $db->query($sql); } - } elseif (dol_strlen($record['box_order']) == 2) - { - if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) - { + } elseif (dol_strlen($record['box_order']) == 2) { + if (preg_match("/[13579]{1}/", substr($record['box_order'], -1))) { $box_order = "A".$record['box_order']; $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'"; $resql = $db->query($sql); - } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) - { + } elseif (preg_match("/[02468]{1}/", substr($record['box_order'], -1))) { $box_order = "B".$record['box_order']; $sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$db->escape($box_order)."' WHERE entity = ".$conf->entity." AND box_order = '".$db->escape($record['box_order'])."'"; $resql = $db->query($sql); @@ -336,10 +322,8 @@ print ''.$langs->trans("SourceFile").''; print ''.$langs->trans("ActivateOn").''; print "\n"; -foreach ($boxtoadd as $box) -{ - if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) - { +foreach ($boxtoadd as $box) { + if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) { $logo = $box->boximg; } else { $logo = preg_replace("/^object_/i", "", $box->boximg); @@ -348,14 +332,17 @@ foreach ($boxtoadd as $box) print "\n".''."\n"; print ''."\n"; print ''.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel); - if (!empty($box->class) && preg_match('/graph_/', $box->class)) print ' ('.$langs->trans("Graph").')'; + if (!empty($box->class) && preg_match('/graph_/', $box->class)) { + print ' ('.$langs->trans("Graph").')'; + } print ''."\n"; print ''; - if ($box->note == '(WarningUsingThisBoxSlowDown)') - { + if ($box->note == '(WarningUsingThisBoxSlowDown)') { $langs->load("errors"); print $langs->trans("WarningUsingThisBoxSlowDown"); - } else print ($box->note ? $box->note : ' '); + } else { + print ($box->note ? $box->note : ' '); + } print ''."\n"; print ''.$box->sourcefile.''."\n"; @@ -367,8 +354,7 @@ foreach ($boxtoadd as $box) print ''."\n"; } -if (!count($boxtoadd) && count($boxactivated)) -{ +if (!count($boxtoadd) && count($boxactivated)) { print ''.$langs->trans("AllWidgetsWereEnabled").''; } print ''."\n"; @@ -398,10 +384,8 @@ print ''."\n"; $box_order = 1; $foundrupture = 1; -foreach ($boxactivated as $key => $box) -{ - if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) - { +foreach ($boxactivated as $key => $box) { + if (preg_match('/^([^@]+)@([^@]+)$/i', $box->boximg)) { $logo = $box->boximg; } else { $logo = preg_replace("/^object_/i", "", $box->boximg); @@ -410,14 +394,17 @@ foreach ($boxactivated as $key => $box) print "\n".''."\n"; print ''; print ''.img_object("", $logo, 'height="14px"').' '.$langs->transnoentitiesnoconv($box->boxlabel); - if (!empty($box->class) && preg_match('/graph_/', $box->class)) print ' ('.$langs->trans("Graph").')'; + if (!empty($box->class) && preg_match('/graph_/', $box->class)) { + print ' ('.$langs->trans("Graph").')'; + } print ''; print ''; - if ($box->note == '(WarningUsingThisBoxSlowDown)') - { + if ($box->note == '(WarningUsingThisBoxSlowDown)') { $langs->load("errors"); print img_warning('', 0).' '.$langs->trans("WarningUsingThisBoxSlowDown"); - } else print ($box->note ? $box->note : ' '); + } else { + print ($box->note ? $box->note : ' '); + } print ''; print ''.(empty($pos_name[$box->position]) ? '' : $langs->trans($pos_name[$box->position])).''; $hasnext = ($key < (count($boxactivated) - 1)); @@ -446,6 +433,7 @@ print load_fiche_titre($langs->trans("Other"), '', ''); print '
'; print ''; print ''; +print '
'; print ''; print ''; @@ -471,6 +459,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVA } print '
'; +print '
'; print '
'; print '
'; From 6d2159e8f0a3faa88b7468a6fe1fbcb580e33c33 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 11:30:18 +0100 Subject: [PATCH 06/73] New #8472 personal and professional titles added personal and professional titles added for employee users --- htdocs/user/card.php | 12 ++++++++++++ htdocs/user/class/user.class.php | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index ba7cd546d54..f57c329d5a1 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -204,6 +204,7 @@ if (empty($reshook)) { } if (!$error) { + $object->civility_code = GETPOST("civility_code", 'aZ09'); $object->lastname = GETPOST("lastname", 'alphanohtml'); $object->firstname = GETPOST("firstname", 'alphanohtml'); $object->login = GETPOST("login", 'alphanohtml'); @@ -366,6 +367,7 @@ if (empty($reshook)) { $db->begin(); + $object->civility_code = GETPOST("civility_code", 'aZ09'); $object->lastname = GETPOST("lastname", 'alphanohtml'); $object->firstname = GETPOST("firstname", 'alphanohtml'); $object->login = GETPOST("login", 'alphanohtml'); @@ -789,6 +791,11 @@ if ($action == 'create' || $action == 'adduserldap') print ''; + // Civility + print ''; + // Lastname print ''; print ''; @@ -2037,6 +2044,11 @@ if ($action == 'create' || $action == 'adduserldap') print ''; } + // Civility + print ''; + // Lastname print ""; print ''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3288571d2a7..be1cd4514e3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -74,6 +74,7 @@ class User extends CommonObject public $ldap_sid; public $search_sid; public $employee; + public $civility_code; /** * @var string gender @@ -400,7 +401,7 @@ class User extends CommonObject $login = trim($login); // Get user - $sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.personal_email, u.job,"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.civility as civility_code, u.birth, u.email, u.personal_email, u.job,"; $sql .= " u.socialnetworks,"; $sql .= " u.signature, u.office_phone, u.office_fax, u.user_mobile, u.personal_mobile,"; $sql .= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,"; @@ -470,6 +471,7 @@ class User extends CommonObject $this->ref_ext = $obj->ref_ext; $this->ldap_sid = $obj->ldap_sid; + $this->civility_code = $obj->civility_code; $this->lastname = $obj->lastname; $this->firstname = $obj->firstname; @@ -1293,6 +1295,8 @@ class User extends CommonObject // Clean parameters $this->setUpperOrLowerCase(); + + $this->civility_code = trim($this->civility_code); $this->login = trim($this->login); if (!isset($this->entity)) { $this->entity = $conf->entity; // If not defined, we use default value @@ -1419,6 +1423,7 @@ class User extends CommonObject // Define parameters $this->admin = 0; + $this->civility_code = $contact->civility_code; $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->gender = $contact->gender; @@ -1447,6 +1452,7 @@ class User extends CommonObject if ($result > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET fk_socpeople=".$contact->id; + $sql .= ", civility=".$contact->civility_code; if ($contact->socid) { $sql .= ", fk_soc=".$contact->socid; } @@ -1497,6 +1503,7 @@ class User extends CommonObject // Set properties on new user $this->admin = 0; + $this->civility_code = $member->civility_id; $this->lastname = $member->lastname; $this->firstname = $member->firstname; $this->gender = $member->gender; @@ -1632,6 +1639,7 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters + $this->civility_code = trim($this->civility_code); $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); $this->employee = $this->employee ? $this->employee : 0; @@ -1686,7 +1694,8 @@ class User extends CommonObject // Update datas $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; - $sql .= " lastname = '".$this->db->escape($this->lastname)."'"; + $sql .= " civility = '".$this->db->escape($this->civility_code)."'"; + $sql .= ", lastname = '".$this->db->escape($this->lastname)."'"; $sql .= ", firstname = '".$this->db->escape($this->firstname)."'"; $sql .= ", employee = ".(int) $this->employee; $sql .= ", login = '".$this->db->escape($this->login)."'"; @@ -1788,6 +1797,7 @@ class User extends CommonObject $result = $adh->fetch($this->fk_member); if ($result > 0) { + $adh->civility_code = $this->civility_code; $adh->firstname = $this->firstname; $adh->lastname = $this->lastname; $adh->login = $this->login; @@ -1838,6 +1848,7 @@ class User extends CommonObject $result = $tmpobj->fetch($this->contact_id); if ($result >= 0) { + $tmpobj->civility_code = $this->civility_code; $tmpobj->firstname = $this->firstname; $tmpobj->lastname = $this->lastname; $tmpobj->login = $this->login; From f035bd774d55b515b8c1c175a4fa9aa4da18d03e Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 11:59:30 +0100 Subject: [PATCH 07/73] New | personal and professional titles added for employee users in vcard personal and professional titles added for employee users in vcard --- htdocs/user/vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index ada3a992f44..6cdcd04417f 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -61,7 +61,7 @@ $v = new vCard(); $v->setProdId('Dolibarr '.DOL_VERSION); $v->setUid('DOLIBARR-USERID-'.$user2->id); -$v->setName($user2->lastname, $user2->firstname, "", $user2->civility, ""); +$v->setName($user2->lastname, $user2->firstname, "", $user2->civility_code, ""); $v->setFormattedName($user2->getFullName($langs, 1)); $v->setPhoneNumber($user2->phone_pro, "TYPE=WORK;VOICE"); From 1c221302cd9230ef1b1316cd2d0ca32c2ecf15fe Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 5 Dec 2020 11:09:16 +0000 Subject: [PATCH 08/73] Fixing style errors. --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f57c329d5a1..3d5c8b1852a 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2046,7 +2046,7 @@ if ($action == 'create' || $action == 'adduserldap') // Civility print ''; // Lastname From 038850fe2598817847606fd402d1b8e34eab68c8 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Sat, 5 Dec 2020 12:22:36 +0100 Subject: [PATCH 09/73] Update ChangeLog --- ChangeLog | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b685eb3381..28fa231709b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,7 +31,7 @@ NEW: add column payment term into list of supplier invoices NEW: add column quantity in product margin page NEW: add column vat rate in page to define accounting account on product/service NEW: add costprice in fields of products list -NEW: added an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE +NEW: add an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE NEW: add employee link in expense report binding page NEW: add EORI No. as ProfID5 NEW: add export for various payments @@ -181,10 +181,9 @@ NEW: #15065 Add option to put the product label in bold in the PDF templates if For developers: --------------- NEW: add __MEMBER_TYPE__ substitution key +NEW: add __TYPE__ substitution key NEW: add function dolButtonToOpenUrlInDialogPopup() to be able to open page into a popup NEW: show line number on intervention card (via MAIN_VIEW_LINE_NUMBER) -NEW: API get contacts list of a given order -NEW: API endpoint getContacts and Clean results NEW: Add some fields to link website page to an other object NEW: fill ECM src object fields in dol_add_file_process NEW: conf to allow to show the full tree in warehouse popup @@ -194,10 +193,6 @@ NEW: can add event to log into blockedlog module with a constant NEW: add property cssview when declaring fields of an object NEW: Can use dynamic code into the 'enabled' property of DAO fields NEW: allow to edit "demand reason" field though API -NEW: API can update a payment -NEW: API get member by thirdparty -NEW: API get thirdparty by barcode -NEW: API get users by email / login NEW: fetch contact by email with REST API NEW: field ref_ext in llx_commandedet NEW: fields ref_ext for Attributes and Combinations @@ -213,10 +208,17 @@ NEW: Triggers Attributes and Attributes values NEW: added incoterms data into the substitution array NEW: add send context for ticket NEW: add a message in error_log after detection of SQL or script injection -NEW: add __TYPE__ substitution key NEW: add validation of MX domain for emails NEW: calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') ) -NEW: Graphics can be horizontal bars. +NEW: Graphics can be horizontal bars + +APIs +NEW: API get contacts list of a given order +NEW: API endpoint getContacts and Clean results +NEW: API can update a payment +NEW: API get member by thirdparty +NEW: API get thirdparty by barcode +NEW: API get users by email / login HOOKs NEW: Hook on propal card @@ -380,8 +382,8 @@ FIX: SQL Problem in customer invoice list FIX: SQL Problem in social contribution list FIX: SQL Problem in supplier invoice list FIX: SQL syntax error when editing extrafields -FIX: Sql type -FIX: takepos 12 hook +FIX: SQL type +FIX: TakePOS 12 hook FIX: Update form erased extrafields that were hidden FIX: Update of extrafields date FIX: Update of extrafiels on draft object @@ -395,7 +397,7 @@ For users: NEW: Module MO (Manufacturing Order) is available as stable module. NEW: Receipt printer module moved from 'development' to 'experimental' -NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists. +NEW: add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists NEW: add numbering module for TakePOS module NEW: 2 new options when creating an invoice from time spent on a project : by period or by task NEW: Accountancy add column thirdparty on binding page @@ -406,19 +408,19 @@ NEW: Accountancy - Add possibility to manage a short alternative label for accou NEW: Accountancy - General ledger - Add an option to search not reconciled lines NEW: Add accountancy code of thirdparty in contact and supplier export NEW: support webp image format -NEW: Add checkbox "overwrite if exists" into ECM/DMS module +NEW: add checkbox "overwrite if exists" into ECM/DMS module NEW: add a link to notes in members list NEW: add a parameter to group same products in TakePOS NEW: add a parameter to sort product by label in TakePOS -NEW: Add a profil to import contact categories -NEW: Add company extrafields into order export +NEW: add a profil to import contact categories +NEW: add company extrafields into order export NEW: add const CASHDESK_FORCE_DECREASE_STOCK to force batch decrementation NEW: add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons NEW: add csv separator setup in module admin NEW: add dedicated substitutions keys for extrafields of type date and datetime NEW: add default warehouse for dispatch -NEW: Add due date in feature "Export accounting documents" -NEW: Add duration information for fichinter +NEW: add due date in feature "Export accounting documents" +NEW: add duration information for fichinter NEW: Start support of Dark theme into ELDY theme NEW: Add field author public alias for blog post on website module NEW: Add "finished" field on product list From d1204e5e9b0a849834843367efceb61e2839533b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 15:35:52 +0100 Subject: [PATCH 10/73] typo ortho --- htdocs/admin/mails_templates.php | 2 +- htdocs/compta/facture/card.php | 2 +- htdocs/core/lib/website2.lib.php | 2 +- htdocs/modulebuilder/template/admin/myobject_extrafields.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index de98c42b35a..6538d5c3011 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -1074,7 +1074,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } - // Lines from source (TODO Show them also when creating invoice from tempalte invoice) + // Lines from source (TODO Show them also when creating invoice from template invoice) if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { // TODO for compatibility diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 673b904b743..1ed80ece372 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -442,7 +442,7 @@ function dolSaveReadme($file, $content) /** * Show list of themes. Show all thumbs of themes/skins * - * @param Website $website Object website to load the tempalte into + * @param Website $website Object website to load the template into * @return void */ function showWebsiteTemplates(Website $website) diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index fdc2161f504..fdd50d0e89b 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/modulebuilder/tempalte/admin/myobject_extrafields.php + * \file htdocs/modulebuilder/template/admin/myobject_extrafields.php * \ingroup mymodule * \brief Page to setup extra fields of myobject */ From 025523c6c0e4162f824896a73fdfac99ffd73ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 15:40:23 +0100 Subject: [PATCH 11/73] Update myobject_extrafields.php --- htdocs/modulebuilder/template/admin/myobject_extrafields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index fdd50d0e89b..c844f80e4cc 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bom.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page -$langs->loadLangs(array('mrp@mrp', 'admin')); +$langs->loadLangs(array('mymodule@mymodule', 'admin')); $extrafields = new ExtraFields($db); $form = new Form($db); From 0c0566201053036c9f0b8014ca7d4df1ca8387d2 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 16:31:44 +0100 Subject: [PATCH 12/73] Fix/FIX html tag formatting errors in the accounting area --- htdocs/accountancy/index.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 20010cc8f5c..ef7e8f1c5fc 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -103,13 +103,13 @@ if ($conf->accounting->enabled) // STEPS $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''; print "
\n"; print "
\n"; @@ -118,22 +118,22 @@ if ($conf->accounting->enabled) print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''."\n"; print "
\n"; $step++; $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step). $textlink; print "
\n"; if (!empty($conf->tax->enabled)) { $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step). $textlink; print "
\n"; } /*if (! empty($conf->salaries->enabled)) @@ -147,7 +147,7 @@ if ($conf->accounting->enabled) if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''; print "
\n"; } /* @@ -171,7 +171,7 @@ if ($conf->accounting->enabled) }*/ $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''; print "
\n"; @@ -188,22 +188,22 @@ if ($conf->accounting->enabled) $langs->loadLangs(array('bills', 'trips')); $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)) . $langs->transnoentitiesnoconv("BillsCustomers") . ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''."\n"; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("BillsSuppliers"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''."\n"; print "
\n"; if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("ExpenseReports"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''."\n"; print "
\n"; } $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step)). $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting") . $langs->transnoentitiesnoconv("WriteBookKeeping") ."\n"; print "
\n"; $step++; From e126f9ce5de8f3d0e884a199514c6f44fb91f104 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 16:41:36 +0100 Subject: [PATCH 13/73] Revert "Fix/FIX html tag formatting errors in the accounting area" This reverts commit 0c0566201053036c9f0b8014ca7d4df1ca8387d2. --- htdocs/accountancy/index.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index ef7e8f1c5fc..20010cc8f5c 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -103,13 +103,13 @@ if ($conf->accounting->enabled) // STEPS $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''); print "
\n"; print "
\n"; @@ -118,22 +118,22 @@ if ($conf->accounting->enabled) print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'')."\n"; print "
\n"; $step++; $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step). $textlink; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); print "
\n"; if (!empty($conf->tax->enabled)) { $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step). $textlink; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); print "
\n"; } /*if (! empty($conf->salaries->enabled)) @@ -147,7 +147,7 @@ if ($conf->accounting->enabled) if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''); print "
\n"; } /* @@ -171,7 +171,7 @@ if ($conf->accounting->enabled) }*/ $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''); print "
\n"; @@ -188,22 +188,22 @@ if ($conf->accounting->enabled) $langs->loadLangs(array('bills', 'trips')); $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)) . $langs->transnoentitiesnoconv("BillsCustomers") . ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'')."\n"; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("BillsSuppliers"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'')."\n"; print "
\n"; if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("ExpenseReports"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'')."\n"; print "
\n"; } $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step)). $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting") . $langs->transnoentitiesnoconv("WriteBookKeeping") ."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n"; print "
\n"; $step++; From 18319f4fd31a0197c923bb83d8aaff5e63b2e44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 18:05:09 +0100 Subject: [PATCH 14/73] fix trans replace html --- htdocs/accountancy/journal/bankjournal.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 0acb4e0bedd..2fbdd57c786 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -7,7 +7,7 @@ * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2017-2018 Frédéric France + * Copyright (C) 2017-2020 Frédéric France * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Eric Seigne * @@ -970,10 +970,11 @@ if (empty($action) || $action == 'view') { if ($resql) { $obj = $db->fetch_object($resql); - if ($obj->nb > 0) - { + if ($obj->nb > 0) { print '
'.img_warning().' '.$langs->trans("TheJournalCodeIsNotDefinedOnSomeBankAccount"); - print ' : '.$langs->trans("AccountancyAreaDescBank", 9, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("BankAccounts").''); + $desc = ' : '.$langs->trans("AccountancyAreaDescBank", 9, '{link}'); + $desc = str_replace('{link}', ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("BankAccounts").'', $desc); + print $desc; print '
'; } } else dol_print_error($db); From 7099dbbb05817e62f42ce4868f3e9064d9a5f47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 18:17:04 +0100 Subject: [PATCH 15/73] fix trans removeing html --- htdocs/compta/stats/index.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 1a1de43709d..93f91b25449 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2017 Olivier Geffroy - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -122,7 +122,9 @@ if ($modecompta == "CREANCES-DETTES") $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeDebt"); //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $calcmode .= '
('.$langs->trans("SeeReportInBookkeepingMode", '', '').')'; + $calcmode .= '
('.$langs->trans("SeeReportInBookkeepingMode", '{links1}', '{link2}').')'; + $calcmode = str_replace('{link1}', '', $calcmode); + $calcmode = str_replace('{link2}', '', $calcmode); $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesCADue"); @@ -146,7 +148,9 @@ if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeBookkeeping"); - $calcmode .= '
('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; + $calcmode .= '
('.$langs->trans("SeeReportInDueDebtMode", '{link1}', '{link2}').')'; + $calcmode = str_replace('{link1}', '', $calcmode); + $calcmode = str_replace('{link2}', '', $calcmode); //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); From 90a5c90a5a8fe775fb2bcb2a6ae816b0acceb4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 18:19:33 +0100 Subject: [PATCH 16/73] fix trans removeing html --- htdocs/accountancy/journal/bankjournal.php | 414 +++++++++++---------- 1 file changed, 217 insertions(+), 197 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 0acb4e0bedd..5e6650562ab 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -73,15 +73,18 @@ $date_endmonth = GETPOST('date_endmonth', 'int'); $date_endday = GETPOST('date_endday', 'int'); $date_endyear = GETPOST('date_endyear', 'int'); $in_bookkeeping = GETPOST('in_bookkeeping', 'aZ09'); -if ($in_bookkeeping == '') $in_bookkeeping = 'notyet'; +if ($in_bookkeeping == '') { + $in_bookkeeping = 'notyet'; +} $now = dol_now(); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid > 0 && empty($id_journal)) +if ($user->socid > 0 && empty($id_journal)) { accessforbidden(); +} /* @@ -93,8 +96,7 @@ $error = 0; $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); -if (empty($date_startmonth) || empty($date_endmonth)) -{ +if (empty($date_startmonth) || empty($date_endmonth)) { // Period by default on transfer $dates = getDefaultDatesForTransfer(); $date_start = $dates['date_start']; @@ -103,8 +105,7 @@ if (empty($date_startmonth) || empty($date_endmonth)) $pastmonth = $dates['pastmonth']; } -if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form -{ +if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) { // We define date_start and date_end, only if we did not submit the form $date_start = dol_get_first_day($pastmonthyear, $pastmonth, false); $date_end = dol_get_last_day($pastmonthyear, $pastmonth, false); } @@ -124,19 +125,18 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc on bu1.url_id=soc.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on bu2.url_id=u.rowid"; $sql .= " WHERE ba.fk_accountancy_journal=".$id_journal; $sql .= ' AND b.amount != 0 AND ba.entity IN ('.getEntity('bank_account', 0).')'; // We don't share object for accountancy -if ($date_start && $date_end) +if ($date_start && $date_end) { $sql .= " AND b.dateo >= '".$db->idate($date_start)."' AND b.dateo <= '".$db->idate($date_end)."'"; +} // Define begin binding date if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { $sql .= " AND b.dateo >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; } // Already in bookkeeping or not -if ($in_bookkeeping == 'already') -{ +if ($in_bookkeeping == 'already') { $sql .= " AND (b.rowid IN (SELECT fk_doc FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='bank') )"; } -if ($in_bookkeeping == 'notyet') -{ +if ($in_bookkeeping == 'notyet') { $sql .= " AND (b.rowid NOT IN (SELECT fk_doc FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='bank') )"; } $sql .= " ORDER BY b.datev"; @@ -177,9 +177,9 @@ if ($result) { //print $sql; // Variables - $account_supplier = (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER != "") ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined'); // NotDefined is a reserved word - $account_customer = (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "") ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined'); // NotDefined is a reserved word - $account_employee = (!empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined'); // NotDefined is a reserved word + $account_supplier = (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER != "") ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined'); // NotDefined is a reserved word + $account_customer = (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "") ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined'); // NotDefined is a reserved word + $account_employee = (!empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined'); // NotDefined is a reserved word $account_pay_vat = (!empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : 'NotDefined'); // NotDefined is a reserved word $account_pay_donation = (!empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : 'NotDefined'); // NotDefined is a reserved word $account_pay_subscription = (!empty($conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT) ? $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT : 'NotDefined'); // NotDefined is a reserved word @@ -198,23 +198,28 @@ if ($result) { // one line for bank record = tabbq // one line for thirdparty record = tabtp $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); $lineisapurchase = -1; $lineisasale = -1; // Old method to detect if it's a sale or purchase - if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)') $lineisapurchase = 1; - if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)') $lineisasale = 1; - // Try a more reliable method to detect if record is a supplier payment or a customer payment - if ($lineisapurchase < 0) - { - if ($obj->typeop_payment_supplier == 'payment_supplier') $lineisapurchase = 1; + if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)') { + $lineisapurchase = 1; } - if ($lineisasale < 0) - { - if ($obj->typeop_payment == 'payment') $lineisasale = 1; + if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)') { + $lineisasale = 1; + } + // Try a more reliable method to detect if record is a supplier payment or a customer payment + if ($lineisapurchase < 0) { + if ($obj->typeop_payment_supplier == 'payment_supplier') { + $lineisapurchase = 1; + } + } + if ($lineisasale < 0) { + if ($obj->typeop_payment == 'payment') { + $lineisasale = 1; + } } //var_dump($obj->type_payment); var_dump($obj->type_payment_supplier); //var_dump($lineisapurchase); //var_dump($lineisasale); @@ -224,28 +229,30 @@ if ($result) { // Set accountancy code for thirdparty (example: '411CU...' or '411' if no subledger account defined on customer) $compta_soc = 'NotDefined'; - if ($lineisapurchase > 0) + if ($lineisapurchase > 0) { $compta_soc = (($obj->code_compta_fournisseur != "") ? $obj->code_compta_fournisseur : $account_supplier); - if ($lineisasale > 0) + } + if ($lineisasale > 0) { $compta_soc = (!empty($obj->code_compta) ? $obj->code_compta : $account_customer); + } $tabcompany[$obj->rowid] = array( - 'id' => $obj->socid, - 'name' => $obj->name, - 'code_compta' => $compta_soc, - 'email' => $obj->email + 'id' => $obj->socid, + 'name' => $obj->name, + 'code_compta' => $compta_soc, + 'email' => $obj->email ); // Set accountancy code for user $compta_user = (!empty($obj->accountancy_code) ? $obj->accountancy_code : ''); $tabuser[$obj->rowid] = array( - 'id' => $obj->userid, - 'name' => dolGetFirstLastname($obj->firstname, $obj->lastname), - 'lastname' => $obj->lastname, - 'firstname' => $obj->firstname, - 'email' => $obj->useremail, - 'accountancy_code' => $compta_user + 'id' => $obj->userid, + 'name' => dolGetFirstLastname($obj->firstname, $obj->lastname), + 'lastname' => $obj->lastname, + 'firstname' => $obj->firstname, + 'email' => $obj->useremail, + 'accountancy_code' => $compta_user ); // Variable bookkeeping ($obj->rowid is Bank Id) @@ -264,10 +271,6 @@ if ($result) { // Load of url links to the line into llx_bank $links = $object->get_url($obj->rowid); // Get an array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) - //var_dump($i); - //var_dump($tabpay); - //var_dump($tabcompany); - // By default $tabpay[$obj->rowid]['type'] = 'unknown'; // Can be SOLD, miscellaneous entry, payment of patient, or any old record with no links in bank_url. $tabtype[$obj->rowid] = 'unknown'; @@ -277,17 +280,14 @@ if ($result) { if (is_array($links) && count($links) > 0) { // Now loop on each link of record in bank. foreach ($links as $key => $val) { - if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) - { + if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) { // So we excluded 'company' and 'user' here. We want only payment lines // We save tabtype for a future use, to remember what kind of payment it is $tabpay[$obj->rowid]['type'] = $links[$key]['type']; $tabtype[$obj->rowid] = $links[$key]['type']; - } elseif (in_array($links[$key]['type'], array('company', 'user'))) - { - if ($tabpay[$obj->rowid]['type'] == 'unknown') - { + } elseif (in_array($links[$key]['type'], array('company', 'user'))) { + if ($tabpay[$obj->rowid]['type'] == 'unknown') { // We can guess here it is a bank record for a thirdparty company or a user. // But we won't be able to record somewhere else than into a waiting account, because there is no other journal to record the contreparty. } @@ -312,16 +312,23 @@ if ($result) { $societestatic->name = $links[$key]['label']; $societestatic->email = $tabcompany[$obj->rowid]['email']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + if ($compta_soc) { + $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + } } elseif ($links[$key]['type'] == 'user') { $userstatic->id = $links[$key]['url_id']; $userstatic->name = $links[$key]['label']; $userstatic->email = $tabuser[$obj->rowid]['email']; $userstatic->firstname = $tabuser[$obj->rowid]['firstname']; $userstatic->lastname = $tabuser[$obj->rowid]['lastname']; - if ($userstatic->id > 0) $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); - else $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment. - if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount; + if ($userstatic->id > 0) { + $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); + } else { + $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment. + } + if ($compta_user) { + $tabtp[$obj->rowid][$compta_user] += $obj->amount; + } } elseif ($links[$key]['type'] == 'sc') { $chargestatic->id = $links[$key]['url_id']; $chargestatic->ref = $links[$key]['url_id']; @@ -329,8 +336,9 @@ if ($result) { $tabpay[$obj->rowid]["lib"] .= ' '.$chargestatic->getNomUrl(2); $reg = array(); if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { - if ($reg[1] == 'socialcontribution') + if ($reg[1] == 'socialcontribution') { $reg[1] = 'SocialContribution'; + } $chargestatic->label = $langs->trans($reg[1]); } else { $chargestatic->label = $links[$key]['label']; @@ -430,20 +438,17 @@ if ($result) { // If no links were found to know the amount on thirdparty, we try to guess it. // This may happens on bank entries without the links lines to 'company'. - if (empty($tabtp[$obj->rowid]) && !empty($tabmoreinfo[$obj->rowid]['withdraw'])) // If we dont find 'company' link because it is an old 'withdraw' record - { + if (empty($tabtp[$obj->rowid]) && !empty($tabmoreinfo[$obj->rowid]['withdraw'])) { // If we dont find 'company' link because it is an old 'withdraw' record foreach ($links as $key => $val) { if ($links[$key]['type'] == 'payment') { // Get thirdparty $tmppayment->fetch($links[$key]['url_id']); $arrayofamounts = $tmppayment->getAmountsArray(); if (is_array($arrayofamounts)) { - foreach ($arrayofamounts as $invoiceid => $amount) - { + foreach ($arrayofamounts as $invoiceid => $amount) { $tmpinvoice->fetch($invoiceid); $tmpinvoice->fetch_thirdparty(); - if ($tmpinvoice->thirdparty->code_compta) - { + if ($tmpinvoice->thirdparty->code_compta) { $tabtp[$obj->rowid][$tmpinvoice->thirdparty->code_compta] += $amount; } } @@ -453,7 +458,9 @@ if ($result) { } // If no links were found to know the amount on thirdparty, we init it to account 'NotDefined'. - if (empty($tabtp[$obj->rowid])) $tabtp[$obj->rowid]['NotDefined'] = $tabbq[$obj->rowid][$compta_bank]; + if (empty($tabtp[$obj->rowid])) { + $tabtp[$obj->rowid]['NotDefined'] = $tabbq[$obj->rowid][$compta_bank]; + } // Check account number is ok /*if ($action == 'writebookkeeping') // Make test now in such a case @@ -494,8 +501,7 @@ if (!$error && $action == 'writebookkeeping') { $now = dol_now(); $error = 0; - foreach ($tabpay as $key => $val) // $key is rowid into llx_bank - { + foreach ($tabpay as $key => $val) { // $key is rowid into llx_bank $date = dol_print_date($db->jdate($val["date"]), 'day'); $ref = getSourceDocRef($val, $tabtype[$key]); @@ -513,17 +519,18 @@ if (!$error && $action == 'writebookkeeping') { var_dump($tabbq);exit;*/ // Bank - if (!$errorforline && is_array($tabbq[$key])) - { + if (!$errorforline && is_array($tabbq[$key])) { // Line into bank account - foreach ($tabbq[$key] as $k => $mt) - { - if ($mt) - { + foreach ($tabbq[$key] as $k => $mt) { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + } $reflabel .= $langs->trans("Bank").' '.dol_string_nohtmltag($val['bank_account_ref']); - if (!empty($val['soclib'])) $reflabel .= " - ".dol_string_nohtmltag($val['soclib']); + if (!empty($val['soclib'])) { + $reflabel .= " - ".dol_string_nohtmltag($val['soclib']); + } $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; @@ -556,8 +563,7 @@ if (!$error && $action == 'writebookkeeping') { $result = $bookkeeping->create($user); if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') { // Already exists $error++; $errorforline++; setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); @@ -572,18 +578,16 @@ if (!$error && $action == 'writebookkeeping') { } // Third party - if (!$errorforline) - { - if (is_array($tabtp[$key])) - { + if (!$errorforline) { + if (is_array($tabtp[$key])) { // Line into thirdparty account foreach ($tabtp[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']).($val['soclib'] ? " - " : ""); - if ($tabtype[$key] == 'banktransfert') - { + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib']).($val['soclib'] ? " - " : ""); + } + if ($tabtype[$key] == 'banktransfert') { $reflabel .= dol_string_nohtmltag($langs->transnoentitiesnoconv('TransitionalAccount').' '.$account_transfer); } else { $reflabel .= dol_string_nohtmltag($val['soclib']); @@ -683,9 +687,8 @@ if (!$error && $action == 'writebookkeeping') { $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; } else { - if ($tabtype[$key] == 'unknown') // Unknown transaction, we will use a waiting account for thirdparty. - { - // Temporary account + if ($tabtype[$key] == 'unknown') { // Unknown transaction, we will use a waiting account for thirdparty. + // Temporary account $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE; @@ -702,8 +705,7 @@ if (!$error && $action == 'writebookkeeping') { $result = $bookkeeping->create($user); if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') { // Already exists $error++; $errorforline++; setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); @@ -717,10 +719,11 @@ if (!$error && $action == 'writebookkeeping') { } } else { // If thirdparty unknown, output the waiting account foreach ($tabbq[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + } $reflabel .= dol_string_nohtmltag('WaitingAccount'); $bookkeeping = new BookKeeping($db); @@ -747,8 +750,7 @@ if (!$error && $action == 'writebookkeeping') { $result = $bookkeeping->create($user); if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') { // Already exists $error++; $errorforline++; setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); @@ -763,23 +765,20 @@ if (!$error && $action == 'writebookkeeping') { } } - if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')) - { + if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')) { $error++; $errorforline++; setEventMessages('Try to insert a non balanced transaction in book for '.$ref.'. Canceled. Surely a bug.', null, 'errors'); } - if (!$errorforline) - { + if (!$errorforline) { $db->commit(); } else { //print 'KO for line '.$key.' '.$error.'
'; $db->rollback(); $MAXNBERRORS = 5; - if ($error >= $MAXNBERRORS) - { + if ($error >= $MAXNBERRORS) { setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped").' (>'.$MAXNBERRORS.')', null, 'errors'); break; // Break in the foreach } @@ -788,8 +787,7 @@ if (!$error && $action == 'writebookkeeping') { if (empty($error) && count($tabpay) > 0) { setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs'); - } elseif (count($tabpay) == $error) - { + } elseif (count($tabpay) == $error) { setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings'); } else { setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings'); @@ -798,8 +796,7 @@ if (!$error && $action == 'writebookkeeping') { $action = ''; // Must reload data, so we make a redirect - if (count($tabpay) != $error) - { + if (count($tabpay) != $error) { $param = 'id_journal='.$id_journal; $param .= '&date_startday='.$date_startday; $param .= '&date_startmonth='.$date_startmonth; @@ -837,20 +834,22 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"'.$langs->transnoentitiesnoconv("Note").'"'.$sep; print "\n"; - foreach ($tabpay as $key => $val) - { + foreach ($tabpay as $key => $val) { $date = dol_print_date($db->jdate($val["date"]), 'day'); $ref = getSourceDocRef($val, $tabtype[$key]); // Bank foreach ($tabbq[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + } $reflabel .= $langs->trans("Bank").' '.dol_string_nohtmltag($val['bank_account_ref']); - if (!empty($val['soclib'])) $reflabel .= " - ".dol_string_nohtmltag($val['soclib']); + if (!empty($val['soclib'])) { + $reflabel .= " - ".dol_string_nohtmltag($val['soclib']); + } print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; @@ -870,12 +869,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! // Third party if (is_array($tabtp[$key])) { foreach ($tabtp[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']).($val['soclib'] ? " - " : ""); - if ($tabtype[$key] == 'banktransfert') - { + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib']).($val['soclib'] ? " - " : ""); + } + if ($tabtype[$key] == 'banktransfert') { $reflabel .= dol_string_nohtmltag($langs->transnoentitiesnoconv('TransitionalAccount').' '.$account_transfer); } else { $reflabel .= dol_string_nohtmltag($val['soclib']); @@ -907,10 +906,11 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! } } else { // If thirdparty unkown, output the waiting account foreach ($tabbq[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + if (!empty($val['lib'])) { + $reflabel .= dol_string_nohtmltag($val['lib'])." - "; + } $reflabel .= dol_string_nohtmltag('WaitingAccount'); print '"'.$key.'"'.$sep; @@ -967,16 +967,16 @@ if (empty($action) || $action == 'view') { // Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed) $sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE entity = '.$conf->entity.' AND fk_accountancy_journal IS NULL AND clos=0'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj->nb > 0) - { + if ($obj->nb > 0) { print '
'.img_warning().' '.$langs->trans("TheJournalCodeIsNotDefinedOnSomeBankAccount"); print ' : '.$langs->trans("AccountancyAreaDescBank", 9, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("BankAccounts").''); print '
'; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } // Button to write into Ledger @@ -990,14 +990,19 @@ if (empty($action) || $action == 'view') { print '
'; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') { + print ''; + } if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1' || ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') { print ''; } else { - if ($in_bookkeeping == 'notyet') print ''; - else print ''.$langs->trans("WriteBookKeeping").''; + if ($in_bookkeeping == 'notyet') { + print ''; + } else { + print ''.$langs->trans("WriteBookKeeping").''; + } } print '
'; @@ -1040,21 +1045,22 @@ if (empty($action) || $action == 'view') { $r = ''; - foreach ($tabpay as $key => $val) // $key is rowid in llx_bank - { + foreach ($tabpay as $key => $val) { // $key is rowid in llx_bank $date = dol_print_date($db->jdate($val["date"]), 'day'); $ref = getSourceDocRef($val, $tabtype[$key]); // Bank - foreach ($tabbq[$key] as $k => $mt) - { - if ($mt) - { + foreach ($tabbq[$key] as $k => $mt) { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= $val['lib']." - "; + if (!empty($val['lib'])) { + $reflabel .= $val['lib']." - "; + } $reflabel .= $langs->trans("Bank").' '.$val['bank_account_ref']; - if (!empty($val['soclib'])) $reflabel .= " - ".$val['soclib']; + if (!empty($val['soclib'])) { + $reflabel .= " - ".$val['soclib']; + } //var_dump($tabpay[$key]); print ''; @@ -1064,10 +1070,11 @@ if (empty($action) || $action == 'view') { // Ledger account print "
"; // Subledger account print ""; // Subledger account print ""; @@ -1180,10 +1210,11 @@ if (empty($action) || $action == 'view') { } } else { // Waiting account foreach ($tabbq[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= $val['lib']." - "; + if (!empty($val['lib'])) { + $reflabel .= $val['lib']." - "; + } $reflabel .= 'WaitingAccount'; print ''; @@ -1267,78 +1298,67 @@ function getSourceDocRef($val, $typerecord) } $sqlmid = ''; - if ($typerecord == 'payment') - { + if ($typerecord == 'payment') { $sqlmid = 'SELECT payfac.fk_facture as id, f.ref as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac, ".MAIN_DB_PREFIX."facture as f"; $sqlmid .= " WHERE payfac.fk_facture = f.rowid AND payfac.fk_paiement=".$val["paymentid"]; $ref = $langs->transnoentitiesnoconv("Invoice"); - } elseif ($typerecord == 'payment_supplier') - { + } elseif ($typerecord == 'payment_supplier') { $sqlmid = 'SELECT payfac.fk_facturefourn as id, f.ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn as payfac, ".MAIN_DB_PREFIX."facture_fourn as f"; $sqlmid .= " WHERE payfac.fk_facturefourn = f.rowid AND payfac.fk_paiementfourn=".$val["paymentsupplierid"]; $ref = $langs->transnoentitiesnoconv("SupplierInvoice"); - } elseif ($typerecord == 'payment_expensereport') - { + } elseif ($typerecord == 'payment_expensereport') { $sqlmid = 'SELECT e.rowid as id, e.ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."payment_expensereport as pe, ".MAIN_DB_PREFIX."expensereport as e"; $sqlmid .= " WHERE pe.rowid=".$val["paymentexpensereport"]." AND pe.fk_expensereport = e.rowid"; $ref = $langs->transnoentitiesnoconv("ExpenseReport"); - } elseif ($typerecord == 'payment_salary') - { + } elseif ($typerecord == 'payment_salary') { $sqlmid = 'SELECT s.rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; $sqlmid .= " WHERE s.rowid=".$val["paymentsalid"]; $ref = $langs->transnoentitiesnoconv("SalaryPayment"); - } elseif ($typerecord == 'sc') - { + } elseif ($typerecord == 'sc') { $sqlmid = 'SELECT sc.rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."paiementcharge as sc"; $sqlmid .= " WHERE sc.rowid=".$val["paymentscid"]; $ref = $langs->transnoentitiesnoconv("SocialContribution"); - } elseif ($typerecord == 'payment_vat') - { + } elseif ($typerecord == 'payment_vat') { $sqlmid = 'SELECT v.rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."tva as v"; $sqlmid .= " WHERE v.rowid=".$val["paymentvatid"]; $ref = $langs->transnoentitiesnoconv("PaymentVat"); - } elseif ($typerecord == 'payment_donation') - { + } elseif ($typerecord == 'payment_donation') { $sqlmid = 'SELECT payd.fk_donation as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."payment_donation as payd"; $sqlmid .= " WHERE payd.fk_donation=".$val["paymentdonationid"]; $ref = $langs->transnoentitiesnoconv("Donation"); - } elseif ($typerecord == 'payment_loan') - { + } elseif ($typerecord == 'payment_loan') { $sqlmid = 'SELECT l.rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."payment_loan as l"; $sqlmid .= " WHERE l.rowid=".$val["paymentloanid"]; $ref = $langs->transnoentitiesnoconv("LoanPayment"); - } elseif ($typerecord == 'payment_various') - { + } elseif ($typerecord == 'payment_various') { $sqlmid = 'SELECT v.rowid as ref'; $sqlmid .= " FROM ".MAIN_DB_PREFIX."payment_various as v"; $sqlmid .= " WHERE v.rowid=".$val["paymentvariousid"]; $ref = $langs->transnoentitiesnoconv("VariousPayment"); } // Add warning - if (empty($sqlmid)) - { + if (empty($sqlmid)) { dol_syslog("Found a typerecord=".$typerecord." not supported", LOG_WARNING); } - if ($sqlmid) - { + if ($sqlmid) { dol_syslog("accountancy/journal/bankjournal.php::sqlmid=".$sqlmid, LOG_DEBUG); $resultmid = $db->query($sqlmid); - if ($resultmid) - { - while ($objmid = $db->fetch_object($resultmid)) - { + if ($resultmid) { + while ($objmid = $db->fetch_object($resultmid)) { $ref .= ' '.$objmid->ref; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } $ref = dol_trunc($langs->transnoentitiesnoconv("BankId").' '.$val['fk_bank'].' - '.$ref, 295); // 295 + 3 dots (...) is < than max size of 300 From 3fc4fb79e0dbb3d9eec46029ebd21d40e5cace04 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 5 Dec 2020 17:20:28 +0000 Subject: [PATCH 17/73] Fixing style errors. --- htdocs/accountancy/journal/bankjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 5e6650562ab..032ed7c13cc 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -688,7 +688,7 @@ if (!$error && $action == 'writebookkeeping') { $bookkeeping->label_compte = $accountingaccount->label; } else { if ($tabtype[$key] == 'unknown') { // Unknown transaction, we will use a waiting account for thirdparty. - // Temporary account + // Temporary account $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE; From 758bb20750f9d325b518993648f394bbde3f2969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 18:55:39 +0100 Subject: [PATCH 18/73] fix undefined variable --- htdocs/product/class/product.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index dfb5a7e042a..c86e00602ea 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -828,7 +828,8 @@ class Product extends CommonObject $error = 0; // Check parameters - if (!$this->label) { $this->label = 'MISSING LABEL'; + if (!$this->label) { + $this->label = 'MISSING LABEL'; } // Clean parameters @@ -919,6 +920,9 @@ class Product extends CommonObject // If error, this->errors[] is filled if ($action != 'add') { $result = $this->verify(); // We don't check when update called during a create because verify was already done + } else { + // we can continue + $result = 0; } if ($result >= 0) { From 7a8d031d56dc5cf823c300d24c9f701dc87a5dac Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:17:57 +0100 Subject: [PATCH 19/73] Fix #15675 fixed the error of installation start of version 13.0.0-beta --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..17474f840ad 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + if(isset($conf->theme)) { + $theme = $conf->theme; + } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 1917d9b5084084bdd0ad43af7c1862f1929dc2c4 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:23:31 +0100 Subject: [PATCH 20/73] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 7a8d031d56dc5cf823c300d24c9f701dc87a5dac. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 17474f840ad..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; + $theme = $conf->theme; + $path = 'theme/'.$theme; - if(isset($conf->theme)) { - $theme = $conf->theme; - } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 1a1850c6f16d361bd86c0e521b42d50e3afc38af Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:28:55 +0100 Subject: [PATCH 21/73] Fix | fixed the error of installation start of version 13.0.0-beta --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..4bee0a0de80 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + if (isset($conf->theme)) { + $theme = $conf->theme; + } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From f6eb10f6e5bdbb867f1ca827135bc987b3ac7626 Mon Sep 17 00:00:00 2001 From: Nicolas Streng Date: Sat, 5 Dec 2020 21:10:57 +0100 Subject: [PATCH 22/73] Fix #15676 Hide Password when importing from LDAP Refers to Issue #15676 --- htdocs/user/card.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8934d8d87ec..61a4405fbfa 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -737,10 +737,12 @@ if ($action == 'create' || $action == 'adduserldap') $label = ''; foreach ($required_fields as $value) { - if ($value) - { - $label .= $value."=".$ldapuser[$value]." "; - } + if ($value === $conf->global->LDAP_FIELD_PASSWORD || $value === $conf->global->LDAP_FIELD_PASSWORD_CRYPTED) + { + $label .= $value."=******* "; + } else if ($value) { + $label .= $value."=".$ldapuser[$value]." "; + } } $liste[$key] = $label; } From e078d3005fbc8bbc794c896119b9f7152921a406 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 5 Dec 2020 20:13:54 +0000 Subject: [PATCH 23/73] Fixing style errors. --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 61a4405fbfa..a8c67a9cb73 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -740,7 +740,7 @@ if ($action == 'create' || $action == 'adduserldap') if ($value === $conf->global->LDAP_FIELD_PASSWORD || $value === $conf->global->LDAP_FIELD_PASSWORD_CRYPTED) { $label .= $value."=******* "; - } else if ($value) { + } elseif ($value) { $label .= $value."=".$ldapuser[$value]." "; } } From 4e18f46f28597e50b8885d82259abd093ca1d7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 23:53:55 +0100 Subject: [PATCH 24/73] doxygen --- .../class/accountingjournal.class.php | 2 +- htdocs/asset/class/asset.class.php | 40 +++++++------- htdocs/bom/class/bom.class.php | 12 ++--- .../mailing/class/advtargetemailing.class.php | 2 +- htdocs/comm/propal/class/propal.class.php | 2 +- .../deplacement/class/deplacement.class.php | 4 +- .../facture/class/facture-rec.class.php | 4 +- htdocs/compta/facture/class/facture.class.php | 4 +- htdocs/contrat/class/contrat.class.php | 4 +- htdocs/core/class/comment.class.php | 7 ++- .../core/class/emailsenderprofile.class.php | 40 +++++++------- htdocs/core/class/fiscalyear.class.php | 7 ++- htdocs/delivery/class/delivery.class.php | 4 +- htdocs/don/class/don.class.php | 2 +- .../class/emailcollector.class.php | 10 +++- .../class/emailcollectoraction.class.php | 6 +-- htdocs/expedition/class/expedition.class.php | 4 +- .../class/expensereport.class.php | 7 +++ .../class/expensereport_ik.class.php | 2 +- .../class/expensereport_rule.class.php | 2 +- htdocs/fichinter/class/fichinter.class.php | 4 +- htdocs/fichinter/class/fichinterrec.class.php | 4 ++ .../class/fournisseur.commande.class.php | 4 +- .../fourn/class/fournisseur.facture.class.php | 4 +- htdocs/holiday/class/holiday.class.php | 2 +- htdocs/hrm/class/establishment.class.php | 4 +- .../class/intracommreport.class.php | 2 +- .../template/class/myobject.class.php | 52 +++++++++---------- htdocs/mrp/class/mo.class.php | 6 +-- htdocs/product/class/product.class.php | 12 ++++- .../inventory/class/inventory.class.php | 9 ++-- htdocs/projet/class/project.class.php | 6 +-- htdocs/projet/class/task.class.php | 2 +- htdocs/reception/class/reception.class.php | 7 +++ .../class/recruitmentcandidature.class.php | 52 +++++++++---------- .../class/recruitmentjobposition.class.php | 48 ++++++++--------- .../class/companypaymentmode.class.php | 6 +-- htdocs/societe/class/societe.class.php | 2 +- htdocs/societe/class/societeaccount.class.php | 30 +++++------ .../class/supplier_proposal.class.php | 4 +- htdocs/user/class/user.class.php | 2 +- htdocs/user/class/usergroup.class.php | 7 ++- htdocs/website/class/websitepage.class.php | 14 ++--- htdocs/zapier/class/hook.class.php | 30 +++++------ 44 files changed, 261 insertions(+), 217 deletions(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index c002abf2a89..a76be081471 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -37,7 +37,7 @@ class AccountingJournal extends CommonObject public $table_element = 'accounting_journal'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 25cac778264..31397be4c02 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -160,26 +160,26 @@ class Asset extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'assetdet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_asset'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'Assetline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - /** - * @var AssetLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var int Name of subtable line + // */ + // public $table_element_line = 'assetdet'; + // /** + // * @var string Fieldname with ID of parent key if this field has a parent + // */ + // public $fk_element = 'fk_asset'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'Assetline'; + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables=array(); + // /** + // * @var AssetLine[] Array of subtable lines + // */ + // public $lines = array(); /** * Constructor diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 868abac9e54..8444c4e1812 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -183,19 +183,19 @@ class BOM extends CommonObject public $table_element_line = 'bom_bomline'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_bom'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'BOMLine'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables=array(); /** * @var array List of child tables. To know object to delete on cascade. diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 8a4ebfa90c9..b7f20319229 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -54,7 +54,7 @@ class AdvanceTargetingMailing extends CommonObject public $name; /** - * @var int element id + * @var int element id (it's not the name of a field) */ public $fk_element; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index c761f8b3321..1886ce87293 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -66,7 +66,7 @@ class Propal extends CommonObject public $table_element_line = 'propaldet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_propal'; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 1a1fd42d21b..75d2f71284c 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -43,12 +43,12 @@ class Deplacement extends CommonObject public $table_element = 'deplacement'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index e4187a4e906..48e2ad574ed 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -50,12 +50,12 @@ class FactureRec extends CommonInvoice public $table_element = 'facture_rec'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facturedet_rec'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture'; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 20be732da17..ee9012ede48 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -64,12 +64,12 @@ class Facture extends CommonInvoice public $table_element = 'facture'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facturedet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture'; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 9e277fd706b..49ac3fa4807 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -53,12 +53,12 @@ class Contrat extends CommonObject public $table_element = 'contrat'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'contratdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_contrat'; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index d2c6221a598..d748b0e5d50 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -32,10 +32,13 @@ class Comment extends CommonObject public $table_element = 'comment'; /** - * @var int Field with ID of parent key if this field has a parent + * @var int ID of parent key (it's nome the name of a field) */ - public $fk_element = ''; + public $fk_element; + /** + * @var string element type + */ public $element_type; /** diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index efb2e554da9..77d11f4840d 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -137,26 +137,26 @@ class EmailSenderProfile extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'emailsenderprofiledet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_emailsenderprofile'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'EmailSenderProfileline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); - /** - * @var EmailSenderProfileLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'emailsenderprofiledet'; + // /** + // * @var string Field with ID of parent key if this field has a parent + // */ + // public $fk_element = 'fk_emailsenderprofile'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'EmailSenderProfileline'; + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables=array(); + // /** + // * @var EmailSenderProfileLine[] Array of subtable lines + // */ + // public $lines = array(); diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 0e822076641..ebbdb2c3274 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -35,6 +35,9 @@ class Fiscalyear extends CommonObject */ public $element = 'fiscalyear'; + /** + * @var string picto + */ public $picto = 'technic'; /** @@ -43,12 +46,12 @@ class Fiscalyear extends CommonObject public $table_element = 'accounting_fiscalyear'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = ''; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 394e86fdd78..9c1e9682a10 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -48,7 +48,7 @@ class Delivery extends CommonObject public $element = "delivery"; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = "fk_delivery"; @@ -58,7 +58,7 @@ class Delivery extends CommonObject public $table_element = "delivery"; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = "deliverydet"; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 042b22b3a1c..be9426415fe 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -47,7 +47,7 @@ class Don extends CommonObject public $table_element = 'don'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_donation'; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1776e9855d5..2c55b11f8d2 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -52,13 +52,14 @@ class EmailCollector extends CommonObject * @var int Does emailcollector support extrafields ? 0=No, 1=Yes */ public $isextrafieldmanaged = 0; + /** * @var string String with name of icon for emailcollector. Must be the part after the 'object_' into object_emailcollector.png */ public $picto = 'generic'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_emailcollector'; @@ -158,7 +159,9 @@ class EmailCollector extends CommonObject */ public $date_creation; - + /** + * @var int timestamp + */ public $tms; /** @@ -171,6 +174,9 @@ class EmailCollector extends CommonObject */ public $fk_user_modif; + /** + * @var string import key + */ public $import_key; diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 9b7c8bbca49..58aaf9efdb7 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -118,17 +118,17 @@ class EmailCollectorAction extends CommonObject // If this object has a subtable with lines // /** - // * @var int Name of subtable line + // * @var string Name of subtable line // */ //public $table_element_line = 'emailcollectoractiondet'; // /** - // * @var int Field with ID of parent key if this field has a parent + // * @var string Field with ID of parent key if this field has a parent // */ //public $fk_element = 'fk_emailcollectoraction'; // /** - // * @var int Name of subtable class that manage subtable lines + // * @var string Name of subtable class that manage subtable lines // */ //public $class_element_line = 'EmailcollectorActionline'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 09a46f94bb8..e652dc5a3c1 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -55,7 +55,7 @@ class Expedition extends CommonObject public $element = "shipping"; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = "fk_expedition"; @@ -65,7 +65,7 @@ class Expedition extends CommonObject public $table_element = "expedition"; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = "expeditiondet"; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index ac1d052486f..3ecba5d5286 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -44,7 +44,14 @@ class ExpenseReport extends CommonObject */ public $table_element = 'expensereport'; + /** + * @var string table element line name + */ public $table_element_line = 'expensereport_det'; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = 'fk_expensereport'; /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 489b2671cf5..55af1eb00ed 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -40,7 +40,7 @@ class ExpenseReportIk extends CoreObject public $table_element = 'expensereport_ik'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_expense_ik'; diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 7ed3a5ecb09..9a172cd7563 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -40,7 +40,7 @@ class ExpenseReportRule extends CoreObject public $table_element = 'expensereport_rules'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Fieldname with ID of parent key if this field has a parent */ public $fk_element = 'fk_expense_rule'; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 617da1963b8..7145605cb85 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -76,7 +76,7 @@ class Fichinter extends CommonObject public $table_element = 'fichinter'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_fichinter'; @@ -1435,7 +1435,7 @@ class FichinterLigne extends CommonObjectLine public $table_element = 'fichinterdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_fichinter'; diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 377b97b2abb..046d35b62ce 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -41,6 +41,10 @@ class FichinterRec extends Fichinter public $element = 'fichinterrec'; public $table_element = 'fichinter_rec'; public $table_element_line = 'fichinter_rec'; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = 'fk_fichinter'; /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b03faf7f629..c1be4db7be3 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -53,12 +53,12 @@ class CommandeFournisseur extends CommonOrder public $table_element = 'commande_fournisseur'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'commande_fournisseurdet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_commande'; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 09c74dd5d92..4ddc552daa2 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -57,12 +57,12 @@ class FactureFournisseur extends CommonInvoice public $table_element = 'facture_fourn'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'facture_fourn_det'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_facture_fourn'; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 0677cd2f601..fb489338cb7 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -50,7 +50,7 @@ class Holiday extends CommonObject public $ismultientitymanaged = 0; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_holiday'; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 02083ccd819..dc97787ae6e 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -40,12 +40,12 @@ class Establishment extends CommonObject public $table_element = 'establishment'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = ''; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_establishment'; diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index dc12427ec33..13df902d9b8 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -40,7 +40,7 @@ class IntracommReport extends CommonObject public $table_element = 'intracommreport'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_intracommreport'; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 5d0281a5ea3..c0798fd52b8 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -187,37 +187,37 @@ class MyObject extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'mymodule_myobjectline'; + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'mymodule_myobjectline'; - /** - * @var int Field with ID of parent key if this object has a parent - */ - //public $fk_element = 'fk_myobject'; + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_myobject'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'MyObjectline'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'MyObjectline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables = array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); - /** - * @var array List of child tables. To know object to delete on cascade. - * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will - * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object - */ - //protected $childtablesoncascade = array('mymodule_myobjectdet'); + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('mymodule_myobjectdet'); - /** - * @var MyObjectLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var MyObjectLine[] Array of subtable lines + // */ + // public $lines = array(); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 2f58c90a433..b4e6b776cdd 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -166,17 +166,17 @@ class Mo extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'mo_production'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_mo'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'MoLine'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index dfb5a7e042a..ab8e1a22a80 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -56,14 +56,22 @@ class Product extends CommonObject public $table_element = 'product'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_product'; /** * @var array List of child tables. To test if we can delete object. */ - protected $childtables = array('supplier_proposaldet', 'propaldet', 'commandedet', 'facturedet', 'contratdet', 'facture_fourn_det', 'commande_fournisseurdet'); + protected $childtables = array( + 'supplier_proposaldet', + 'propaldet', + 'commandedet', + 'facturedet', + 'contratdet', + 'facture_fourn_det', + 'commande_fournisseurdet' + ); /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index cb9da997d18..47d9425530f 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -170,6 +170,9 @@ class Inventory extends CommonObject */ public $fk_user_valid; + /** + * @var string import key + */ public $import_key; // END MODULEBUILDER PROPERTIES @@ -178,17 +181,17 @@ class Inventory extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'inventorydet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_inventory'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ public $class_element_line = 'Inventoryline'; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index f3442d759ed..4185d21d653 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -45,17 +45,17 @@ class Project extends CommonObject public $table_element = 'projet'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'projet_task'; /** - * @var int Name of field date + * @var string Name of field date */ public $table_element_date; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_projet'; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index d71ac0852bc..a51e68c095e 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -45,7 +45,7 @@ class Task extends CommonObject public $table_element = 'projet_task'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_task'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 07e32b64432..ef12d844ddc 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -46,7 +46,14 @@ class Reception extends CommonObject { use CommonIncoterm; + /** + * @var string element name + */ public $element = "reception"; + + /** + * @var string Fieldname with ID of parent key if this field has a parent + */ public $fk_element = "fk_reception"; public $table_element = "reception"; public $table_element_line = "commande_fournisseur_dispatch"; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 6c61ae55a1a..e997bfb7a3a 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -155,37 +155,37 @@ class RecruitmentCandidature extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'recruitment_recruitmentcandidatureline'; + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'recruitment_recruitmentcandidatureline'; - /** - * @var int Field with ID of parent key if this object has a parent - */ - //public $fk_element = 'fk_recruitmentcandidature'; + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_recruitmentcandidature'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'RecruitmentCandidatureline'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'RecruitmentCandidatureline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables = array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); - /** - * @var array List of child tables. To know object to delete on cascade. - * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will - * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object - */ - //protected $childtablesoncascade = array('recruitment_recruitmentcandidaturedet'); + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('recruitment_recruitmentcandidaturedet'); - /** - * @var RecruitmentCandidatureLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var RecruitmentCandidatureLine[] Array of subtable lines + // */ + // public $lines = array(); diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index a75e915baee..4d475b17cfe 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -170,35 +170,35 @@ class RecruitmentJobPosition extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ - //public $table_element_line = 'recruitment_recruitmentjobpositionline'; + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'recruitment_recruitmentjobpositionline'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - //public $fk_element = 'fk_recruitmentjobposition'; + // /** + // * @var string Field with ID of parent key if this field has a parent + // */ + // public $fk_element = 'fk_recruitmentjobposition'; - /** - * @var int Name of subtable class that manage subtable lines - */ - //public $class_element_line = 'RecruitmentJobPositionline'; + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'RecruitmentJobPositionline'; - /** - * @var array List of child tables. To test if we can delete object. - */ - //protected $childtables=array(); + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables=array(); - /** - * @var array List of child tables. To know object to delete on cascade. - */ - //protected $childtablesoncascade=array('recruitment_recruitmentjobpositiondet'); + // /** + // * @var array List of child tables. To know object to delete on cascade. + // */ + // protected $childtablesoncascade=array('recruitment_recruitmentjobpositiondet'); - /** - * @var RecruitmentJobPositionLine[] Array of subtable lines - */ - //public $lines = array(); + // /** + // * @var RecruitmentJobPositionLine[] Array of subtable lines + // */ + // public $lines = array(); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index ec6a3e77363..e88ea0e4f7c 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -199,15 +199,15 @@ class CompanyPaymentMode extends CommonObject // If this object has a subtable with lines /** - * @var int Name of subtable line + * @var string Name of subtable line */ //public $table_element_line = 'companypaymentmodedet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ //public $fk_element = 'fk_companypaymentmode'; /** - * @var int Name of subtable class that manage subtable lines + * @var string Name of subtable class that manage subtable lines */ //public $class_element_line = 'CompanyPaymentModeline'; /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 73c41aeb782..f18a6e1b9a8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -59,7 +59,7 @@ class Societe extends CommonObject public $table_element = 'societe'; /** - * @var int Field with ID of parent key if this field has a parent or for child tables + * @var string Field with ID of parent key if this field has a parent or for child tables */ public $fk_element = 'fk_soc'; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index fe67c87674e..435be20b9f1 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -165,25 +165,25 @@ class SocieteAccount extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ + // /** + // * @var string Name of subtable line + // */ //public $table_element_line = 'societe_accountdet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ + // /** + // * @var string Field with ID of parent key if this field has a parent + // */ //public $fk_element = 'fk_societe_account'; - /** - * @var int Name of subtable class that manage subtable lines - */ + // /** + // * @var string Name of subtable class that manage subtable lines + // */ //public $class_element_line = 'societeAccountline'; - /** - * @var array List of child tables. To test if we can delete object. - */ + // /** + // * @var array List of child tables. To test if we can delete object. + // */ //protected $childtables=array(); - /** - * @var societeAccountLine[] Array of subtable lines - */ + // /** + // * @var societeAccountLine[] Array of subtable lines + // */ //public $lines = array(); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b46ed476629..ad4f47389d5 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -61,12 +61,12 @@ class SupplierProposal extends CommonObject public $table_element = 'supplier_proposal'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'supplier_proposaldet'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_supplier_proposal'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3288571d2a7..36b50d82055 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -54,7 +54,7 @@ class User extends CommonObject public $table_element = 'user'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_user'; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 882d33bd562..5ba6b5553af 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -90,7 +90,10 @@ class UserGroup extends CommonObject */ public $datem; - public $note; // Description + /** + * @var string Description + */ + public $note; public $members = array(); // Array of users @@ -111,7 +114,7 @@ class UserGroup extends CommonObject ); /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_usergroup'; diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index ff072827423..ff3c8d9c780 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -181,19 +181,19 @@ class WebsitePage extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ + // /** + // * @var string Name of subtable line + // */ //public $table_element_line = 'mymodule_myobjectline'; /** - * @var int Field with ID of parent key if this field has a parent or for child tables + * @var string Field with ID of parent key if this field has a parent or for child tables */ public $fk_element = 'fk_website_page'; - /** - * @var int Name of subtable class that manage subtable lines - */ + // /** + // * @var string Name of subtable class that manage subtable lines + // */ //public $class_element_line = 'MyObjectline'; /** diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 5d5a9c84eda..53f060346b9 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -254,29 +254,29 @@ class Hook extends CommonObject // If this object has a subtable with lines - /** - * @var int Name of subtable line - */ + // /** + // * @var string Name of subtable line + // */ //public $table_element_line = 'hookdet'; - /** - * @var int Field with ID of parent key if this field has a parent - */ + // /** + // * @var string Field with ID of parent key if this field has a parent + // */ //public $fk_element = 'fk_hook'; - /** - * @var int Name of subtable class that manage subtable lines - */ + // /** + // * @var string Name of subtable class that manage subtable lines + // */ //public $class_element_line = 'MyObjectline'; - /** - * @var array Array of child tables (child tables to delete before deleting a record) - */ + // /** + // * @var array Array of child tables (child tables to delete before deleting a record) + // */ //protected $childtables=array('hookdet'); - /** - * @var MyObjectLine[] Array of subtable lines - */ + // /** + // * @var MyObjectLine[] Array of subtable lines + // */ //public $lines = array(); From fbc0be3a438b301a90458ea801ec83cadbf09ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 23:57:31 +0100 Subject: [PATCH 25/73] doxygen --- htdocs/core/class/comment.class.php | 98 ++++++++++++++++------------- 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index d748b0e5d50..3f9ca42e136 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -32,7 +32,7 @@ class Comment extends CommonObject public $table_element = 'comment'; /** - * @var int ID of parent key (it's nome the name of a field) + * @var int ID of parent key (it's not the name of a field) */ public $fk_element; @@ -75,10 +75,16 @@ class Comment extends CommonObject */ public $entity; + /** + * @var string import key + */ public $import_key; public $comments = array(); + /** + * @var Comment Object oldcopy + */ public $oldcopy; @@ -134,26 +140,26 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -193,12 +199,10 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows) - { + if ($num_rows) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -215,8 +219,11 @@ class Comment extends CommonObject $this->db->free($resql); - if ($num_rows) return 1; - else return 0; + if ($num_rows) { + return 1; + } else { + return 0; + } } else { $this->error = "Error ".$this->db->lasterror(); return -1; @@ -237,8 +244,12 @@ class Comment extends CommonObject $error = 0; // Clean parameters - if (isset($this->fk_element)) $this->fk_project = (int) trim($this->fk_element); - if (isset($this->description)) $this->description = trim($this->description); + if (isset($this->fk_element)) { + $this->fk_project = (int) trim($this->fk_element); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } // Update request @@ -256,24 +267,24 @@ class Comment extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -306,24 +317,24 @@ class Comment extends CommonObject $sql .= " WHERE rowid=".$this->id; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_COMMENT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -358,13 +369,10 @@ class Comment extends CommonObject dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows > 0) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($num_rows > 0) { + while ($obj = $this->db->fetch_object($resql)) { $comment = new self($db); $comment->fetch($obj->rowid); $this->comments[] = $comment; From f70806544537d44a78b2efc80c5acfca5d4df5b9 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:14:11 +0100 Subject: [PATCH 26/73] Revert "Fix | fixed the error of installation start of version 13.0.0-beta" This reverts commit 1a1850c6f16d361bd86c0e521b42d50e3afc38af. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4bee0a0de80..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; + $theme = $conf->theme; + $path = 'theme/'.$theme; - if (isset($conf->theme)) { - $theme = $conf->theme; - } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 8697fda78b18588e87cc3e974cc1d81ba4bbb920 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:22:06 +0100 Subject: [PATCH 27/73] fix | fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..b7ea582702a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,7 +3191,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; // Define fullpathpicto to use into src From 2a4fe639aebf4f66925f20ea7eb51bbb8d07fa9d Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:28:18 +0100 Subject: [PATCH 28/73] Revert "fix | fixed the error of installation start of version 13.0.0-beta" This reverts commit 8697fda78b18588e87cc3e974cc1d81ba4bbb920. --- htdocs/core/lib/functions.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b7ea582702a..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,8 +3191,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; // Define fullpathpicto to use into src From 3b7e510e6100f7f3d4768cf7a92e55e1d2a00a0b Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:31:54 +0100 Subject: [PATCH 29/73] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..bc0ab3b382e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + $theme = isset($conf->theme) ? $conf->theme : null; + $path = 'theme/'.$theme; + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From e38c6e4322b757ebdde714b2fbd512d716e0847c Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:42:45 +0100 Subject: [PATCH 30/73] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 3b7e510e6100f7f3d4768cf7a92e55e1d2a00a0b. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bc0ab3b382e..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 35ea990cffe509ba2a9abf3a043c067057c393ab Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:49:22 +0100 Subject: [PATCH 31/73] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..66f0ea78abf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 50b80785f527f08893d3e4fec3d897f1c2dd9600 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:56:18 +0100 Subject: [PATCH 32/73] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 35ea990cffe509ba2a9abf3a043c067057c393ab. --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 66f0ea78abf..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From dadb257c85719df681d67e2f80a2393fa9458355 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:58:46 +0100 Subject: [PATCH 33/73] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..6fe7454aabf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; - // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From b3fe38d6bb3e22eb4fcdfb5dbe1b3bf94c965ee6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 6 Dec 2020 14:20:16 +0100 Subject: [PATCH 34/73] Fix list current ticket in takepos with multicompany --- htdocs/takepos/invoice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 9ac81f1ccf9..d2d5621ace6 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1018,7 +1018,7 @@ $( document ).ready(function() { order('datec', 'ASC'); $resql = $db->query($sql); if ($resql) { @@ -1400,4 +1400,4 @@ if ($action == "search") '; } -print ''; \ No newline at end of file +print ''; From eac2a42b1c6a19114c7a7c1f3d6ff338248f06d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 6 Dec 2020 16:44:21 +0100 Subject: [PATCH 35/73] remove warning --- htdocs/accountancy/bookkeeping/card.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b250459bdce..d0f43cfe3dd 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2017 Florian Henry * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -128,8 +128,7 @@ if ($action == "confirm_update") { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { - if ($mode != '_tmp') - { + if ($mode != '_tmp') { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } @@ -165,14 +164,14 @@ if ($action == "confirm_update") { $object->label_operation = $label_operation; $object->debit = $debit; $object->credit = $credit; - $object->doc_date = GETPOST('doc_date', 'alpha'); - $object->doc_type = GETPOST('doc_type', 'alpha'); + $object->doc_date = (string) GETPOST('doc_date', 'alpha'); + $object->doc_type = (string) GETPOST('doc_type', 'alpha'); $object->piece_num = $piece_num; - $object->doc_ref = GETPOST('doc_ref', 'alpha'); + $object->doc_ref = (string) GETPOST('doc_ref', 'alpha'); $object->code_journal = $journal_code; $object->journal_label = $journal_label; - $object->fk_doc = (int) GETPOST('fk_doc', 'int'); - $object->fk_docdet = (int) GETPOST('fk_docdet', 'int'); + $object->fk_doc = GETPOSTINT('fk_doc'); + $object->fk_docdet = GETPOSTINT('fk_docdet'); if (floatval($debit) != 0.0) { $object->montant = $debit; // deprecated @@ -190,8 +189,7 @@ if ($action == "confirm_update") { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { - if ($mode != '_tmp') - { + if ($mode != '_tmp') { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } From ccf95542f1a5dcf6d81f21ddd9c3c7801c0dd6e3 Mon Sep 17 00:00:00 2001 From: Romain DESCHAMPS Date: Mon, 7 Dec 2020 09:52:25 +0100 Subject: [PATCH 36/73] Enabling StockAtDate menu --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b103a309f59..c57ec5ac457 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1592,7 +1592,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($conf->supplier_order->enabled) { $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire); } - $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->rights->produit->lire && $user->rights->stock->lire && $conf->global->MAIN_FEATURES_LEVEL >= 2); + $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->rights->produit->lire && $user->rights->stock->lire); // Categories for warehouses if (!empty($conf->categorie->enabled)) { From 8b3edd36eaea2985180e5d51666834563976582e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 10:37:55 +0100 Subject: [PATCH 37/73] Fix warning --- htdocs/product/class/product.class.php | 2 +- test/phpunit/ContactTest.php | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 740a2633a80..f6c31f8ac41 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1091,7 +1091,7 @@ class Product extends CommonObject } if (!$error) { - if ($conf->variants->enabled) { + if (!empty($conf->variants->enabled)) { include_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; $comb = new ProductCombination($this->db); diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 0c5687e67c9..7d7e2740bc1 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -334,25 +334,6 @@ class ContactTest extends PHPUnit\Framework\TestCase return $result; } - /** - * testContactStatic - * - * @return void - */ - public function testContactStatic() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject=new Contact($db); - - - return; - } - /** * testContactGetFullAddress * From 030df716a222403ce3d4531a0d2403877b483dd3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 11:01:08 +0100 Subject: [PATCH 38/73] Clean dead code: Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used. --- ChangeLog | 2 +- htdocs/paypal/lib/paypal.lib.php | 127 +------------------------ htdocs/stripe/lib/stripe.lib.php | 83 +--------------- test/phpunit/AllTests.php | 2 + test/phpunit/PaypalTest.php | 8 +- test/phpunit/StripeTest.php | 156 +++++++++++++++++++++++++++++++ 6 files changed, 167 insertions(+), 211 deletions(-) create mode 100644 test/phpunit/StripeTest.php diff --git a/ChangeLog b/ChangeLog index 7b685eb3381..9b29fe30e51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -243,7 +243,7 @@ Following changes may create regressions for some external modules, but were nec * The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of simple amount. * The method select_thirdparty(), deprecated since 3.8, into html.form.class.php has been removed. * Depreciate all methods with name ->valide(). Use instead methods ->validate(). - +* Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used. ***** ChangeLog for 12.0.3 compared to 12.0.2 ***** diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 00db8797a1f..655d501cac3 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -22,6 +22,8 @@ * \brief Library for common paypal functions */ +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; + /** * Define head array for tabs of paypal tools setup pages @@ -54,131 +56,6 @@ function paypaladmin_prepare_head() } - -/** - * Return string with full Url - * - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) - * @param string $ref Ref of object - * @return string Url string - */ -function showPaypalPaymentUrl($type, $ref) -{ - global $conf, $langs; - - $langs->load("paypal"); - $langs->load("paybox"); - $servicename = 'PayPal'; - $out = '

'; - $out .= img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
'; - $url = getPaypalPaymentUrl(0, $type, $ref); - $out .= ''; - $out .= ajax_autoselect("paypalurl", 0); - return $out; -} - - -/** - * Return string with full Url - * - * @param int $mode 0=True url, 1=Url formated with colors - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) - * @param string $ref Ref of object - * @param int $amount Amount - * @param string $freetag Free tag - * @return string Url string - */ -function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag') -{ - global $conf; - - $ref = str_replace(' ', '', $ref); - - if ($type == 'free') - { - $out = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?amount='.($mode ? '' : '').$amount.($mode ? '' : '').'&tag='.($mode ? '' : '').$freetag.($mode ? '' : ''); - if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else $out .= '&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - } - } - if ($type == 'order') - { - $out = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=order&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'order_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else { - $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + order_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); - $out .= ($mode ? '' : ''); - } - } - } - if ($type == 'invoice') - { - $out = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=invoice&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'invoice_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else { - $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); - $out .= ($mode ? '' : ''); - } - } - } - if ($type == 'contractline') - { - $out = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=contractline&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'contractline_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else { - $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); - $out .= ($mode ? '' : ''); - } - } - } - if ($type == 'membersubscription') - { - $out = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=membersubscription&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'member_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else { - $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + member_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); - $out .= ($mode ? '' : ''); - } - } - } - - // For multicompany - $out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities - - return $out; -} - - /** * Send redirect to paypal to browser * diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index bdd05fb47d9..f1d03ae39be 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -21,6 +21,8 @@ * \brief Library for common stripe functions */ +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; + /** * Define head array for tabs of stripe tools setup pages * @@ -52,87 +54,6 @@ function stripeadmin_prepare_head() } - -/** - * Return string with full Url - * - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) - * @param string $ref Ref of object - * @return string Url string - */ -function showStripePaymentUrl($type, $ref) -{ - global $conf, $langs; - - $langs->load("paypal"); - $langs->load("paybox"); - $langs->load("stripe"); - - $servicename = 'Stripe'; - $out = '

'; - $out .= img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
'; - $url = getStripePaymentUrl(0, $type, $ref); - $out .= '
'; - $out .= ajax_autoselect("stripeurl", 0); - return $out; -} - -/** - * Return string with full Url - * - * @param int $mode 0=True url, 1=Url formated with colors - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) - * @param string $ref Ref of object - * @param int $amount Amount - * @param string $freetag Free tag - * @return string Url string - */ -function getStripePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag') -{ - global $conf; - - $ref = str_replace(' ', '', $ref); - - if ($type == 'free') - { - $out = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?amount='.($mode ? '' : '').$amount.($mode ? '' : '').'&tag='.($mode ? '' : '').$freetag.($mode ? '' : ''); - } - if ($type == 'order') - { - $out = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?source=order&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'order_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - } - if ($type == 'invoice') - { - $out = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?source=invoice&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'invoice_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - } - if ($type == 'contractline') - { - $out = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?source=contractline&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'contractline_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - } - if ($type == 'membersubscription') - { - $out = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?source=membersubscription&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'member_ref'; - if ($mode == 0) $out .= urlencode($ref); - $out .= ($mode ? '' : ''); - } - - // For multicompany - $out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities - - return $out; -} - - /** * Show footer of company in HTML pages * diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 09c075c1083..0d195560d1c 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -258,6 +258,8 @@ class AllTests require_once dirname(__FILE__).'/PaypalTest.php'; $suite->addTestSuite('PaypalTest'); + require_once dirname(__FILE__).'/StripeTest.php'; + $suite->addTestSuite('StripeTest'); return $suite; } diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 19774a11c09..7a2e31cbdad 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -131,7 +131,7 @@ class PaypalTest extends PHPUnit\Framework\TestCase } /** - * testProductCreate + * testPaypalOk * * @return void */ @@ -143,13 +143,13 @@ class PaypalTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; - $urltotest=getPaypalPaymentUrl(0, 'free'); + $urltotest=getOnlinePaymentUrl(0, 'free'); print "urltotest=".$urltotest."\n"; $result=getURLContent($urltotest, 'GET', '', 1, array(), array('http', 'https'), 2); - print __METHOD__." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0); + print __METHOD__." result=".$result['http_code']."\n"; + $this->assertEquals(200, $result['http_code']); return $result; } diff --git a/test/phpunit/StripeTest.php b/test/phpunit/StripeTest.php new file mode 100644 index 00000000000..72d4722b34e --- /dev/null +++ b/test/phpunit/StripeTest.php @@ -0,0 +1,156 @@ + + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file test/phpunit/StripeTest.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +//require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/stripe/lib/stripe.lib.php'; + +if (empty($user->id)) +{ + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class StripeTest extends PHPUnit\Framework\TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return ProductTest + */ + public function __construct() + { + parent::__construct(); + + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + + if (empty($conf->stripe->enabled)) { print __METHOD__." Module Stripe must be enabled.\n"; die(); } + + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; + } + + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testStripeOk + * + * @return void + */ + public function testStripeOk() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $urltotest=getOnlinePaymentUrl(0, 'free'); + print "urltotest=".$urltotest."\n"; + + $result=getURLContent($urltotest, 'GET', '', 1, array(), array('http', 'https'), 2); + + print __METHOD__." result=".$result['http_code']."\n"; + $this->assertEquals(200, $result['http_code']); + + return $result; + } +} From aa2f0f766d5a23f09aa7b5f001515be68a1aad99 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Mon, 7 Dec 2020 11:25:06 +0100 Subject: [PATCH 39/73] Fix #15689 patch of Bug project filters in projet/list.php --- htdocs/projet/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 586d78ae7b3..16c56ee7dc0 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -144,7 +144,7 @@ $fieldstosearchall['s.nom'] = "ThirdPartyName"; $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field - if (!empty($val['visible'])) $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); + if (!empty($val['visible'])) $arrayfields['p.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); } // Add none object fields to fields for list From 0361d3afde474e49582451285c6ddafc71e9f9e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 11:42:35 +0100 Subject: [PATCH 40/73] Debug v13 --- htdocs/core/modules/DolibarrModules.class.php | 7 +-- htdocs/core/modules/modBookmark.class.php | 4 +- htdocs/core/modules/modCategorie.class.php | 6 +-- htdocs/core/modules/modProjet.class.php | 13 ++---- htdocs/core/modules/modSociete.class.php | 22 ++++----- htdocs/core/modules/modTicket.class.php | 13 ++---- htdocs/paypal/admin/paypal.php | 36 ++++++++++++--- htdocs/stripe/admin/stripe.php | 46 +++++++++++++------ 8 files changed, 89 insertions(+), 58 deletions(-) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 794cfd0cef4..510ec8ef55a 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1250,12 +1250,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it //print "Remove box ".$file.'
'; if ($file == 'box_graph_product_distribution.php') { if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - dol_syslog("We discard disabling of module ".$file." because another module still active require it."); + dol_syslog("We discard deleting module ".$file." because another module still active requires it."); continue; } } - if (empty($file)) { $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility + if (empty($file)) { + $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility } if ($this->db->type == 'sqlite3') { @@ -1284,7 +1285,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; $sql .= " WHERE file = '".$this->db->escape($file)."'"; - $sql .= " AND entity = ".$conf->entity; + $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php index 0a3d9ccd11b..e6ac76f0178 100644 --- a/htdocs/core/modules/modBookmark.class.php +++ b/htdocs/core/modules/modBookmark.class.php @@ -69,7 +69,9 @@ class modBookmark extends DolibarrModules $this->const = array(); // Boxes - $this->boxes = array(0=>array('file'=>'box_bookmarks.php', 'enabledbydefaulton'=>'Home')); + $this->boxes = array( + 0=>array('file'=>'box_bookmarks.php', 'enabledbydefaulton'=>'Home') + ); // Permissions $this->rights = array(); diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index a70593a5e1e..bb6c36b353c 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -386,10 +386,10 @@ class modCategorie extends DolibarrModules ) ); $typeexample = ""; - if ($conf->product->enabled) { $typeexample .= ($typeexample ? "/" : "")."0=Product"; } + if (!empty($conf->product->enabled)) { $typeexample .= ($typeexample ? "/" : "")."0=Product"; } if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; } - if ($conf->societe->enabled) { $typeexample .= ($typeexample ? "/" : "")."2=Customer-Prospect"; } - if ($conf->adherent->enabled) { $typeexample .= ($typeexample ? "/" : "")."3=Member"; } + if (!empty($conf->societe->enabled)) { $typeexample .= ($typeexample ? "/" : "")."2=Customer-Prospect"; } + if (!empty($conf->adherent->enabled)) { $typeexample .= ($typeexample ? "/" : "")."3=Member"; } $this->import_examplevalues_array[$r] = array( 'ca.label'=>"Supplier Category", 'ca.type'=>$typeexample, 'ca.description'=>"My Category description", 'ca.fk_parent' => '0' diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index af6398c7a6d..42513a5b9f2 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -138,14 +138,11 @@ class modProjet extends DolibarrModules $r++; // Boxes - $this->boxes = array(); - $r = 0; - $this->boxes[$r][1] = "box_project.php"; - $r++; - $this->boxes[$r][1] = "box_task.php"; - $r++; - $this->boxes[$r][1] = "box_validated_projects.php"; - $r++; + $this->boxes = array( + 0=>array('file'=>'box_project.php', 'enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_task.php', 'enabledbydefaulton'=>'Home'), + 2=>array('file'=>'box_validated_projects.php', 'enabledbydefaulton'=>'Home'), + ); // Permissions $this->rights = array(); diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index c8bbc50e490..9c82306b641 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -122,20 +122,14 @@ class modSociete extends DolibarrModules $r++; // Boxes - $this->boxes = array(); - $r = 0; - $this->boxes[$r][1] = "box_clients.php"; - $r++; - $this->boxes[$r][1] = "box_prospect.php"; - $r++; - $this->boxes[$r][1] = "box_contacts.php"; - $r++; - $this->boxes[$r][1] = "box_activity.php"; - $this->boxes[$r][2] = '(WarningUsingThisBoxSlowDown)'; - $r++; - $this->boxes[$r][1] = "box_goodcustomers.php"; - $this->boxes[$r][2] = '(WarningUsingThisBoxSlowDown)'; - $r++; + $this->boxes = array( + 0=>array('file'=>'box_clients.php', 'enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_prospect.php', 'enabledbydefaulton'=>'Home'), + 2=>array('file'=>'box_contacts.php', 'enabledbydefaulton'=>'Home'), + 3=>array('file'=>'box_activity.php', 'enabledbydefaulton'=>'Home', 'note'=>'(WarningUsingThisBoxSlowDown)'), + 4=>array('file'=>'box_goodcustomers.php', 'enabledbydefaulton'=>'Home', 'note'=>'(WarningUsingThisBoxSlowDown)'), + ); + // Permissions $this->rights = array(); $this->rights_class = 'societe'; diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index d19327bcea7..def2a7f7e69 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -139,15 +139,10 @@ class modTicket extends DolibarrModules // Boxes // Add here list of php file(s) stored in core/boxes that contains class to show a box. - $this->boxes = array(); // Boxes list - $r = 0; - // Example: - - $this->boxes[$r][1] = "box_last_ticket"; - $r++; - - $this->boxes[$r][1] = "box_last_modified_ticket"; - $r++; + $this->boxes = array( + 0=>array('file'=>'box_last_ticket.php', 'enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_last_modified_ticket.php', 'enabledbydefaulton'=>'Home') + ); // Boxes list // Permissions $this->rights = array(); // Permission array used by this module diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 04ee6dbe228..5ab913f7ce9 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -135,6 +135,7 @@ if (!function_exists('curl_version')) print '
'; +print '
'; print '
'; + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); + print '
'.$langs->trans("Lastname").'
'; + print $formcompany->select_civility( GETPOSTISSET( "civility_code" ) ? GETPOST( "civility_code" , 'aZ09' ) : $object->civility_code , 'civility_code' ); + print '
'.$langs->trans("Lastname").'
'; - print $formcompany->select_civility( GETPOSTISSET( "civility_code" ) ? GETPOST( "civility_code" , 'aZ09' ) : $object->civility_code , 'civility_code' ); + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); print '
'; if ($context == 'edit' && !empty($obj->{$fieldlist[$field]}) && !in_array($obj->{$fieldlist[$field]}, array_keys($elementList))) { - // Current tempalte type is an unknown type, so we must keep it as it is. + // Current template type is an unknown type, so we must keep it as it is. print ''; print $obj->{$fieldlist[$field]}; } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 110db6d8166..4451f13bd77 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3551,7 +3551,7 @@ if ($action == 'create') print '
"; $accounttoshow = length_accountg($k); - if (empty($accounttoshow) || $accounttoshow == 'NotDefined') - { + if (empty($accounttoshow) || $accounttoshow == 'NotDefined') { print ''.$langs->trans("BankAccountNotDefined").''; - } else print $accounttoshow; + } else { + print $accounttoshow; + } print ""; @@ -1091,12 +1098,12 @@ if (empty($action) || $action == 'view') { // Third party if (is_array($tabtp[$key])) { foreach ($tabtp[$key] as $k => $mt) { - if ($mt) - { + if ($mt) { $reflabel = ''; - if (!empty($val['lib'])) $reflabel .= $val['lib'].($val['soclib'] ? " - " : ""); - if ($tabtype[$key] == 'banktransfert') - { + if (!empty($val['lib'])) { + $reflabel .= $val['lib'].($val['soclib'] ? " - " : ""); + } + if ($tabtype[$key] == 'banktransfert') { $reflabel .= $langs->trans('TransitionalAccount').' '.$account_transfer; } else { $reflabel .= $val['soclib']; @@ -1110,21 +1117,32 @@ if (empty($action) || $action == 'view') { print ""; $account_ledger = $k; // Try to force general ledger account depending on type - if ($tabtype[$key] == 'payment') $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; - if ($tabtype[$key] == 'payment_supplier') $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; - if ($tabtype[$key] == 'payment_expensereport') $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; - if ($tabtype[$key] == 'payment_salary') $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; - if ($tabtype[$key] == 'payment_vat') $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT; - if ($tabtype[$key] == 'member') $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT; - if ($tabtype[$key] == 'payment_various') $account_ledger = $tabpay[$key]["account_various"]; + if ($tabtype[$key] == 'payment') { + $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; + } + if ($tabtype[$key] == 'payment_supplier') { + $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; + } + if ($tabtype[$key] == 'payment_expensereport') { + $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; + } + if ($tabtype[$key] == 'payment_salary') { + $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; + } + if ($tabtype[$key] == 'payment_vat') { + $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT; + } + if ($tabtype[$key] == 'member') { + $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT; + } + if ($tabtype[$key] == 'payment_various') { + $account_ledger = $tabpay[$key]["account_various"]; + } $accounttoshow = length_accountg($account_ledger); - if (empty($accounttoshow) || $accounttoshow == 'NotDefined') - { - if ($tabtype[$key] == 'unknown') - { + if (empty($accounttoshow) || $accounttoshow == 'NotDefined') { + if ($tabtype[$key] == 'unknown') { // We will accept writing, but into a waiting account - if (empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) || $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE == '-1') - { + if (empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) || $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE == '-1') { print ''.$langs->trans('UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking').''; } else { print ''.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).''; // We will use a waiting account @@ -1132,32 +1150,42 @@ if (empty($action) || $action == 'view') { } else { // We will refuse writing $errorstring = 'UnknownAccountForThirdpartyBlocking'; - if ($tabtype[$key] == 'payment') $errorstring = 'MainAccountForCustomersNotDefined'; - if ($tabtype[$key] == 'payment_supplier') $errorstring = 'MainAccountForSuppliersNotDefined'; - if ($tabtype[$key] == 'payment_expensereport') $errorstring = 'MainAccountForUsersNotDefined'; - if ($tabtype[$key] == 'payment_salary') $errorstring = 'MainAccountForUsersNotDefined'; - if ($tabtype[$key] == 'payment_vat') $errorstring = 'MainAccountForVatPaymentNotDefined'; - if ($tabtype[$key] == 'member') $errorstring = 'MainAccountForSubscriptionPaymentNotDefined'; + if ($tabtype[$key] == 'payment') { + $errorstring = 'MainAccountForCustomersNotDefined'; + } + if ($tabtype[$key] == 'payment_supplier') { + $errorstring = 'MainAccountForSuppliersNotDefined'; + } + if ($tabtype[$key] == 'payment_expensereport') { + $errorstring = 'MainAccountForUsersNotDefined'; + } + if ($tabtype[$key] == 'payment_salary') { + $errorstring = 'MainAccountForUsersNotDefined'; + } + if ($tabtype[$key] == 'payment_vat') { + $errorstring = 'MainAccountForVatPaymentNotDefined'; + } + if ($tabtype[$key] == 'member') { + $errorstring = 'MainAccountForSubscriptionPaymentNotDefined'; + } print ''.$langs->trans($errorstring).''; } - } else print $accounttoshow; + } else { + print $accounttoshow; + } print ""; - if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary', 'payment_various'))) // Type of payment with subledger - { + if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary', 'payment_various'))) { // Type of payment with subledger $accounttoshowsubledger = length_accounta($k); - if ($accounttoshow != $accounttoshowsubledger) - { - if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') - { + if ($accounttoshow != $accounttoshowsubledger) { + if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') { /*var_dump($tabpay[$key]); var_dump($tabtype[$key]); var_dump($tabbq[$key]);*/ //print ''.$langs->trans("ThirdpartyAccountNotDefined").''; - if (!empty($tabcompany[$key]['code_compta'])) - { + if (!empty($tabcompany[$key]['code_compta'])) { if (in_array($tabtype[$key], array('payment_various'))) { // For such case, if subledger is not defined, we won't use subledger accounts. print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored").''; @@ -1167,7 +1195,9 @@ if (empty($action) || $action == 'view') { } else { print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking").''; } - } else print $accounttoshowsubledger; + } else { + print $accounttoshowsubledger; + } } } print "
'; // Account Parameters @@ -144,7 +145,7 @@ print ''; print "\n"; print ''; -print ''; +print '
'.$langs->trans("Value").'
'; +print ''; print $langs->trans("PaypalLiveEnabled").''; if (empty($conf->global->PAYPAL_API_SANDBOX)) { @@ -181,6 +182,15 @@ print $langs->trans("PAYPAL_SSLVERSION").''; print $form->selectarray("PAYPAL_SSLVERSION", array('1'=> $langs->trans('TLSv1'), '6'=> $langs->trans('TLSv1.2')), $conf->global->PAYPAL_SSLVERSION); print '
'; +print ''; + +print '
'; + + +print '
'; +print ''; + // Usage Parameters print ''; print ''; @@ -211,6 +221,7 @@ if (!empty($conf->banque->enabled)) { print ''; } @@ -255,6 +266,14 @@ print ''.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print ''; +print '
'.$langs->trans("UsageParameter").'
'; print $langs->trans("BankAccount").''; + print img_picto('', 'bank_account').' '; $form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print '
'; +print '
'; + +print '
'; + +print '
'; +print ''; + print ''; print ''; print ''; @@ -284,6 +303,7 @@ if ($conf->use_javascript_ajax) { print ''; print '
'.$langs->trans("UrlGenerationParameters").''.$langs->trans("Value").'
'; +print '
'; print dol_get_fiche_end(); @@ -296,7 +316,7 @@ print '

'; // Help doc print ''.$langs->trans("InformationToFindParameters", "Paypal").':
'; if (!empty($conf->use_javascript_ajax)) - print ''.$langs->trans("ClickHere").'...'; + print ''.$langs->trans("ClickHere").'...'; $realpaypalurl = 'www.paypal.com'; $sandboxpaypalurl = 'developer.paypal.com'; @@ -318,11 +338,13 @@ if (!empty($conf->use_javascript_ajax)) { print "\n".''; } diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 26d540e4093..c304a00ce3f 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -169,6 +169,7 @@ print ''.$langs->trans("StripeDesc")."
\n" print '
'; +print '
'; print ''; print ''; print ''; @@ -177,7 +178,7 @@ print ''; print "\n"; print ''; -print '
'.$langs->trans("AccountParameter").'
'; +print ''; print $langs->trans("StripeLiveEnabled").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_LIVE'); @@ -209,9 +210,9 @@ if (empty($conf->stripeconnect->enabled)) } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php?test', 3); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinetestwebhookurl", 0); print '
'.$out; print '
'; @@ -278,9 +279,9 @@ if (empty($conf->stripeconnect->enabled)) } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php', 3); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinelivewebhookurl", 0); print '
'.$out; print '
'; @@ -321,13 +322,15 @@ if (empty($conf->stripeconnect->enabled)) print '
'; +print '
'; print '
'; +print '
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; @@ -339,11 +342,12 @@ print ''; print ''; print ''; @@ -437,6 +441,19 @@ print ''.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print ''; +print '
'.$langs->trans("UsageParameter").''.$langs->trans("UsageParameter").''.$langs->trans("Value").'
'; print $langs->trans("StripeUserAccountForActions").''; -print $form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0); +print img_picto('', 'user').$form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0); print '
'; print $langs->trans("BankAccount").''; +print img_picto('', 'bank_account').' '; $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print '
'; +print '
'; + +print '
'; + +print '
'; +print ''; + +print ''; +print ''; +print ''; +print "\n"; + // Payment token for URL print ''; print '
'.$langs->trans("UrlGenerationParameters").''.$langs->trans("Value").'
'; print $langs->trans("SecurityToken").''; @@ -461,6 +478,7 @@ if ($conf->use_javascript_ajax) { print '
'; +print '
'; print dol_get_fiche_end(); @@ -481,12 +499,14 @@ if (!empty($conf->use_javascript_ajax)) { print "\n".''; } From 4f826fae2641398d12fffea32570bea9634c7ff7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 12:15:59 +0100 Subject: [PATCH 41/73] Fix warnings --- htdocs/core/modules/modExpedition.class.php | 4 +-- htdocs/core/modules/modPropale.class.php | 4 +-- htdocs/exports/class/export.class.php | 34 ++++++++++++--------- test/phpunit/AllTests.php | 8 ++--- test/phpunit/ExportTest.php | 4 +-- test/phpunit/ImportTest.php | 2 +- test/phpunit/ScriptsTest.php | 14 ++++++++- 7 files changed, 43 insertions(+), 27 deletions(-) diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 8d11989f02a..54fecd1a5af 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -291,7 +291,7 @@ class modExpedition extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'expedition as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expedition_extrafields as extra ON c.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'societe as s'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'expeditiondet as ed'; @@ -306,7 +306,7 @@ class modExpedition extends DolibarrModules } $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('expedition').')'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; } diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index f06496e781a..f1de32bd1a9 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -241,7 +241,7 @@ class modPropale extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s '; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'propal as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON c.fk_projet = pj.rowid'; @@ -254,7 +254,7 @@ class modPropale extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('propal').')'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; // Imports //-------- diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index cf63b85879c..3ecece7e886 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -35,6 +35,8 @@ class Export */ public $db; + public $error; + public $array_export_code = array(); // Tableau de "idmodule_numlot" public $array_export_module = array(); // Tableau de "nom de modules" public $array_export_label = array(); // Tableau de "libelle de lots" @@ -139,11 +141,10 @@ class Export { $perm = $val; //print_r("$perm[0]-$perm[1]-$perm[2]
"); - if (!empty($perm[2])) - { - $bool = $user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}; + if (!empty($perm[2])) { + $bool = isset($user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}) ? $user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]} : false; } else { - $bool = $user->rights->{$perm[0]}->{$perm[1]}; + $bool = isset($user->rights->{$perm[0]}->{$perm[1]}) ? $user->rights->{$perm[0]}->{$perm[1]} : false; } if ($perm[0] == 'user' && $user->admin) $bool = true; if (!$bool) break; @@ -185,14 +186,14 @@ class Export // Tableau des operations speciales sur champ $this->array_export_special[$i] = (!empty($module->export_special_array[$r]) ? $module->export_special_array[$r] : ''); // Array of examples - $this->array_export_examplevalues[$i] = $module->export_examplevalues_array[$r]; + $this->array_export_examplevalues[$i] = (!empty($module->export_examplevalues_array[$r]) ? $module->export_examplevalues_array[$r] : null); // Array of help tooltips $this->array_export_help[$i] = (!empty($module->export_help_array[$r]) ? $module->export_help_array[$r] : ''); // Requete sql du dataset $this->array_export_sql_start[$i] = $module->export_sql_start[$r]; $this->array_export_sql_end[$i] = $module->export_sql_end[$r]; - $this->array_export_sql_order[$i] = $module->export_sql_order[$r]; + $this->array_export_sql_order[$i] = (!empty($module->export_sql_order[$r]) ? $module->export_sql_order[$r] : null); //$this->array_export_sql[$i]=$module->export_sql[$r]; dol_syslog(get_class($this)."::load_arrays loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".(!empty($module->export_fields_code[$r]) ?count($module->export_fields_code[$r]) : '')); @@ -580,9 +581,12 @@ class Export if ($resql) { //$this->array_export_label[$indice] - if ($conf->global->EXPORT_PREFIX_SPEC) + if (!empty($conf->global->EXPORT_PREFIX_SPEC)) { $filename = $conf->global->EXPORT_PREFIX_SPEC."_".$datatoexport; - else $filename = "export_".$datatoexport; + } + else { + $filename = "export_".$datatoexport; + } $filename .= '.'.$objmodel->getDriverExtension(); $dirname = $conf->export->dir_temp.'/'.$user->id; @@ -598,7 +602,7 @@ class Export $objmodel->write_header($outputlangs); // Genere ligne de titre - $objmodel->write_title($this->array_export_fields[$indice], $array_selected, $outputlangs, $this->array_export_TypeFields[$indice]); + $objmodel->write_title($this->array_export_fields[$indice], $array_selected, $outputlangs, isset($this->array_export_TypeFields[$indice]) ? $this->array_export_TypeFields[$indice] : null); while ($obj = $this->db->fetch_object($resql)) { @@ -651,18 +655,20 @@ class Export } $obj->$alias = $remaintopay; } else { - // TODO FIXME Export of compute field does not work. $obj containt $obj->alias_field and formulat will contains $obj->field + // TODO FIXME + // Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field + // Also the formula may contains objects of class that are not loaded. $computestring = $this->array_export_special[$indice][$key]; - $tmp = dol_eval($computestring, 1, 0); - $obj->$alias = $tmp; + //$tmp = dol_eval($computestring, 1, 0); + //$obj->$alias = $tmp; - $this->error = "ERROPNOTSUPPORTED. Operation ".$this->array_export_special[$indice][$key]." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; + $this->error = "ERROPNOTSUPPORTED. Operation ".$computestring." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; return -1; } } } // end of special operation processing - $objmodel->write_record($array_selected, $obj, $outputlangs, $this->array_export_TypeFields[$indice]); + $objmodel->write_record($array_selected, $obj, $outputlangs, isset($this->array_export_TypeFields[$indice]) ? $this->array_export_TypeFields[$indice] : null); } // Genere en-tete diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 0d195560d1c..163bf320075 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -242,11 +242,6 @@ class AllTests require_once dirname(__FILE__).'/ScriptsTest.php'; $suite->addTestSuite('ScriptsTest'); - require_once dirname(__FILE__).'/FormAdminTest.php'; - $suite->addTestSuite('FormAdminTest'); - require_once dirname(__FILE__).'/FormTest.php'; - $suite->addTestSuite('FormTest'); - require_once dirname(__FILE__).'/ModulesTest.php'; // At end because it's the longer $suite->addTestSuite('ModulesTest'); @@ -254,8 +249,11 @@ class AllTests // GUI require_once dirname(__FILE__).'/FormAdminTest.php'; $suite->addTestSuite('FormAdminTest'); + require_once dirname(__FILE__).'/FormTest.php'; + $suite->addTestSuite('FormTest'); + // Payment services require_once dirname(__FILE__).'/PaypalTest.php'; $suite->addTestSuite('PaypalTest'); require_once dirname(__FILE__).'/StripeTest.php'; diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 2a3cb079baf..0f5b0bd82e3 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -149,7 +149,7 @@ class ExportTest extends PHPUnit\Framework\TestCase $file = "export_".$model.".modules.php"; $classname = "Export".$model; require_once $dir.$file; - $objmodel = new $classname($this->db); + $objmodel = new $classname($db); // First test without option USE_STRICT_CSV_RULES unset($conf->global->USE_STRICT_CSV_RULES); @@ -364,7 +364,7 @@ class ExportTest extends PHPUnit\Framework\TestCase $sql = ""; $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult = 1; - $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed'); + $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed: '.$objexport->error); $result=dol_is_file($exportfile); $this->assertTrue($result, 'File '.$exportfile.' not found'); } diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index ce689fda4a4..e9bf019740c 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -140,7 +140,7 @@ class ImportTest extends PHPUnit\Framework\TestCase // TODO // Run import on file and check the record with field "auto" are filled // according to option - + $this->assertEquals(0, 0); return true; } diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 16884214418..82d1ee28e39 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -68,7 +68,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * Constructor * We save global variables into local variables * - * @return SecurityTest + * @return ScriptsTest */ public function __construct() { @@ -152,6 +152,10 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $db=$this->savdb; $script=dirname(__FILE__).'/../../scripts/bank/export-bank-receipts.php BANKDUMMY RECEIPTDUMMY excel2007 lang=fr_FR'; + + $returnvar = 0; + $output = array(); + $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; @@ -187,6 +191,8 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $this->assertEquals($result,'Failed to find bank account with ref BANKDUMMY.'); $this->assertEquals($returnvar,255); */ + $this->assertEquals(0, 0); + return ''; } @@ -204,6 +210,9 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + $returnvar = 0; + $output = array(); + $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test thirdparties'; $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; @@ -242,6 +251,9 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + $returnvar = 0; + $output = array(); + $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test thirdparties'; $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; From ca2ce88bd2c0446a3025580121c5d5bf975b856a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 13:29:56 +0100 Subject: [PATCH 42/73] Fix warning --- .../core/triggers/interface_50_modTicket_TicketEmail.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 3743d044e44..f6157c38edc 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -132,8 +132,9 @@ class InterfaceTicketEmail extends DolibarrTriggers $langs->load('ticket'); // Send email to notification email - $sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) { + $sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + if ($sendto) { // Init to avoid errors $filepath = array(); From f21fc43e7efd730bca9d31e17371b1313a129759 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:25:49 +0100 Subject: [PATCH 43/73] Fix label of field --- htdocs/core/menus/standard/eldy.lib.php | 3 +- htdocs/user/card.php | 70 ++++++++++++------------- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b103a309f59..c9a3ba48dab 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -360,10 +360,11 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // HRM $tmpentry = array( - 'enabled'=>(!empty($conf->hrm->enabled) || !empty($conf->holiday->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), + 'enabled'=>(!empty($conf->hrm->enabled) || (!empty($conf->holiday->enabled)) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), 'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' ); + $menu_arr[] = array( 'name' => 'HRM', 'link' => '/hrm/index.php?mainmenu=hrm&leftmenu=', diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8934d8d87ec..9d676c9423f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -930,12 +930,6 @@ if ($action == 'create' || $action == 'adduserldap') print "\n"; } - // Type - print ''.$langs->trans("Type").''; - print ''; - print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); - print ''; - // Gender print ''.$langs->trans("Gender").''; print ''; @@ -983,6 +977,11 @@ if ($action == 'create' || $action == 'adduserldap') print "\n"; } + // External user + print ''.$langs->trans("ExternalUser").' ?'; + print ''; + print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); + print ''; print '
'; @@ -2196,36 +2195,6 @@ if ($action == 'create' || $action == 'adduserldap') print ''; } - // Type - print ''; - print ''; - // Gender print ''; print '\n"; } + // External user ? + print ''; + print ''; print '
'.$langs->trans("Type").''; - if ($user->id == $object->id || !$user->admin) - { - // Read mode - $type = $langs->trans("Internal"); - if ($object->socid) $type = $langs->trans("External"); - print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } else { - // Select mode - $type = 0; - if ($object->contact_id) $type = $object->contact_id; - - if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact - print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); - print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact - print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set - print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } else { // $object->socid is not > 0 here - print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set - print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); - } - } - print '
'.$langs->trans("Gender").''; @@ -2306,6 +2275,35 @@ if ($action == 'create' || $action == 'adduserldap') print "
'.$langs->trans("ExternalUser").' ?'; + if ($user->id == $object->id || !$user->admin) + { + // Read mode + $type = $langs->trans("Internal"); + if ($object->socid) $type = $langs->trans("External"); + print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } else { + // Select mode + $type = 0; + if ($object->contact_id) $type = $object->contact_id; + + if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact + print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } else { // $object->socid is not > 0 here + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + } + } + print '

'; From 2457d07d1a327edfdd8c645968d8effb306f7d05 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:29:51 +0100 Subject: [PATCH 44/73] Fix permission on creation of leave requests --- htdocs/holiday/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 11d3c70c4a8..3de5c2a5e19 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -148,11 +148,11 @@ if (empty($reshook)) $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->create)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); } else { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { if (!in_array($fuserid, $childids)) { $error++; setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); From 936699786a208dd3d9d2ae5d1d8cc973ce454644 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:44:20 +0100 Subject: [PATCH 45/73] Fix translation --- htdocs/holiday/card.php | 2 +- htdocs/hrm/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 3de5c2a5e19..3899990b425 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -973,7 +973,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; - $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ?price2num($nb_type) : 0).'
'; + $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ? price2num($nb_type) : 0).'
'; //$out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; } print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 3ec2a3b898f..f0bbb442acc 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -153,7 +153,7 @@ if (!empty($conf->holiday->enabled)) { $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; - $out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; + $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ? price2num($nb_type) : 0).'
'; } print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; print $out; From e18035c0fc2541e43a51a596b1a4697346a1eadc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:46:33 +0100 Subject: [PATCH 46/73] Fix bad permission on module holiday --- htdocs/holiday/card.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 3899990b425..500d678d357 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -148,7 +148,7 @@ if (empty($reshook)) $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->create)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); } else { @@ -962,8 +962,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print ''."\n"; print ''."\n"; - if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { + if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) { print dol_get_fiche_head('', '', '', -1); $out = ''; @@ -980,8 +979,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print $out; print dol_get_fiche_end(); - } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) - { + } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; } From cc44ce7dddf31627c9ef52191799ff8f8f85df62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:35:38 +0100 Subject: [PATCH 47/73] Fix warning --- .../core/triggers/interface_50_modTicket_TicketEmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index f6157c38edc..7bb8988e18e 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -247,7 +247,7 @@ class InterfaceTicketEmail extends DolibarrTriggers $message_customer .= '

'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$url_public_ticket.'

'; $message_customer .= '

'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'

'; - $from = $conf->global->MAIN_INFO_SOCIETE_NOM.'<'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; + $from = (empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? '' : $conf->global->MAIN_INFO_SOCIETE_NOM.' ').'<'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; $replyto = $from; $trackid = 'tic'.$object->id; From e77413e1e4640286d9c34015839f8c18e5281c91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:36:37 +0100 Subject: [PATCH 48/73] Fix warning --- htdocs/core/class/CMailFile.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b2149cd187f..faf0a294dfe 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -242,6 +242,7 @@ class CMailFile { $this->html = $msg; + $findimg = 0; if (!empty($conf->global->MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS)) { $findimg = $this->findHtmlImages($dolibarr_main_data_root.'/medias'); From 3fb63e6a4b8846eb8a4353efccdbfd827cfc290b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:51:22 +0100 Subject: [PATCH 49/73] Look and feel v13 --- htdocs/admin/limits.php | 12 ++- htdocs/core/lib/admin.lib.php | 37 +++++---- htdocs/core/menus/standard/empty.php | 112 +++++++++------------------ 3 files changed, 64 insertions(+), 97 deletions(-) diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 43c4cc84776..34da6f7d34e 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -100,9 +100,12 @@ if ($action == 'update') $form = new Form($db); -llxHeader(); +$title = $langs->trans("LimitsSetup"); +$help_url = ''; -print load_fiche_titre($langs->trans("LimitsSetup"), '', 'title_setup'); +llxHeader('', $title, $help_url); + +print load_fiche_titre($title, '', 'title_setup'); $aCurrencies = array($conf->currency); // Default currency always first position @@ -125,7 +128,8 @@ if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY if (!empty($aCurrencies) && count($aCurrencies) > 1) { $head = multicurrencyLimitPrepareHead($aCurrencies); - print dol_get_fiche_head($head, $currencycode, '', -1, "multicurrency"); + + print dol_get_fiche_head($head, $currencycode, '', -1, ''); } } @@ -172,6 +176,7 @@ if ($action == 'edit') print ''; print '
'; } else { + print '
'; print '
'; print ''; @@ -191,6 +196,7 @@ if ($action == 'edit') print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : $conf->global->MAIN_ROUNDING_RULE_TOT).'
'; + print ''; print '
'; print ''.$langs->trans("Modify").''; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index b8cdf8cd085..704a4496d03 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -924,30 +924,33 @@ function purgeSessions($mysessionid) dol_syslog('admin.lib:purgeSessions mysessionid='.$mysessionid.' sessPath='.$sessPath); $error = 0; - $dh = @opendir(dol_osencode($sessPath)); - while (($file = @readdir($dh)) !== false) { - if ($file != "." && $file != "..") { - $fullpath = $sessPath.$file; - if (!@is_dir($fullpath)) { - $sessValues = file_get_contents($fullpath); // get raw session data - if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity - preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name - $tmp = explode('_', $file); - $idsess = $tmp[1]; - // We remove session if it's not ourself - if ($idsess != $mysessionid) { - $res = @unlink($fullpath); - if (!$res) { - $error++; + $dh = @opendir(dol_osencode($sessPath)); + if ($dh) { + while (($file = @readdir($dh)) !== false) { + if ($file != "." && $file != "..") { + $fullpath = $sessPath.$file; + if (!@is_dir($fullpath)) { + $sessValues = file_get_contents($fullpath); // get raw session data + + if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session + preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity + preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name + $tmp = explode('_', $file); + $idsess = $tmp[1]; + // We remove session if it's not ourself + if ($idsess != $mysessionid) { + $res = @unlink($fullpath); + if (!$res) { + $error++; + } } } } } } + @closedir($dh); } - @closedir($dh); if (!$error) { return 1; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index b3151e15748..213cd14e9b0 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -348,14 +348,29 @@ class MenuManager // ***** END ***** + $menu_array_before = array(); + $menu_array_after = array(); + // do not change code after this + $menu_array = $this->menu->liste; + if (is_array($menu_array_before)) { + $menu_array = array_merge($menu_array_before, $menu_array); + } + if (is_array($menu_array_after)) { + $menu_array = array_merge($menu_array, $menu_array_after); + } + //var_dump($menu_array);exit; + if (!is_array($menu_array)) { + return 0; + } + if (empty($noout)) { $alt = 0; $altok = 0; $blockvmenuopened = false; - $num = count($this->menu->liste); + $num = count($menu_array); for ($i = 0; $i < $num; $i++) { $alt++; - if (empty($this->menu->liste[$i]['level'])) { + if (empty($menu_array[$i]['level'])) { $altok++; $blockvmenuopened = true; $lastopened = true; @@ -375,55 +390,55 @@ class MenuManager // Add tabulation $tabstring = ''; - $tabul = ($this->menu->liste[$i]['level'] - 1); + $tabul = ($menu_array[$i]['level'] - 1); if ($tabul > 0) { for ($j = 0; $j < $tabul; $j++) { $tabstring .= '   '; } } - if ($this->menu->liste[$i]['level'] == 0) { - if ($this->menu->liste[$i]['enabled']) { - print ''."\n"; + if ($menu_array[$i]['level'] == 0) { + if ($menu_array[$i]['enabled']) { + print ''."\n"; } else { - print ''."\n"; + print ''."\n"; } print ''."\n"; } - if ($this->menu->liste[$i]['level'] > 0) { + if ($menu_array[$i]['level'] > 0) { $cssmenu = ''; - if ($this->menu->liste[$i]['url']) { - $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $this->menu->liste[$i]['url'])); + if ($menu_array[$i]['url']) { + $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url'])); } print ''."\n"; } // If next is a new block or end - if (empty($this->menu->liste[$i + 1]['level'])) { + if (empty($menu_array[$i + 1]['level'])) { print ''."\n"; print "
\n"; } @@ -436,66 +451,9 @@ class MenuManager if ($mode == 'jmobile') { $this->leftmenu = clone $this->menu; - unset($this->menu->liste); + unset($menu_array); } } - /* - if ($mode == 'jmobile') - { - $substitarray = getCommonSubstitutionArray($langs, 0, null, null); - - foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' - { - print '
    '; - print '
  • '; - - $val['url'] = make_substitutions($val['url'], $substitarray); - - if ($val['enabled'] == 1) - { - $relurl=dol_buildpath($val['url'],1); - - print ''.$val['titre'].''."\n"; - // Search submenu fot this entry - $tmpmainmenu=$val['mainmenu']; - $tmpleftmenu='all'; - //$submenu=new Menu(); - //$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu, null, $this->type_user); - //$nexturl=dol_buildpath($submenu->liste[0]['url'],1); - $submenu=$this->leftmenu; - - $canonrelurl=preg_replace('/\?.*$/','',$relurl); - $canonnexturl=preg_replace('/\?.*$/','',$nexturl); - //var_dump($canonrelurl); - //var_dump($canonnexturl); - print '
      '; - if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools'))) - { - // We add sub entry - print '
    • '.$langs->trans("MainArea").'-'.$val['titre'].'
    • '."\n"; - } - foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' - { - $val2['url'] = make_substitutions($val2['url'], $substitarray); - - $relurl2=dol_buildpath($val2['url'],1); - //var_dump($val2); - print '
    • '.$val2['titre'].'
    • '."\n"; - } - //var_dump($submenu); - print '
    '; - } - if ($val['enabled'] == 2) - { - print ''.$val['titre'].''; - } - print '
  • '; - print '
'."\n"; - - break; // Only first menu entry (so home) - } - } - */ unset($this->menu); return $res; From ee0e8826076abd26aef3c7cd08878e9c6fe78894 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 16:15:47 +0100 Subject: [PATCH 50/73] Clear code --- htdocs/core/menus/standard/empty.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 213cd14e9b0..1ab7778bb01 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -32,10 +32,13 @@ class MenuManager public $type_user = 0; // Put 0 for internal users, 1 for external users public $atarget = ""; // To store default target to use onto links + public $name = "empty"; public $menu; public $menu_array_after; + public $tabMenu; + /** * Constructor @@ -60,6 +63,7 @@ class MenuManager public function loadMenu($forcemainmenu = '', $forceleftmenu = '') { // Do nothing + $this->tabMenu = array(); } From 7ad5a89a16ba069f18169de57026d46e8587a211 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 16:40:20 +0100 Subject: [PATCH 51/73] FIX A service email must always be sent using the service email --- htdocs/holiday/card.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 500d678d357..4c88cdf53b3 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -403,7 +403,7 @@ if (empty($reshook)) { $object->fetch($id); - // Si brouillon et créateur + // If draft and owner of leave if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) { $object->oldcopy = dol_clone($object); @@ -430,7 +430,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_user); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -441,6 +442,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysToValidateBody")."\n"; $delayForRequest = $object->getConfCP('delayForRequest'); @@ -525,7 +527,7 @@ if (empty($reshook)) { $object->fetch($id); - // Si statut en attente de validation et valideur = utilisateur + // If status is waiting approval and approver is also user if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) { $object->oldcopy = dol_clone($object); @@ -582,7 +584,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -593,6 +596,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; $message .= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; @@ -666,7 +670,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -677,6 +682,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; $message .= GETPOST('detail_refuse', 'alpha')."\n\n"; @@ -813,7 +819,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_user_cancel); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; From 6e403e6ce0097af91ba420b2f679c6d55d3b5a52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 18:29:14 +0100 Subject: [PATCH 52/73] Fix warnings --- htdocs/comm/propal/class/propal.class.php | 12 ++++++++++-- htdocs/core/class/commonobject.class.php | 2 +- test/phpunit/PropalTest.php | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index c761f8b3321..dfbae271881 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1099,7 +1099,7 @@ class Propal extends CommonObject if ($this->id) { $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1111,7 +1111,7 @@ class Propal extends CommonObject } // Add object linked - if (!$error && $this->id && is_array($this->linked_objects) && !empty($this->linked_objects)) + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { foreach ($this->linked_objects as $origin => $tmp_origin_id) { @@ -3753,7 +3753,10 @@ class PropaleLigne extends CommonObjectLine public $product_type = Product::TYPE_PRODUCT; public $qty; + public $tva_tx; + public $vat_src_code; + public $subprice; public $remise_percent; public $fk_remise_except; @@ -3805,6 +3808,11 @@ class PropaleLigne extends CommonObjectLine * @see $product_label */ public $libelle; + /** + * @deprecated + * @see $product_label + */ + public $label; /** * Product label * @var string diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 33ac1aba696..6ecdfb93bb5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3161,7 +3161,7 @@ abstract class CommonObject $this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0; // Situations totals - if ($this->situation_cycle_ref && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE) + if (!empty($this->situation_cycle_ref) && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE) { $prev_sits = $this->get_prev_sits(); diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 068fb53b052..ea678e8df34 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -190,11 +190,11 @@ class PropalTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; - $localobject->note_private='New note private after update'; - $result=$localobject->update($user); + $localobject->note_private = 'New note private after update'; + $result = $localobject->update($user); $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; + print __METHOD__." id=".$localobject->id." result=".$result."\n"; return $localobject; } From 92b430495baaf679070c75a0fb772f514a58cab6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 19:23:40 +0100 Subject: [PATCH 53/73] Stupid composer, the package that makes you lose your time. --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9fede994525..dbc72b09bd1 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name" : "dolibarr/dolibarr", "type" : "project", + "version": "999.999.999", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "keywords" : [ "erp", @@ -35,7 +36,7 @@ "nnnick/chartjs" : "^2.9", "stripe/stripe-php" : "6.43.1", "maximebf/debugbar" : "1.15.1", - "symfony/var-dumper": "3" + "symfony/var-dumper" : "3" }, "require-dev" : { "php-parallel-lint/php-parallel-lint" : "^0", @@ -59,4 +60,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} +} \ No newline at end of file From d8d5524766d8c4c68e058d6fc2ed8af319503d24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 19:51:22 +0100 Subject: [PATCH 54/73] Update security file --- SECURITY.md | 3 +-- composer.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 56e1da679ed..77307516f73 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,8 +12,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM ## Reporting a Vulnerability -To report a vulnerability, please send an email to security@dolibarr.org -In most cases, after fixing the security, we make an answer by email to say the issue has been fixed. +To report a vulnerability, please use GitHub security advisory (alternatively send an email to security@dolibarr.org) ## Hunting vulnerabilities on Dolibarr diff --git a/composer.json b/composer.json index dbc72b09bd1..bd81e101cfc 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name" : "dolibarr/dolibarr", "type" : "project", - "version": "999.999.999", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "keywords" : [ "erp", From 078e395bfb91154e5f4481c4403c019c5117af81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:25:54 +0100 Subject: [PATCH 55/73] Fix gitignore --- htdocs/includes/mike42/escpos-php/.gitignore | 2 ++ htdocs/includes/mike42/escpos-php/autoload.php | 18 +++++++++--------- .../PrintConnectors/CupsPrintConnector.php | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/includes/mike42/escpos-php/.gitignore b/htdocs/includes/mike42/escpos-php/.gitignore index 8632f891ad4..e7dd4b6263a 100644 --- a/htdocs/includes/mike42/escpos-php/.gitignore +++ b/htdocs/includes/mike42/escpos-php/.gitignore @@ -14,3 +14,5 @@ vendor/ # other build files build/* *.phar +/example/ +/test/ diff --git a/htdocs/includes/mike42/escpos-php/autoload.php b/htdocs/includes/mike42/escpos-php/autoload.php index 47ed7d9e9c3..7779486b824 100644 --- a/htdocs/includes/mike42/escpos-php/autoload.php +++ b/htdocs/includes/mike42/escpos-php/autoload.php @@ -1,26 +1,26 @@ Date: Mon, 7 Dec 2020 20:33:13 +0100 Subject: [PATCH 56/73] Update lib --- htdocs/includes/symfony/var-dumper/.gitignore | 3 + .../includes/symfony/var-dumper/composer.json | 83 +++++++++---------- .../symfony/var-dumper/phpunit.xml.dist | 29 +++++++ 3 files changed, 72 insertions(+), 43 deletions(-) create mode 100644 htdocs/includes/symfony/var-dumper/.gitignore create mode 100644 htdocs/includes/symfony/var-dumper/phpunit.xml.dist diff --git a/htdocs/includes/symfony/var-dumper/.gitignore b/htdocs/includes/symfony/var-dumper/.gitignore new file mode 100644 index 00000000000..5414c2c655e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/.gitignore @@ -0,0 +1,3 @@ +composer.lock +phpunit.xml +vendor/ diff --git a/htdocs/includes/symfony/var-dumper/composer.json b/htdocs/includes/symfony/var-dumper/composer.json index a90729b6bbe..05955f69430 100644 --- a/htdocs/includes/symfony/var-dumper/composer.json +++ b/htdocs/includes/symfony/var-dumper/composer.json @@ -1,44 +1,41 @@ { - "name" : "symfony/var-dumper", - "type" : "library", - "description" : "Symfony mechanism for exploring and dumping PHP variables", - "keywords" : [ - "dump", - "debug" - ], - "homepage" : "https://symfony.com", - "license" : "MIT", - "authors" : [{ - "name" : "Nicolas Grekas", - "email" : "p@tchwork.com" - }, { - "name" : "Symfony Community", - "homepage" : "https://symfony.com/contributors" - } - ], - "require" : { - "php" : ">=5.5.9", - "symfony/polyfill-mbstring" : "~1.0" - }, - "require-dev" : { - "twig/twig" : "~1.20|~2.0" - }, - "suggest" : {}, - "autoload" : { - "files" : [ - "Resources/functions/dump.php" - ], - "psr-4" : { - "Symfony\\Component\\VarDumper\\" : "" - }, - "exclude-from-classmap" : [ - "/Tests/" - ] - }, - "minimum-stability" : "dev", - "extra" : { - "branch-alias" : { - "dev-master" : "3.0-dev" - } - } -} \ No newline at end of file + "name": "symfony/var-dumper", + "type": "library", + "description": "Symfony mechanism for exploring and dumping PHP variables", + "keywords": ["dump", "debug"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "autoload": { + "files": [ "Resources/functions/dump.php" ], + "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/phpunit.xml.dist b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist new file mode 100644 index 00000000000..bb16a3a4ec0 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + From d5b009a22a53303fced917cfaab81be5e0bb1d79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:36:42 +0100 Subject: [PATCH 57/73] Add .gitignore --- htdocs/includes/tecnickcom/tcpdf/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 htdocs/includes/tecnickcom/tcpdf/.gitignore diff --git a/htdocs/includes/tecnickcom/tcpdf/.gitignore b/htdocs/includes/tecnickcom/tcpdf/.gitignore new file mode 100644 index 00000000000..56fd659871f --- /dev/null +++ b/htdocs/includes/tecnickcom/tcpdf/.gitignore @@ -0,0 +1,2 @@ +/examples/ +/tools/ \ No newline at end of file From bb217db31e6b9abb3aa25825516943425122a0c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:38:15 +0100 Subject: [PATCH 58/73] Ad .gitignore --- htdocs/includes/restler/framework/Luracast/Restler/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 htdocs/includes/restler/framework/Luracast/Restler/.gitignore diff --git a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore new file mode 100644 index 00000000000..5fe55bc3882 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore @@ -0,0 +1 @@ +/Explorer/ From 644bac0b808285ca9093924709157d2f6141725b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:39:59 +0100 Subject: [PATCH 59/73] Removed gitignore --- htdocs/includes/restler/framework/Luracast/Restler/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 htdocs/includes/restler/framework/Luracast/Restler/.gitignore diff --git a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore deleted file mode 100644 index 5fe55bc3882..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Explorer/ From 6abf1b6ac2139fc781593d73cc92a6fa2bec0956 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:59:07 +0100 Subject: [PATCH 60/73] Error message --- htdocs/api/admin/index.php | 3 ++- htdocs/langs/en_US/errors.lang | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index b4ebb6cb30e..1d15d5b9e75 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -160,7 +160,8 @@ if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/e $url = DOL_MAIN_URL_ROOT.'/api/index.php/explorer'; print img_picto('', 'globe').' '.$url."
\n"; } else { - print $langs->trans("NotAvailableWithThisDistribution"); + $langs->load("errors"); + print info_admin($langs->trans("ErrorNotAvailableWithThisDistribution"), 0, 0, 'error'); } llxFooter(); diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 2413e6d76ba..056c9240bd0 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -250,6 +250,7 @@ ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter %s must be ErrorLoginDateValidity=Error, this login is outside the validity date range ErrorValueLength=Length of field '%s' must be higher than '%s' ErrorReservedKeyword=The word '%s' is a reserved keyword +ErrorNotAvailableWithThisDistribution=Not available with this distribution # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. From f738c875d8257a63917c5cae9dc3062e6fa04973 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:10:10 +0100 Subject: [PATCH 61/73] Update gitignore --- composer.lock | 4 +- htdocs/includes/nnnick/chartjs/.gitignore | 7 ++- htdocs/includes/nnnick/chartjs/composer.json | 49 ++++++++++---------- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/composer.lock b/composer.lock index 5afe0ca34f2..93226d8f2c8 100644 --- a/composer.lock +++ b/composer.lock @@ -217,7 +217,7 @@ }, { "name": "nnnick/chartjs", - "version": "v2.9.3", + "version": "v2.9.4", "source": { "type": "git", "url": "https://github.com/chartjs/Chart.js.git", @@ -315,7 +315,7 @@ "time": "2015-05-01T07:00:55+00:00" }, { - "name": "psr/log", + "name": "Psr/log", "version": "1.1.3", "source": { "type": "git", diff --git a/htdocs/includes/nnnick/chartjs/.gitignore b/htdocs/includes/nnnick/chartjs/.gitignore index 6a066b92f38..8a4a4294d61 100644 --- a/htdocs/includes/nnnick/chartjs/.gitignore +++ b/htdocs/includes/nnnick/chartjs/.gitignore @@ -1,8 +1,13 @@ +.github /_book /coverage /custom /dist -/docs/index.md +/docs +/samples +/scripts +/src +/test /gh-pages /jsdoc /node_modules diff --git a/htdocs/includes/nnnick/chartjs/composer.json b/htdocs/includes/nnnick/chartjs/composer.json index b332bb0f595..9df2b22fc50 100644 --- a/htdocs/includes/nnnick/chartjs/composer.json +++ b/htdocs/includes/nnnick/chartjs/composer.json @@ -1,26 +1,25 @@ { - "name": "nnnick/chartjs", - "type": "library", - "description": "Simple HTML5 charts using the canvas element.", - "keywords": [ - "chart", - "js" - ], - "homepage": "https://www.chartjs.org/", - "license": "MIT", - "authors": [ - { - "name": "NICK DOWNIE", - "email": "hello@nickdownie.com" - } - ], - "require": { - "php": ">=5.3.3" - }, - "minimum-stability": "stable", - "extra": { - "branch-alias": { - "release/2.0": "v2.0-dev" - } - } -} + "name" : "nnnick/chartjs", + "type" : "library", + "description" : "Simple HTML5 charts using the canvas element.", + "keywords" : [ + "chart", + "js" + ], + "homepage" : "https://www.chartjs.org/", + "license" : "MIT", + "authors" : [{ + "name" : "NICK DOWNIE", + "email" : "hello@nickdownie.com" + } + ], + "require" : { + "php" : ">=5.3.3" + }, + "minimum-stability" : "stable", + "extra" : { + "branch-alias" : { + "release/2.0" : "v2.0-dev" + } + } +} \ No newline at end of file From 4bc2e791a8b29aa7ac858a479b316747db41953e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:44:19 +0100 Subject: [PATCH 62/73] Update .gitignore --- htdocs/includes/mike42/escpos-php/.gitignore | 6 +----- package.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/includes/mike42/escpos-php/.gitignore b/htdocs/includes/mike42/escpos-php/.gitignore index e7dd4b6263a..2b6e1a8d17c 100644 --- a/htdocs/includes/mike42/escpos-php/.gitignore +++ b/htdocs/includes/mike42/escpos-php/.gitignore @@ -4,9 +4,7 @@ .buildpath # doxygen files -doc/html -doc/latex -doc/doxygen_sqlite3.db +doc # composer files vendor/ @@ -14,5 +12,3 @@ vendor/ # other build files build/* *.phar -/example/ -/test/ diff --git a/package.json b/package.json index 01d3a4300ee..56f8ced1d4b 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/setup.js --require test/acceptance/stepDefinitions -f node_modules/cucumber-pretty" }, "dependencies": { + "chart.js": "^2.9.4", "cucumber-pretty": "^6.0.0", "node-fetch": "^2.6.1" } From 796fe5cd8af0f23b9dc556ba92e5cd9d7c67cb0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:47:57 +0100 Subject: [PATCH 63/73] Update .gitignore --- htdocs/includes/mobiledetect/mobiledetectlib/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/.gitignore diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore b/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore new file mode 100644 index 00000000000..2f88269126d --- /dev/null +++ b/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore @@ -0,0 +1 @@ +/docs From 85bb3fa909b4e18faecca48ce7d7f1e9c05c0aad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:57:29 +0100 Subject: [PATCH 64/73] Update chart.js to 2.9.4 --- COPYRIGHT | 2 +- build/makepack-dolibarr.pl | 31 +- composer.json | 2 +- composer.lock | 261 +- htdocs/includes/mike42/escpos-php/doc/FAQ.md | 142 - .../includes/mike42/escpos-php/doc/Makefile | 20 - .../mike42/escpos-php/doc/escpos.doxyfile | 2352 ----------------- .../mobiledetectlib/docs/CONTRIBUTING.md | 48 - .../mobiledetectlib/docs/HISTORY.md | 11 - .../mobiledetectlib/docs/ISSUE_TEMPLATE.md | 15 - .../mobiledetectlib/docs/KNOWN_LIMITATIONS.md | 12 - htdocs/includes/nnnick/chartjs/.travis.yml | 4 +- htdocs/includes/nnnick/chartjs/composer.json | 49 +- .../nnnick/chartjs/dist/Chart.bundle.js | 45 +- .../nnnick/chartjs/dist/Chart.bundle.min.js | 6 +- htdocs/includes/nnnick/chartjs/dist/Chart.js | 45 +- .../includes/nnnick/chartjs/dist/Chart.min.js | 6 +- .../includes/nnnick/chartjs/package-lock.json | 2 +- htdocs/includes/nnnick/chartjs/package.json | 2 +- 19 files changed, 180 insertions(+), 2875 deletions(-) delete mode 100644 htdocs/includes/mike42/escpos-php/doc/FAQ.md delete mode 100644 htdocs/includes/mike42/escpos-php/doc/Makefile delete mode 100644 htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/HISTORY.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md diff --git a/COPYRIGHT b/COPYRIGHT index d43f4d506f1..adf7d38c04b 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -39,7 +39,7 @@ TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes JS libraries: Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea. -ChartJS 2.9.3 MIT License Yes JS library for graph +ChartJS 2.9.4 MIT License Yes JS library for graph jQuery 3.5.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 314aaff7177..17a935f6234 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -581,23 +581,36 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; + # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`; $ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`; $ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`; + + # Removed files installed by the awful composer $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest - + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/docs`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/.github`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/docs`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/samples`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`; @@ -612,21 +625,17 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`; - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; - + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`; - - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; } # Build package for each target diff --git a/composer.json b/composer.json index bd81e101cfc..a943fbe0aa3 100644 --- a/composer.json +++ b/composer.json @@ -59,4 +59,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 93226d8f2c8..e0462435f5e 100644 --- a/composer.lock +++ b/composer.lock @@ -6,6 +6,53 @@ ], "content-hash": "1dbd2d05cc0836acfca5988f29005cf2", "packages": [ + { + "name": "Psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, { "name": "ckeditor/ckeditor", "version": "4.12.1", @@ -221,12 +268,12 @@ "source": { "type": "git", "url": "https://github.com/chartjs/Chart.js.git", - "reference": "06f73dc3590084b2c464bf08189c7aee2b6b92d2" + "reference": "9bd4cf82fda9f50a5fb50b72843e06ab88124278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/06f73dc3590084b2c464bf08189c7aee2b6b92d2", - "reference": "06f73dc3590084b2c464bf08189c7aee2b6b92d2", + "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/9bd4cf82fda9f50a5fb50b72843e06ab88124278", + "reference": "9bd4cf82fda9f50a5fb50b72843e06ab88124278", "shasum": "" }, "require": { @@ -254,7 +301,11 @@ "JS", "chart" ], - "time": "2019-11-14T18:37:30+00:00" + "support": { + "issues": "https://github.com/chartjs/Chart.js/issues", + "source": "https://github.com/chartjs/Chart.js/tree/v2.9.4" + }, + "time": "2020-10-19T12:22:11+00:00" }, { "name": "phpoffice/phpexcel", @@ -314,53 +365,6 @@ "abandoned": "phpoffice/phpspreadsheet", "time": "2015-05-01T07:00:55+00:00" }, - { - "name": "Psr/log", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2020-03-23T09:12:05+00:00" - }, { "name": "restler/framework", "version": "3.0.0-RC6", @@ -2037,159 +2041,6 @@ ], "time": "2019-08-06T08:03:45+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "shasum": "" - }, - "require": { - "php": ">=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, { "name": "symfony/yaml", "version": "v3.4.32", @@ -2312,5 +2163,5 @@ "ext-curl": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/htdocs/includes/mike42/escpos-php/doc/FAQ.md b/htdocs/includes/mike42/escpos-php/doc/FAQ.md deleted file mode 100644 index 6b7a6247bca..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/FAQ.md +++ /dev/null @@ -1,142 +0,0 @@ -# Frequently Asked Questions (FAQ) - -## Can I print to File Format X with this? - -If you are trying to generate XPS, PDF or DOCX or HTML files from PHP, then you are most likely in the wrong place. - -The purpose of this driver it to generate binary ESC/POS code, which is understood by many embedded thermal receipt and impact printers. - -## I have Printer X. Can I use this driver? - -If the printer understands ESC/POS, and you know how to get raw binary data to it, then yes. Otherwise, no. - -The [list of printers that are known to work](https://github.com/mike42/escpos-php/blob/development/README.md#printers) is crowd-sourced. We appreciate it when developers try out the driver, then [file information on the bug tracker](https://github.com/mike42/escpos-php/issues/new) with some information about which features worked on their model of printer. - -To see how well your printer works, first check that it supports ESC/POS, then begin by attempting to send the text "Hello World" to your printer on the command-line, from the computer that will run PHP. - -Once you solve this, [try to do the same from PHP](https://github.com/mike42/escpos-php/blob/development/README.md#basic-usage) using the default profile. Further details are in the [README](https://github.com/mike42/escpos-php/blob/development/README.md) file. - -## Can you add support for Printer X? - -Features vary between printers, so we collaborate on an ESC/POS printer compatibility database to collect known differences: [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db). - -If you encounter garbage output when you try to print images or special characters, then please submit a test page and a link to vendor documentation to the `escpos-printer-db` project, so that support can be improved for future versions. - -## I have a printer that does not understand ESC/POS. Can I use this driver? - -No. The purpose of this driver it to generate binary ESC/POS code. If your printer doesn't understand that, then this code wont be much use to you. - -Some printers do have an emulation mode for ESC/POS. The vendor docs will tell if this is the case, and how to enable it. - -## Why do I get this error when I try to print? - -Start by testing that you can send text to your printer outside of escpos-php. The examples linked to in the README are commented with some commands to get you started. - -Generally, initial setup problems seem to have one of these causes: - -1. You are writing to the wrong place. Writing to `LPT1` does not output to parallel port on Linux, and `/dev/ttyS0` is not a serial printer on Windows. -2. The printer has not been set up to accept printing the way you expect. This means permissions on Linux, network printers being configured, and shared printers having user accounts and firewalls set up correctly on the print server. -3. Your printer actually doesn't work (rare but possible). - -To be clear, these are not escpos-php issues: No amount of PHP code can set up your printer for you. Instead, the driver relies on developers determining how their setup is going to work before using a connector to transport data to their printer. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. You can try to use a PrintConnector now, based on your operating system and printer interface. A table is located in the README to help you select the right one. - -The connectors are- - -- `FilePrintConnector` and `NetworkPrintConnector` directly use files or network sockets. -- `WindowsPrintConnector` and `CupsPrintConnector` tie in with Windows and Unix system printing. -- `DummyPrintConnector` does not connect to a real printer, and can be used to save ESC/POS receipts to a database, for example. - -At this point, you might find that the way you would like to print is not supported by escpos-php. You can post your printing command as a feature request on the issue tracker. - -Lastly, you may run in to the final common trap: - -4. Your PHP is not running with the same sort of permissions as your login account. Again, no amount of PHP code can fix this. For example, on LAMP, your `www-data` user needs to be in the `lp` group, while on WAMP, `Local Service` account may run in to problems. SELinux and firewalls are also worth a look. - -When printing fails, you can expect a PHP Exception that explains what went wrong. They are all clues: - -- `Warning: copy(\\pc\printer): failed to open stream: Permission denied` -- `/dev/usb/lp0: Permission denied` -- `User name or password is incorrect` - -Ensure that while you are developing, you configure PHP to show error messages, so that you can see these problems. - -Please file a bug if you think that there is a specific situation which escpos-php could provide better error messages for. - -## Can I print over the network? - -Certainly, as long as your printer is available over the network. - -- `NetworkPrintConnector` will speak directly to an Ethernet-connected printer on port 9100. - -For USB or Serial printers, you need to install the printer on a computer and then share it, so that it becomes network-accessible. - -- `WindowsPrintConnector` will connect to Windows shared printers from Windows or Linux (Linux users will need Samba). -- `CupsPrintConnector` will connect to CUPS-shared printers from Linux or Mac. - -Always start by testing your shared printer setup outside of escpos-php. The examples linked to in the README are commented with some example commands to get you started. Typically, networks, firewalls and permissions need to be set up. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. - -If you have any issues at this stage, please ask on the issue tracker, and include the commands that you used to verify your setup. - -## Can I print from my server on the Internet? - -Since PHP is a server-side language, escpos-php is a server-side print library. The driver is able to transport data between a server and a printer in a few different ways, all of them server-side. For example, you may print to a USB printer *connected to the server running PHP*, or an Ethernet printer *on a network accessible to the server*. - -Many developers dream of having an application that is hosted on the public Internet, with POS terminals accessing it, and printing via a web browser. Because the webserver cannot see the printer in this sort of setup, a server-side print driver is not much use. - -Because of this, there are no cut-and-paste recipes available, but here are two top-level approaches you could take: - -1. Architect your application so that the server can see your printer -2. Use an application which runs client-side to deliver print data instead - -### Option 1: Allow the server to print - -Server-side printing is viable if the server can get to the printer. Here are some ways it could work: - -- Run your server on the LAN instead, and read the section above about printing over the network -- Set up a VPN so that your cloud-hosted server can also access the LAN -- Expose the printer via some other secure tunnel to the server, via SSH or TLS - -Please do your own research to determine how these may apply to your setup- the escpos-php issue tracker is not a place where you should be requesting network support. - -### Option 2: Use client software to print - -If you aren't able to set up some network infrastructure to implement the above, then you cannot use a server-side print driver. - -Here are some browser-based printing tools which you may like to consider instead. - -- Use system printing with a vendor driver, and some good `@media print` CSS -- [Chrome Raw Print](https://github.com/receipt-print-hq/chrome-raw-print) app -- [qz](https://qz.io/) -- [ePOS-Device SDK for JavaScript](https://reference.epson-biz.com/modules/ref_epos_device_js_en/index.php?content_id=139). Requires network interface card that supports ePOS (UB-E04/R04) - -Please direct queries about client-side printing products to the appropriate project. - -## Why is image printing slow? - -Three things tend to slow down the image processing: - -1. Slow PHP code -2. Data link -3. The printer itself - -First, ensure you have the Imagick plugin loaded. The driver will avoid a slower image processing implementation once you've got it. - -Next, connect over a faster interface. Serial printers have a low bit-rate, and the printer spends a lot of time waiting for data. If you have USB or Ethernet, then use it (note: storing graphics to the printer memory is not currently implemented). - -Lastly, the printer will go faster if you use less pixels. Since images are two-dimensional, scaling down by 50% removes 75% of the pixels. The driver can then print at a half the density, so that your lower resolution image appears the same size when printed. - -## How can I get the status of the printer? - -This feature is not implemented, but a solution for some Epson printers is planned. - -Only `FilePrintConnector` or `NetworkPrintConnector` will support reading from the printer, ensure that you migrate to those if you would like these features. - -## How do I produce this complex layout? - -ESC/POS "page mode" is not currently supported, which would allow some printers to render some more complex layouts natively - -Since the output is raster anyway, it is suggested that you render your output to an image and print that instead. The driver supports PDF printing via Imagick, and an example that uses `wkhtmltoimage` is available in the repository. diff --git a/htdocs/includes/mike42/escpos-php/doc/Makefile b/htdocs/includes/mike42/escpos-php/doc/Makefile deleted file mode 100644 index 4e01c2ac0a1..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -html: escpos.doxyfile - # Compile - doxygen escpos.doxyfile - # Filter out warnings on README.md- doxygen cannot handle image links that - # are used there: [![Caption](https://example.com/target)](https://example.com/image) - sed -i '/README.md\:/d' warnings.log - # Show warnings log - cat warnings.log - # Return failure if there were any doc warnings - [ ! -s warnings.log ] - -latex: html - # Do nothing - -xml: html - xsltproc xml/combine.xslt xml/index.xml > all.xml - -clean: - rm --preserve-root -Rf html latex xml doxygen_sqlite3.db all.xml warnings.log - diff --git a/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile b/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile deleted file mode 100644 index 0c48656e15b..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile +++ /dev/null @@ -1,2352 +0,0 @@ -# Doxyfile 1.8.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "escpos-php" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = ../example/resources/escpos-php-small.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = warnings.log - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ../src ../README.md ./ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.php *.md - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = ../README.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /