diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 7c43ab24aef..6dbf39bde26 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -194,22 +194,6 @@ tools: - 'test/*' - 'htdocs/includes/*' paths: { } - - php_changetracking: - enabled: false - bug_patterns: - - '\bfix(?:es|ed)?\b' - feature_patterns: - - '\badd(?:s|ed)?\b' - - '\bimplement(?:s|ed)?\b' - filter: - excluded_paths: - - 'build/*' - - 'dev/*' - - 'doc/*' - - 'test/*' - - 'htdocs/includes/*' - paths: { } # Coding-Style / Bug Detection js_hint: diff --git a/README.md b/README.md index 3f329c678a7..f611f333e6a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: - [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp) -- DoliDeb for Debian or Ubuntu +- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia Releases can be downloaded from [official website](https://www.dolibarr.org/). diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index f8219fc7119..ad26c7f0bdc 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -67,19 +67,11 @@ - + - - - @@ -99,19 +91,33 @@ + + + + 0 - - + + + @@ -127,7 +133,7 @@ - + @@ -181,6 +187,13 @@ + + + + + @@ -190,13 +203,10 @@ - - 0 - - - 0 - - + + + + 0 @@ -208,7 +218,6 @@ - 0 @@ -220,23 +229,16 @@ + - - - - - - 0 - + - - 0 - + 0 @@ -245,67 +247,38 @@ 0 - 0 - 0 - 0 - - - - - - 5 - - - - + 0 - 0 - - - - 0 - + - 0 + + + + 0 @@ -342,6 +315,7 @@ 0 + 0 diff --git a/doc/images/background_dolibarr.jpg b/doc/images/background_dolibarr.jpg new file mode 100644 index 00000000000..6c4cc11460d Binary files /dev/null and b/doc/images/background_dolibarr.jpg differ diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 68ab91c4638..1b088f0c2b9 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -122,6 +122,10 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); + $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 97b09861a42..ba92aa1ec21 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -34,10 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Noti $langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails')); // Security check -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); +$error = 0; /* @@ -45,27 +47,48 @@ $action = GETPOST('action', 'aZ09'); */ // Action to update or add a constant -if ($action == 'update' || $action == 'add') +if ($action == 'settemplates') { - $constlineid = GETPOST('rowid', 'int'); - $constname = GETPOST('constname', 'alpha'); + $db->begin(); - $constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue')); - $consttype = (GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype')); - $constnote = (GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote')); + if (!$error && is_array($_POST)) + { + $reg = array(); + foreach ($_POST as $key => $val) + { + if (!preg_match('/^constvalue_(.*)_TEMPLATE/', $key, $reg)) continue; - $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype]; + $triggername = $reg[1]; + $constvalue = GETPOST($key, 'alpha'); + $consttype = 'emailtemplate:xxx'; + $tmparray=explode(':', $constvalue); + if (! empty($tmparray[0]) && ! empty($tmparray[1])) { + $constvalue = $tmparray[0]; + $consttype = 'emailtemplate:'.$tmparray[1]; + //var_dump($constvalue); + //var_dump($consttype); + $res = dolibarr_set_const($db, $triggername.'_TEMPLATE', $constvalue, $consttype, 0, '', $conf->entity); + if ($res < 0) { + $error++; + break; + } + } else { + $res = dolibarr_del_const($db, $triggername.'_TEMPLATE', $conf->entity); + } + } + } - $res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity); - - if (!$res > 0) $error++; if (!$error) { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -74,12 +97,31 @@ if ($action == 'setvalue' && $user->admin) { $db->begin(); - $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", $_POST["email_from"], 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "none"), 'chaine', 0, '', $conf->entity); if ($result < 0) $error++; + + if (!$error) + { + $db->commit(); + + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +if ($action == 'setfixednotif' && $user->admin) +{ + $db->begin(); + if (!$error && is_array($_POST)) { - //var_dump($_POST); $reg = array(); foreach ($_POST as $key => $val) { @@ -101,7 +143,7 @@ if ($action == 'setvalue' && $user->admin) } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) { - // Add a new entry + // Add a new entry $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); $newval = GETPOST($shortkey.'_key'); } @@ -168,9 +210,18 @@ print ''; print ''; print ''; +print '
'; + +print ''; + + print '

'; +print '
'; +print ''; +print ''; + // Notification per contacts $title = $langs->trans("ListOfNotificationsPerUser"); if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact"); @@ -211,7 +262,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } $helptext = ''; - form_constantes($constantes, 0, $helptext); + form_constantes($constantes, 2, $helptext); } else { print ''; print ''; @@ -248,14 +299,18 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print '
'; } -print '
'; -print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; -if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; +print '
'; + +print ''; + -print '
'; print '

'; +print '
'; +print ''; +print ''; + print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', ''); print ''; @@ -333,6 +388,12 @@ foreach ($listofnotifiedevents as $notifiedevent) } print '
'; +print '
'; +print '* '.$langs->trans("GoOntoUserCardToAddMore").'
'; +if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'
'; + +print '
'; + print '
'; print '
'; diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 866de6a53d2..339ddfd2ad6 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -18,7 +18,7 @@ // Create the autoloader for Luracast require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; -call_user_func(function() { +call_user_func(function () { $loader = Luracast\Restler\AutoLoader::instance(); spl_autoload_register($loader); return $loader; diff --git a/htdocs/api/index.php b/htdocs/api/index.php index d27bd39e966..c5edbc74d66 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -44,7 +44,7 @@ if (!$res) die("Include of main fails"); require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; -call_user_func(function() { +call_user_func(function () { $loader = Luracast\Restler\AutoLoader::instance(); spl_autoload_register($loader); return $loader; diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index a9ed7ee3a00..c2c18dae6e5 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -979,7 +979,6 @@ class BOM extends CommonObject * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index eaefdfb6573..457a5986dea 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -556,6 +556,12 @@ foreach ($accounts as $key=>$type) } // Extra fields + if (is_array($objecttmp->array_options)) { + $obj = new stdClass(); + foreach ($objecttmp->array_options as $k => $v) { + $obj->$k = $v; + } + } include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ed773b038bb..c5a3d60f99c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -297,7 +297,15 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -if ($massaction == 'withdrawrequest') +if ($massaction == 'makepayment'){ + $arrayofselected=is_array($toselect)?$toselect:array(); + + $loc = dol_buildpath('/compta/paiement.php', 2).'?action=create&facids='.implode(',', $arrayofselected); + + header('Location: '.$loc); + exit; +} +elseif ($massaction == 'withdrawrequest') { $langs->load("withdrawals"); @@ -657,6 +665,7 @@ if ($resql) 'generate_doc'=>$langs->trans("ReGeneratePDF"), 'builddoc'=>$langs->trans("PDFMerge"), 'presend'=>$langs->trans("SendByMail"), + //'makepayment'=>$langs->trans("InvoicePaymentsLimits"), TODO Blank page when using this ); if ($conf->prelevement->enabled) { $langs->load("withdrawals"); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3c64b627a5c..21d46fb2974 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -521,7 +521,9 @@ if (empty($reshook)) } $desc = $prod->description; - $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; + else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + $fk_unit = $prod->fk_unit; } else diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 1f3a9fa5b99..2a7c9c0d91a 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -360,7 +360,7 @@ if ($result) $obj = $db->fetch_object($result); print ''; - print ''; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid); $staticcontrat->id = $obj->cid; print $staticcontrat->getNomUrl(1, 16); @@ -425,7 +425,7 @@ if ($resql) $obj = $db->fetch_object($resql); print ''; - print ''; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); @@ -506,7 +506,7 @@ if ($resql) print ''; - print ''; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); @@ -586,7 +586,7 @@ if ($resql) print ''; - print ''; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 70ab37c0380..4b163480035 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014-2019 Juanjo Menent @@ -612,9 +612,11 @@ while ($i < min($num, $limit)) } print ''; + + // Ref if (!empty($arrayfields['c.ref']['checked'])) { - print ''; + print ''; print $contracttmp->getNomUrl(1); if ($obj->nb_late) print img_warning($langs->trans("Late")); if (!empty($obj->note_private) || !empty($obj->note_public)) { @@ -631,6 +633,7 @@ while ($i < min($num, $limit)) print ''; } + if (!empty($arrayfields['c.ref_customer']['checked'])) { print ''.$contracttmp->getFormatedCustomerRef($obj->ref_customer).''; diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index bc5287a51f9..2f8ad4ab5f7 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -56,7 +56,7 @@ $arrayresult = array(); if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) { - $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) @@ -75,13 +75,18 @@ if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empt $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } +if (!empty($conf->mrp->enabled) && $user->rights->mrp->read && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED)) +{ + $arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); +} + if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_task', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire) @@ -103,15 +108,15 @@ if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUST if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) { - $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { - $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { - $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) @@ -122,6 +127,10 @@ if (!empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_F { $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } +if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) +{ + $arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); +} // HR if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) @@ -136,10 +145,6 @@ if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLI { $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } -if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) -{ - $arrayresult['searchintotickets'] = array('position'=>220, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); -} /* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 4bcfbafa9d8..1f5ef0a5a9e 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1295,7 +1295,7 @@ abstract class CommonDocGenerator if (!empty($fields)) { // Sort extrafields by rank - uasort($fields, function($a, $b) { + uasort($fields, function ($a, $b) { return ($a->rank > $b->rank) ? -1 : 1; }); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bc605d286c1..11e8d1369c4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1669,24 +1669,24 @@ class Form /** * Return select list of users * - * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) - * @param string $htmlname Field name in form - * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list - * @param array $exclude Array list of users id to exclude - * @param int $disabled If select list must be disabled - * @param array|string $include Array list of users id to include or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me - * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled - * @param string $force_entity '0' or Ids of environment to force - * @param int $maxlength Maximum length of string into list (0=no limit) - * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status - * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') - * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list - * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. - * @param string $morecss More css - * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). - * @param int $outputmode 0=HTML select string, 1=Array - * @param bool $multiple add [] in the name of element and add 'multiple' attribut - * @return string HTML select string + * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) + * @param string $htmlname Field name in form + * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled + * @param string $force_entity '0' or Ids of environment to force + * @param int $maxlength Maximum length of string into list (0=no limit) + * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status + * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') + * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list + * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. + * @param string $morecss More css + * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). + * @param int $outputmode 0=HTML select string, 1=Array + * @param bool $multiple add [] in the name of element and add 'multiple' attribut + * @return string HTML select string * @see select_dolgroups() */ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false) @@ -2507,7 +2507,7 @@ class Form $label = $objp->label; if (!empty($objp->label_translated)) $label = $objp->label_translated; - if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $label, 1); + if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $label, 1); $outkey = $objp->rowid; $outref = $objp->ref; @@ -2579,7 +2579,7 @@ class Form if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $opt .= ' ('.getCountry($outorigin, 1).')'; $objRef = $objp->ref; - if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRef, 1); + if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRef, 1); $outval .= $objRef; if ($outbarcode) $outval .= ' ('.$outbarcode.')'; $outval .= ' - '.dol_trunc($label, $maxlengtharticle); @@ -2948,11 +2948,11 @@ class Form } $objRef = $objp->ref; - if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRef, 1); + if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRef, 1); $objRefFourn = $objp->ref_fourn; - if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRefFourn, 1); + if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRefFourn, 1); $label = $objp->label; - if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $label, 1); + if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $label, 1); $optlabel = $objp->ref; if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) { diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php index 4dd8bed247b..41e39cc93a2 100644 --- a/htdocs/core/class/html.formcategory.class.php +++ b/htdocs/core/class/html.formcategory.class.php @@ -23,6 +23,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + +/** + * Class to manage forms for categories + */ class FormCategory extends Form { /** diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 5f32f5063d6..6fb02454311 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -32,6 +32,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + +/** + * Class of forms component to manage companies + */ class FormCompany extends Form { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 075fb95066b..98d781a51c1 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1393,7 +1393,7 @@ class FormFile if ($permtoeditline) { $paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '§ion_dir='.urlencode($relativepath) : ''); - print ''.img_edit('default', 0, 'class="paddingrightonly"').''; + print ''.img_edit('default', 0, 'class="paddingrightonly"').''; } } if ($permonobject) diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 68aa46ef9fb..2a9ac9f146b 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -236,8 +236,11 @@ function GetRootPath() return substr($sRealPath, 0, $position); } -// Emulate the asp Server.mapPath function. -// given an url path return the physical directory that it corresponds to +/** + * Emulate the asp Server.mapPath function. + * @param string $path given an url path return the physical directory that it corresponds to + * @return string Path + */ function Server_MapPath($path) { // This function is available only for Apache @@ -338,7 +341,12 @@ function GetCurrentFolder() return $sCurrentFolder; } -// Do a cleanup of the folder name to avoid possible problems +/** + * Do a cleanup of the folder name to avoid possible problems + * + * @param string $sNewFolderName Folder + * @return string Folder sanitized + */ function SanitizeFolderName($sNewFolderName) { $sNewFolderName = stripslashes($sNewFolderName); @@ -349,7 +357,12 @@ function SanitizeFolderName($sNewFolderName) return $sNewFolderName; } -// Do a cleanup of the file name to avoid possible problems +/** + * Do a cleanup of the file name to avoid possible problems + * + * @param string $sNewFileName Folder + * @return string Folder sanitized + */ function SanitizeFileName($sNewFileName) { global $Config; @@ -366,7 +379,15 @@ function SanitizeFileName($sNewFileName) return $sNewFileName; } -// This is the function that sends the results of the uploading process. +/** + * This is the function that sends the results of the uploading process. + * + * @param string $errorNumber errorNumber + * @param string $fileUrl fileUrl + * @param string $fileName fileName + * @param string $customMsg customMsg + * @return void + */ function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '') { // Minified version of the document.domain automatic fix script (#1919). diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index f2e8e94ab78..b78c0478370 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1409,7 +1409,7 @@ function complete_elementList_with_modules(&$elementList) * * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... - * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all (form is output by caller, recommanded) + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all (form is output by caller, recommended) * @param string $helptext Help * @return void */ @@ -1420,6 +1420,9 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') $form = new Form($db); + if (empty($strictw3c)) { + dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG); + } if (!empty($strictw3c) && $strictw3c == 1) { print "\n".''; @@ -1584,12 +1587,13 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') //var_dump($modelmail); $moreonlabel = ''; if (!empty($arrayofmessagename[$modelmail->label])) $moreonlabel = ' ('.$langs->trans("SeveralLangugeVariatFound").')'; - $arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; + // The 'label' is the key that is unique if we exclude the language + $arrayofmessagename[$modelmail->label.':'.$tmp[1]] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; } } //var_dump($arraydefaultmessage); //var_dump($arrayofmessagename); - print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value, 'None', 1, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); } else // type = 'string' ou 'chaine' { diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index bad0bf9f48c..941cb03d6c4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -720,10 +720,11 @@ function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1) * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' * @param int $overwriteifexists Overwrite file if exists (1 by default) * @param array $arrayreplacement Array to use to replace filenames with another one during the copy (works only on file names, not on directory names). + * @param int $excludesubdir 0=Do not exclude subdirectories, 1=Exclude subdirectories, 2=Exclude subdirectories if name is not a 2 chars (used for country codes subdirectories). * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK * @see dol_copy() */ -function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) +function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null, $excludesubdir = 0) { global $conf; @@ -759,8 +760,10 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep { if (is_dir($ossrcfile."/".$file)) { - //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); - $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement); + if (empty($excludesubdir) || ($excludesubdir == 2 && strlen($file) == 2)) { + //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); + $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir); + } } else { diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index a6ee33e9a65..0615ff127b0 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -353,6 +353,24 @@ function show_stats_for_company($product, $socid) print ''.$langs->trans("TotalQuantity").''; print ''; + // MO + if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) + { + $nblines++; + //$ret = $product->load_stats_mo($socid); + if ($ret < 0) dol_print_error($db); + $langs->load("orders"); + print ''; + print ''.img_object('', 'mrp').' '.$langs->trans("MO").''; + print ''; + print $product->stats_mo['suppliers']; + print ''; + print $product->stats_mo['nb']; + print ''; + print $product->stats_mo['qty']; + print ''; + print ''; + } // Customer proposals if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { @@ -379,7 +397,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("propal"); print ''; - print ''.img_object('', 'propal').' '.$langs->trans("SupplierProposals").''; + print ''.img_object('', 'supplier_proposal').' '.$langs->trans("SupplierProposals").''; print ''; print $product->stats_proposal_supplier['suppliers']; print ''; @@ -415,7 +433,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("orders"); print ''; - print ''.img_object('', 'order').' '.$langs->trans("SuppliersOrders").''; + print ''.img_object('', 'supplier_order').' '.$langs->trans("SuppliersOrders").''; print ''; print $product->stats_commande_fournisseur['suppliers']; print ''; @@ -425,24 +443,6 @@ function show_stats_for_company($product, $socid) print ''; print ''; } - // MO - if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) - { - $nblines++; - //$ret = $product->load_stats_mo($socid); - if ($ret < 0) dol_print_error($db); - $langs->load("orders"); - print ''; - print ''.img_object('', 'mrp').' '.$langs->trans("MO").''; - print ''; - print $product->stats_mo['suppliers']; - print ''; - print $product->stats_mo['nb']; - print ''; - print $product->stats_mo['qty']; - print ''; - print ''; - } // Customer invoices if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { @@ -469,7 +469,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("bills"); print ''; - print ''.img_object('', 'bill').' '.$langs->trans("SuppliersInvoices").''; + print ''.img_object('', 'supplier_invoice').' '.$langs->trans("SuppliersInvoices").''; print ''; print $product->stats_facture_fournisseur['suppliers']; print ''; diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 8a883ceef91..d04fa5f77ef 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -43,6 +43,14 @@ function takepos_prepare_head() $head[$h][2] = 'receipt'; $h++; + if ($conf->global->TAKEPOS_BAR_RESTAURANT) + { + $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php'; + $head[$h][1] = $langs->trans("BarRestaurant"); + $head[$h][2] = 'bar'; + $h++; + } + $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); for ($i = 1; $i <= $numterminals; $i++) { diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index d41965bdf1f..9ac9383e516 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -359,7 +359,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring); print ''; print ''; - $url = 'https://www.dolistore.com/4-skins'; + $url = 'https://www.dolistore.com/9-skins'; print ''; print $langs->trans('DownloadMoreSkins'); print ''; @@ -726,6 +726,33 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } + // TextTitleLinkColor + if ($foruserprofile) + { + } + else + { + $default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink))); + + print ''; + print ''.$langs->trans("BackgroundTableTitleTextlinkColor").''; + print ''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1).' '; + } + else + { + print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default")); + } + print '   '.$langs->trans("Default").': '.$default.' '; + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); + print ''; + print ''; + + print ''; + } + // BackgroundTableLineOddColor if ($foruserprofile) { diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index ed37a3a70ab..ce8ea9436e8 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -282,7 +282,8 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { - $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; + $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated.'; + $descriptionA1 .= ' If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; $sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', '".$this->db->escape($descriptionA1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; @@ -319,7 +320,9 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { - $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; + $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated."; + $descriptionC1 .= " If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
"; + $descriptionC1 .= "Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; $sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', '".$this->db->escape($descriptionC1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 5031b4079e4..80bc9f7ce0a 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -61,6 +61,9 @@ abstract class ModelePDFProduct extends CommonDocGenerator } } +/** + * Class template for classes of numbering product + */ abstract class ModeleProductCode { /** @@ -97,7 +100,6 @@ abstract class ModeleProductCode */ public function getExample($langs) { - $langs->load("bills"); return $langs->trans("NoExample"); } diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index ce3157414f5..18b8bc8b07c 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -82,7 +82,7 @@ $tmpDir = $conf->dav->multidir_output[$entity]; // We need root dir, not a dir t // Authentication callback function -$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function($username, $password) { +$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) { global $user; global $conf; global $dolibarr_main_authentication, $dolibarr_auto_user; diff --git a/htdocs/debugbar/class/autoloader.php b/htdocs/debugbar/class/autoloader.php index a68ace2c3c0..1d5c85c975d 100644 --- a/htdocs/debugbar/class/autoloader.php +++ b/htdocs/debugbar/class/autoloader.php @@ -4,7 +4,7 @@ * Simple autoloader, so we don't need Composer just for this. */ -spl_autoload_register(function($class) { +spl_autoload_register(function ($class) { if (preg_match('/^DebugBar/', $class) || preg_match('/^'.preg_quote('Psr\Log', '/').'/', $class)) { $file = DOL_DOCUMENT_ROOT.'/includes/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; //var_dump($class.' - '.file_exists($file).' - '.$file); diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index ee8156c229e..64644d18971 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -55,11 +55,17 @@ class PaymentDonation extends CommonObject public $fk_donation; public $datec = ''; + public $tms = ''; + public $datep = ''; - public $amount; // Total amount of payment - public $amounts = array(); // Array of amounts + + public $amount; // Total amount of payment + + public $amounts = array(); // Array of amounts + public $typepayment; + public $num_payment; /** @@ -121,14 +127,14 @@ class PaymentDonation extends CommonObject } // Clean parameters - if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; - if (isset($this->amount)) $this->amount = trim($this->amount); + if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; + if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; - if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; - if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; + if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); + if (isset($this->note_public)) $this->note_public = trim($this->note_public); + if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; + if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; + if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; $totalamount = 0; foreach ($this->amounts as $key => $value) // How payment is dispatch @@ -228,26 +234,26 @@ class PaymentDonation extends CommonObject { $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; - $this->ref = $obj->rowid; + $this->id = $obj->rowid; + $this->ref = $obj->rowid; - $this->fk_donation = $obj->fk_donation; - $this->datec = $this->db->jdate($obj->datec); - $this->tms = $this->db->jdate($obj->tms); - $this->datep = $this->db->jdate($obj->datep); - $this->amount = $obj->amount; + $this->fk_donation = $obj->fk_donation; + $this->datec = $this->db->jdate($obj->datec); + $this->tms = $this->db->jdate($obj->tms); + $this->datep = $this->db->jdate($obj->datep); + $this->amount = $obj->amount; $this->fk_typepayment = $obj->fk_typepayment; - $this->num_payment = $obj->num_payment; - $this->note_public = $obj->note_public; - $this->fk_bank = $obj->fk_bank; - $this->fk_user_creat = $obj->fk_user_creat; - $this->fk_user_modif = $obj->fk_user_modif; + $this->num_payment = $obj->num_payment; + $this->note_public = $obj->note_public; + $this->fk_bank = $obj->fk_bank; + $this->fk_user_creat = $obj->fk_user_creat; + $this->fk_user_modif = $obj->fk_user_modif; - $this->type_code = $obj->type_code; + $this->type_code = $obj->type_code; $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; - $this->bank_line = $obj->fk_bank; + $this->bank_line = $obj->fk_bank; } $this->db->free($resql); diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 0c7c4c4cebb..6921b8aabd6 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -772,7 +772,6 @@ class EcmFiles extends CommonObject if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - $companylink = ''; $label = ''.$langs->trans("MyModule").''; $label .= '
'; @@ -867,6 +866,9 @@ class EcmFiles extends CommonObject } +/** + * Class of an index line of a document + */ class EcmfilesLine { /** diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 0fb36466a02..765a8796a76 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,4 +1,6 @@ * Copyright (C) 2005-2018 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin @@ -1185,8 +1187,13 @@ function migrate_contracts_date1($db, $langs, $conf) print ''; } -/* - * Mise a jour date contrat avec date min effective mise en service si inferieur +/** + * Update contracts with date min real if service date is lower + * + * @param DoliDB $db Database handler + * @param Translate $langs Language + * @param Conf $conf Conf + * @return void */ function migrate_contracts_date2($db, $langs, $conf) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a9abfbc9f1f..3cf6e6044db 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1803,6 +1803,7 @@ TopMenuDisableImages=Hide images in Top menu LeftMenuBackgroundColor=Background color for Left menu BackgroundTableTitleColor=Background color for Table title line BackgroundTableTitleTextColor=Text color for Table title line +BackgroundTableTitleTextlinkColor=Text color for Table title link line BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index f2bc989b953..b22a7b83166 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -105,4 +105,6 @@ CashReport=Cash report MainPrinterToUse=Main printer to use OrderPrinterToUse=Order printer to use MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use \ No newline at end of file +OrderTemplateToUse=Order template to use +BarRestaurant=Bar Restaurant +AutoOrder=Customer auto order \ No newline at end of file diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 7cb9b21791a..fb0808e0953 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -953,12 +953,13 @@ SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services SearchIntoProjects=Projects +SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks SearchIntoCustomerInvoices=Customer invoices SearchIntoSupplierInvoices=Vendor invoices SearchIntoCustomerOrders=Sales orders SearchIntoSupplierOrders=Purchase orders -SearchIntoCustomerProposals=Customer proposals +SearchIntoCustomerProposals=Commercial proposals SearchIntoSupplierProposals=Vendor proposals SearchIntoInterventions=Interventions SearchIntoContracts=Contracts diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 6363b8b710d..6545b71ede3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1803,6 +1803,7 @@ TopMenuDisableImages=Cacher les images du menu principal LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche BackgroundTableTitleColor=Couleur de fond pour la ligne de titres des liste/tableaux BackgroundTableTitleTextColor=Couleur du texte pour la ligne de titre des tableaux +BackgroundTableTitleTextlinkColor=Couleur du texte pour la ligne de titre lien des tableaux BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index af707c3c87d..fad19564fdc 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -1047,10 +1047,10 @@ class MyObject extends CommonObject /** * Action executed by scheduler * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 336b410022a..c0b33be2bf8 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -533,7 +533,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete) + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 18c0b1bda2b..a0fcb744bb1 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea if (!$sortorder) $sortorder = "ASC"; // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); $search = array(); foreach ($object->fields as $key => $val) { diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 65ba9597b8a..07c6eae52a1 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1008,7 +1008,7 @@ class Mo extends CommonObject } $url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id; - if ($option = 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; + if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; if ($option != 'nolink') { @@ -1226,10 +1226,10 @@ class Mo extends CommonObject /** * Action executed by scheduler * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 59dd5ed7a7c..92f68785856 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -639,7 +639,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete) + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index b51171e6684..4807c47fb53 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -107,7 +107,7 @@ if ($user->socid > 0) // Protection if external user // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); $search = array(); foreach ($object->fields as $key => $val) { diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index 6da4d65925b..64bf5702996 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -141,7 +141,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $price_options[$i] = $langs->trans('SellingPrice').' '.$i; } -$genPriceOptions = function($level) use ($price_options) { +$genPriceOptions = function ($level) use ($price_options) { $return = array(); diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index efde996b927..0eeddd15c07 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -254,8 +254,10 @@ class FormProduct $out .= $comboenhancement; } - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + if (strpos($htmlname, 'search_') !== 0) { + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + } $out .= ''; if ($i == 0) print ''; print ''; @@ -201,7 +201,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA print '
'; print ''; print ''; - print '\n"; //print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0); //print "\n"; -print '
'.$langs->trans("Categories").'
'; + print '
'; $sql = "SELECT c.label, count(*) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; @@ -413,7 +413,7 @@ llxFooter(); $db->close(); -/* +/** * Print html activity for product type * * @param int $product_type Type of product @@ -422,7 +422,6 @@ $db->close(); function activitytrim($product_type) { global $conf, $langs, $db; - global $bc; // We display the last 3 years $yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, "y")); diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index b6021c82cb8..3f0989251b5 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -31,10 +31,10 @@ $langs->loadLangs(array("stocks", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 71c1b0f1ef7..9898c13f21b 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -164,26 +164,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
'; + print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 7a5b88000e1..61024cdd7ff 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -172,26 +172,22 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
'; + print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 8e61446a834..8f88044d913 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -153,27 +153,24 @@ if ($id > 0 || !empty($ref)) if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; + if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - $i = 0; + if (!empty($page)) $option .= '&page='.urlencode($page); + + $i = 0; print '
'; print ''; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index e42afd9f28c..342cd3058a2 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies', 'bills', 'products')); +$langs->loadLangs(array('companies', 'bills', 'products', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -185,25 +185,21 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 29774709e5e..f39d4ab73b3 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies', 'bills', 'products', 'companies')); +$langs->loadLangs(array('companies', 'bills', 'products', 'companies', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -165,26 +165,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
'; + print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 0a148ad2c8a..51e91aeaaac 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -150,27 +150,23 @@ if ($id > 0 || !empty($ref)) if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) - $option .= '&search_year='.urlencode($search_year); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - $i = 0; + if (!empty($page)) $option .= '&page='.urlencode($page); + + $i = 0; print '
'; print '
'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index d65b88ccabc..35b93cac8b9 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -169,26 +169,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
'; + print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index a7fede51aa1..5a59cbb9c83 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('products', 'companies')); +$langs->loadLangs(array('products', 'companies', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -169,26 +169,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
'; + print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
'; print '
'; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/public/stripe/confirm_payment.php b/htdocs/public/stripe/confirm_payment.php index 25cb358ccea..9a45a2cbeec 100644 --- a/htdocs/public/stripe/confirm_payment.php +++ b/htdocs/public/stripe/confirm_payment.php @@ -129,8 +129,8 @@ try { )); } -/* - * generate payment response +/** + * Generate payment response * * @param \Stripe\PaymentIntent $intent PaymentIntent * @return void diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 4cda97b39d1..1b4223e1fff 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -871,10 +871,12 @@ class Dolresource extends CommonObject return $resources; } - /* + /** * Return an int number of resources linked to the element * - * @return int + * @param string $element Element type + * @param int $element_id Element id + * @return int Nb of resources loaded */ public function fetchElementResources($element, $element_id) { diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php new file mode 100644 index 00000000000..7b6e1d9a98c --- /dev/null +++ b/htdocs/takepos/admin/bar.php @@ -0,0 +1,178 @@ + + * Copyright (C) 2011-2017 Juanjo Menent + * + * 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 . + */ + +/** + * \file htdocs/takepos/admin/bar.php + * \ingroup takepos + * \brief Setup page for TakePos module - Bar Restaurant features + */ + +require '../../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; + +// Security check +if (!$user->admin) accessforbidden(); + +$langs->loadLangs(array("admin", "cashdesk", "printing")); + +global $db; + +/* + * Actions + */ + +if (GETPOST('action', 'alpha') == 'set') +{ + $db->begin(); + + dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); + + if (!$res > 0) $error++; + + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +/* + * View + */ + +$form = new Form($db); +$formproduct = new FormProduct($db); + +llxHeader('', $langs->trans("CashDeskSetup")); + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); +$head = takepos_prepare_head(); +dol_fiche_head($head, 'bar', 'TakePOS', -1); +print '
'; + + +// Mode +print ''; +print ''; +print ''; + +print '
'; +print '
'; +print ''; +print ''; +print "\n"; + +if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { + print ''; + + print ''; +} + +print ''; + +print ''; + +if ($conf->global->TAKEPOS_SUPPLEMENTS) +{ + print '\n"; +} + +print ''; + + +print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; + print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; + print ''; + print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0); + //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); + print '
'; + print $langs->trans("OrderNotes"); + print ''; + print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0); + //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1); + print '
'; +print $langs->trans("BasicPhoneLayout"); +print ''; +//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); +print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0); +print '
'; +print $langs->trans("ProductSupplements"); +print ''; +//print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1); +print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); +print '
'; + print $langs->trans("SupplementCategory"); + print ''; + print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0); + print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY'); + print "
'; +print $langs->trans("AutoOrder"); +print ''; +print ajax_constantonoff("TAKEPOS_AUTO_ORDER", array(), $conf->entity, 0, 0, 1, 0); +print '
'; + +if ($conf->global->TAKEPOS_AUTO_ORDER) +{ + print '
'; + print ''; + print ''; + print ''; + print "\n"; + + //global $dolibarr_main_url_root; + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + $sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables"; + $resql = $db->query($sql); + $rows = array(); + while ($row = $db->fetch_array($resql)) { + print ''; + } + + print '
'.$langs->trans("Table").''.$langs->trans("URL").''.$langs->trans("QR").'
'; + print $langs->trans("Table")." ".$row['label']; + print ''; + print "".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid']).""; + print ''; + print ""; + print '
'; +} + +print '
'; + +print '
'; + +print '
'; + +print "\n"; + +print '
'; + +llxFooter(); +$db->close(); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 3e12fdce5c9..59fe85e66ef 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -434,19 +434,6 @@ print "
'; -print '
'; - -print '
'; - -// Bar Restaurant mode -print '
'; -print ''; - -print ''; -print ''; -print "\n"; - print ''; @@ -455,48 +442,6 @@ print ajax_constantonoff("TAKEPOS_BAR_RESTAURANT", array(), $conf->entity, 0, 0, //print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1); print "\n"; -if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { - print ''; - - print ''; -} - -if ($conf->global->TAKEPOS_BAR_RESTAURANT) -{ - print ''; - - print ''; - - if ($conf->global->TAKEPOS_SUPPLEMENTS) - { - print '\n"; - } -} print '
'.$langs->trans("Other").''.$langs->trans("Value").'
'; print $langs->trans("EnableBarOrRestaurantFeatures"); print '
'; - print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; - print ''; - print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0); - //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); - print '
'; - print $langs->trans("OrderNotes"); - print ''; - print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0); - //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1); - print '
'; - print $langs->trans("BasicPhoneLayout"); - print ''; - //print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); - print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0); - print '
'; - print $langs->trans("ProductSupplements"); - print ''; - //print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1); - print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); - print '
'; - print $langs->trans("SupplementCategory"); - print ''; - print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0); - print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY'); - print "
'; print '
'; diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index f3b5ba15716..d1f59325c1f 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -142,4 +142,10 @@ elseif ($action == 'search' && $term != '') { } echo json_encode($object); +} elseif ($action == 'thecheck') { + $place = GETPOST('place', 'alpha'); + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + $printer = new dolReceiptPrinter($db); + $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); } diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php new file mode 100644 index 00000000000..f0c3bea82b9 --- /dev/null +++ b/htdocs/takepos/genimg/qr.php @@ -0,0 +1,33 @@ + + * + * 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 . + */ + +if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); +if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require '../../main.inc.php'; // Load $user and permissions +require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; + +$key = GETPOST('key'); + +$module = new modtcpdfbarcode($db); +$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index fa5ca2f83be..b1641072829 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -47,13 +47,16 @@ $idproduct = GETPOST('idproduct', 'int'); $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $placeid = 0; // $placeid is ID of invoice -if (empty($user->rights->takepos->run)) { +if ($_SESSION["publicterminal"]) { + $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers +} +elseif (empty($user->rights->takepos->run)) { accessforbidden(); } -if ($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') +if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"]) { // DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED if ($_SESSION["takeposterminal"] == "") diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index b2526ef885e..80d67513bf2 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant +if ($_SESSION["publicterminal"]){ + // Decode place if is a order from customer phone + $key = GETPOST('key'); + $place=dol_decode($key); +} +else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); @@ -48,7 +53,10 @@ if ($setterminal > 0) $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); -if (empty($user->rights->takepos->run)) { +if ($_SESSION["publicterminal"]) { + $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers +} +elseif (empty($user->rights->takepos->run)) { accessforbidden(); } @@ -167,6 +175,14 @@ function Exit(){ window.location.href='../user/logout.php'; } +function CheckPlease(){ + console.log("Request the check to the waiter"); + $.ajax({ + type: "GET", + url: "", + }); +} + @@ -175,10 +191,13 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] ?>
- - - - + '.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; + print ''; + print ''; + print ''; + if ($_SESSION["publicterminal"]) print ''; + ?>
diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php new file mode 100644 index 00000000000..c97edfdc0e7 --- /dev/null +++ b/htdocs/takepos/public/auto_order.php @@ -0,0 +1,29 @@ + + * + * 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 . + */ + +/** + * \file htdocs/takepos/public/auto_order.php + * \ingroup takepos + * \brief Public orders for customers + */ + +if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip + +$_SESSION["basiclayout"] = 1; +$_SESSION["publicterminal"] = true; // Is a public customer +require '../phone.php'; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c559fcec9ad..9e099c6953d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1132,6 +1132,9 @@ table[summary="list_of_modules"] .fa-cog { padding-left: 5px; padding-right: 5px; } + + .hideonsmartphone { display: none; } + .hideonsmartphoneimp { display: none !important; } } /* Force values for small screen 570 */ @@ -1189,8 +1192,6 @@ table[summary="list_of_modules"] .fa-cog { max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */ } - .hideonsmartphone { display: none; } - .hideonsmartphoneimp { display: none !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } .maxwidth50onsmartphone { max-width: 40px; } @@ -3364,6 +3365,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; + color: rgb(); } tr.liste_titre_topborder td { border-top-width: px; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 39fcd003335..927d29e1919 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -128,6 +128,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); +$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index f6324f0146f..823b8168b4c 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -69,6 +69,7 @@ $colorbacklinebreak = '233,228,230'; // line break $colorbackbody = '255,255,255'; $colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 $colortexttitle = '0,0,0'; +$colortexttitlelink = '10, 20, 100'; $colortext = '0,0,0'; $colortextlink = '10, 20, 100'; $fontsize = '0.86em'; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dfcc413986f..c995426edd9 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -130,6 +130,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortext : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); +$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); @@ -3398,6 +3399,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; + color: rgb(); } tr.liste_titre_topborder td { border-top-width: px; diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index d15444acb6c..6cdd37fe913 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -65,6 +65,7 @@ $colorbacklinebreak = '214,218,220'; $colorbackbody = '248,248,248'; $colortexttitlenotab = '80,71,5'; $colortexttitle = '20,20,20'; +$colortexttitlelink = '0,0,120'; $colortext = '0,0,0'; $colortextlink = '0,0,120'; $fontsize = '14'; diff --git a/htdocs/ticket/class/utils_diff.class.php b/htdocs/ticket/class/utils_diff.class.php index 03dff5506b4..84075d395ab 100644 --- a/htdocs/ticket/class/utils_diff.class.php +++ b/htdocs/ticket/class/utils_diff.class.php @@ -20,24 +20,21 @@ class Diff const DELETED = 1; const INSERTED = 2; - /* Returns the diff for two strings. The return value is an array, each of + /** + * Returns the diff for two strings. The return value is an array, each of * whose values is an array containing two values: a line (or character, if * $compareCharacters is true), and one of the constants DIFF::UNMODIFIED (the * line or character is in both strings), DIFF::DELETED (the line or character * is only in the first string), and DIFF::INSERTED (the line or character is * only in the second string). The parameters are: * - * $string1 - the first string - * $string2 - the second string - * $compareCharacters - true to compare characters, and false to compare - * lines; this optional parameter defaults to false + * @param string $string1 First string + * @param string $string2 Second string + * @param string $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false + * @return array Array of diff */ - public static function compare( - $string1, - $string2, - $compareCharacters = false - ) { - + public static function compare($string1, $string2, $compareCharacters = false) + { // initialise the sequences and comparison start and end positions $start = 0; if ($compareCharacters) { @@ -90,12 +87,13 @@ class Diff return $diff; } - /* Returns the diff for two files. The parameters are: + /** + * Returns the diff for two files. The parameters are: * - * $file1 - the path to the first file - * $file2 - the path to the second file - * $compareCharacters - true to compare characters, and false to compare - * lines; this optional parameter defaults to false + * @param string $file1 Path to the first file + * @param string $file2 Path to the second file + * @param boolean $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false + * @return array Array of diff */ public static function compareFiles( $file1, @@ -111,23 +109,18 @@ class Diff ); } - /* Returns the table of longest common subsequence lengths for the specified - * sequences. The parameters are: + /** + * Returns the table of longest common subsequence lengths for the specified sequences. The parameters are: * - * $sequence1 - the first sequence - * $sequence2 - the second sequence - * $start - the starting index - * $end1 - the ending index for the first sequence - * $end2 - the ending index for the second sequence + * @param string $sequence1 the first sequence + * @param string $sequence2 the second sequence + * @param string $start the starting index + * @param string $end1 the ending index for the first sequence + * @param string $end2 the ending index for the second sequence + * @return array array of diff */ - private static function computeTable( - $sequence1, - $sequence2, - $start, - $end1, - $end2 - ) { - + private static function computeTable($sequence1, $sequence2, $start, $end1, $end2) + { // determine the lengths to be compared $length1 = $end1 - $start + 1; $length2 = $end2 - $start + 1; @@ -156,21 +149,18 @@ class Diff return $table; } - /* Returns the partial diff for the specificed sequences, in reverse order. - * The parameters are: + /** + * Returns the partial diff for the specificed sequences, in reverse order. + * The parameters are: * - * $table - the table returned by the computeTable function - * $sequence1 - the first sequence - * $sequence2 - the second sequence - * $start - the starting index + * @param string $table the table returned by the computeTable function + * @param string $sequence1 the first sequence + * @param string $sequence2 the second sequence + * @param string $start the starting index + * @return array array of diff */ - private static function generatePartialDiff( - $table, - $sequence1, - $sequence2, - $start - ) { - + private static function generatePartialDiff($table, $sequence1, $sequence2, $start) + { // initialise the diff $diff = array(); @@ -205,17 +195,17 @@ class Diff return $diff; } - /* Returns a diff as a string, where unmodified lines are prefixed by ' ', + /** + * Returns a diff as a string, where unmodified lines are prefixed by ' ', * deletions are prefixed by '- ', and insertions are prefixed by '+ '. The * parameters are: * - * $diff - the diff array - * $separator - the separator between lines; this optional parameter defaults - * to "\n" + * @param array $diff the diff array + * @param string $separator the separator between lines; this optional parameter defaults to "\n" + * @return string String */ public static function toString($diff, $separator = "\n") { - // initialise the string $string = ''; @@ -242,17 +232,17 @@ class Diff return $string; } - /* Returns a diff as an HTML string, where unmodified lines are contained + /** + * Returns a diff as an HTML string, where unmodified lines are contained * within 'span' elements, deletions are contained within 'del' elements, and * insertions are contained within 'ins' elements. The parameters are: * - * $diff - the diff array - * $separator - the separator between lines; this optional parameter defaults - * to '
' + * @param string $diff the diff array + * @param string $separator the separator between lines; this optional parameter defaults to '
' + * @return string HTML string */ public static function toHTML($diff, $separator = '
') { - // initialise the HTML $html = ''; @@ -283,17 +273,16 @@ class Diff return $html; } - /* Returns a diff as an HTML table. The parameters are: + /** + * Returns a diff as an HTML table. The parameters are: * - * $diff - the diff array - * $indentation - indentation to add to every line of the generated HTML; this - * optional parameter defaults to '' - * $separator - the separator between lines; this optional parameter - * defaults to '
' + * @param string $diff the diff array + * @param string $indentation indentation to add to every line of the generated HTML; this optional parameter defaults to '' + * @param string $separator the separator between lines; this optional parameter defaults to '
' + * @return string HTML string */ public static function toTable($diff, $indentation = '', $separator = '
') { - // initialise the HTML $html = $indentation."\n"; @@ -373,14 +362,16 @@ class Diff return $html.$indentation."
\n"; } - /* Returns the content of the cell, for use in the toTable function. The + /** + * Returns the content of the cell, for use in the toTable function. The * parameters are: * - * $diff - the diff array - * $indentation - indentation to add to every line of the generated HTML - * $separator - the separator between lines - * $index - the current index, passes by reference - * $type - the type of line + * @param string $diff the diff array + * @param string $indentation indentation to add to every line of the generated HTML + * @param string $separator the separator between lines + * @param string $index the current index, passes by reference + * @param string $type the type of line + * @return string HTML string */ private static function getCellContent($diff, $indentation, $separator, &$index, $type) { diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 3944ef5befa..4ae702ade15 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -137,7 +137,12 @@ $server->register( -// Full methods code +/** + * Full methods code + * + * @param string $authentication Authentication string + * @return array Array of data + */ function getVersions($authentication) { global $db, $conf, $langs; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 2691dd9ebfd..be91f6640a1 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -249,6 +249,13 @@ class Website extends CommonObject // } } + if (! $error) { + $stringtodolibarrfile = "# Some properties for Dolibarr web site CMS\n"; + $stringtodolibarrfile .= "param=value\n"; + //print $conf->website->dir_output.'/'.$this->ref.'/.dolibarr';exit; + file_put_contents($conf->website->dir_output.'/'.$this->ref.'/.dolibarr', $stringtodolibarrfile); + } + // Commit or rollback if ($error) { $this->db->rollback(); @@ -668,7 +675,7 @@ class Website extends CommonObject if (!$error) { - dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0); + dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0, null, 2); // Check symlink to medias and restore it if ko $pathtomedias = DOL_DATA_ROOT.'/medias'; // Target @@ -927,30 +934,34 @@ class Website extends CommonObject $arrayreplacementincss['file=logos%2Fthumbs%2F'.$mysoc->logo] = "file=logos%2Fthumbs%2F__LOGO_KEY__"; } + // Create output directories + dol_syslog("Create containers dir"); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers'); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey'); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey'); + + // Copy files into 'containers' $srcdir = $conf->website->dir_output.'/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/containers'; - // Create containers dir - dol_syslog("Create containers dir"); - dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers'); - - // Copy files into medias dol_syslog("Copy content from ".$srcdir." into ".$destdir); - dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2); + // Copy files into medias/image $srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey'; dol_syslog("Copy content from ".$srcdir." into ".$destdir); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + // Copy files into medias/js $srcdir = DOL_DATA_ROOT.'/medias/js/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey'; - // Copy containers files dol_syslog("Copy content from ".$srcdir." into ".$destdir); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + // Make some replacement into some files $cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php'; dolReplaceInFile($cssindestdir, $arrayreplacementincss); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index a617d9ae018..690dc0efe3b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -271,7 +271,11 @@ if (GETPOST('optioncontent')) $algo .= 'content'; if (GETPOST('optionsitefiles')) $algo .= 'sitefiles'; if (empty($sortfield)) { - $sortfield = 'pageurl'; $sortorder = 'ASC'; + if ($action == 'file_manager') { + $sortfield='name'; $sortorder = 'ASC'; + } else { + $sortfield = 'pageurl'; $sortorder = 'ASC'; + } } $searchkey = GETPOST('searchstring', 'none'); @@ -3527,9 +3531,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print $langs->trans("SearchString"); print '
'; print '
'; - print ''; - print ''; + print ''; + + print ''; print '
'; print '
'; diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 32268b039b4..b985c77434e 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -715,7 +715,6 @@ class Hook extends CommonObject * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index ea1651c5902..b4367e96f49 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -73,7 +73,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index 34d67341afb..0dd4946f69c 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -73,7 +73,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 89e78b32bd9..f19e88c36a6 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -75,7 +75,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -91,7 +95,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 7f3c9030725..e3c38c1df86 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -73,7 +73,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BOMTest.php b/test/phpunit/BOMTest.php index 41cbdd9f247..39268bdeaea 100644 --- a/test/phpunit/BOMTest.php +++ b/test/phpunit/BOMTest.php @@ -74,7 +74,11 @@ class BOMTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class BOMTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 416a17f0c0f..1007db02dad 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -75,7 +75,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 61d7b7f1199..de4da3790b5 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -103,7 +103,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -121,7 +125,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php index 8029959c22b..d407b67d991 100755 --- a/test/phpunit/CMailFileTest.php +++ b/test/phpunit/CMailFileTest.php @@ -73,7 +73,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index 3c81a7aee21..a62d362a972 100644 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -74,7 +74,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index b1a3fd87b30..33349449795 100644 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -74,7 +74,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 733071c0f58..5c3c6d7d54e 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -86,7 +86,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index b62b9befcc7..f56d00b5bcd 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -86,7 +86,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 7ccbf5d0b76..bebd65634bf 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -75,7 +75,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index ad2920282b2..990ef41f0b7 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -73,7 +73,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index 9f4b5998455..5e9c45825ec 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -73,7 +73,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index e32952c167d..6c68423e8a9 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -74,7 +74,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 7410e1f15f9..1979f89fabb 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -74,7 +74,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CompanyLibTest.php b/test/phpunit/CompanyLibTest.php index c45f6ebd208..ab9eb414634 100644 --- a/test/phpunit/CompanyLibTest.php +++ b/test/phpunit/CompanyLibTest.php @@ -73,7 +73,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 8fdaea0cbe7..0c5687e67c9 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -82,7 +82,11 @@ class ContactTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -92,7 +96,11 @@ class ContactTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index 7c302105aa2..d364d6c9dff 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -74,7 +74,11 @@ class ContratTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ContratTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index c34bbffba95..87c43798a0f 100644 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -76,7 +76,11 @@ class CoreTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class CoreTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index dd32e02cee6..062bdb6dd11 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -74,7 +74,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 895599becde..7e96e39030e 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -74,7 +74,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 202c41958d0..9eba2460655 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -74,7 +74,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php index 2ab2fc2aff3..27fd3dabbf3 100644 --- a/test/phpunit/EntrepotTest.php +++ b/test/phpunit/EntrepotTest.php @@ -74,7 +74,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index 67467ac6c81..3f6402262c3 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -74,7 +74,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 3abec2ee0e1..590accccbed 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -78,7 +78,11 @@ class ExportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class ExportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index b277ba5c1b3..d9cd44a40d2 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -75,7 +75,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 71caddeb491..f89ab4b1f13 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -75,7 +75,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 4e361895fcc..47f3a639b29 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -74,7 +74,11 @@ class FactureTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class FactureTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 59ecc240461..f0165a88d0b 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -74,7 +74,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index ba9408441a1..f78e9250471 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -74,7 +74,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index fb3ce8f5814..9d476953381 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -75,7 +75,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FormAdminTest.php b/test/phpunit/FormAdminTest.php index e6b92b698d9..a434841930c 100644 --- a/test/phpunit/FormAdminTest.php +++ b/test/phpunit/FormAdminTest.php @@ -74,7 +74,11 @@ class FormAdminTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FormAdminTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FormTest.php b/test/phpunit/FormTest.php index 59cfeb3fa3d..bec23048e9f 100644 --- a/test/phpunit/FormTest.php +++ b/test/phpunit/FormTest.php @@ -74,7 +74,11 @@ class FormTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FormTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index 4304251d7f1..21fa1f29257 100644 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -77,7 +77,11 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index dff6b3a7d06..e3dabff6df9 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -77,7 +77,11 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/GetUrlLibTest.php b/test/phpunit/GetUrlLibTest.php index ba074459f44..268122c8d48 100644 --- a/test/phpunit/GetUrlLibTest.php +++ b/test/phpunit/GetUrlLibTest.php @@ -75,7 +75,11 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index cd5a9f28138..e7e3e8749cd 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -76,7 +76,11 @@ class HolidayTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class HolidayTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php index 71474ba1847..3bfb676f3be 100644 --- a/test/phpunit/ImagesLibTest.php +++ b/test/phpunit/ImagesLibTest.php @@ -75,7 +75,11 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index 9e6b973500a..ce689fda4a4 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -76,7 +76,11 @@ class ImportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class ImportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index 0b5d3dd53e6..7d2678b0ec7 100644 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -76,7 +76,11 @@ class JsonLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class JsonLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 3ff2917a9f2..f4a14373ebe 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -86,7 +86,11 @@ class LangTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class LangTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LesscTest.php b/test/phpunit/LesscTest.php index ca64853b381..a4ce302c540 100644 --- a/test/phpunit/LesscTest.php +++ b/test/phpunit/LesscTest.php @@ -86,7 +86,11 @@ class LesscTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class LesscTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 71a61c80ae0..253e779ac03 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -74,7 +74,11 @@ class LoanTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class LoanTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index fc25d929b38..e451262546d 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -74,7 +74,11 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 5a43de21167..f8feaa8f829 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -73,7 +73,11 @@ class ModulesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class ModulesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index 85137234a3b..23b6b2b0111 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -76,7 +76,11 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 099d6d2052c..089a2c2f4cf 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -73,7 +73,11 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 96bfbefdf17..47d8341f501 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -75,7 +75,11 @@ class PaypalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class PaypalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index 9c9c0bb666f..276deada0c6 100644 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -77,7 +77,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PgsqlTest.php b/test/phpunit/PgsqlTest.php index 4b2a5f98746..5a09e7fc55a 100644 --- a/test/phpunit/PgsqlTest.php +++ b/test/phpunit/PgsqlTest.php @@ -76,7 +76,11 @@ class PgsqlTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class PgsqlTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index d7f9e310088..0c47ec4f275 100755 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -81,7 +81,11 @@ class PricesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -90,7 +94,11 @@ class PricesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ProductTest.php b/test/phpunit/ProductTest.php index 8a848416318..650d8a93e37 100644 --- a/test/phpunit/ProductTest.php +++ b/test/phpunit/ProductTest.php @@ -74,7 +74,11 @@ class ProductTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,12 @@ class ProductTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // teardownafterclass + + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 84a6411082f..8a7e0540b9a 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -75,7 +75,11 @@ class ProjectTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ProjectTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 709c5bbcfb7..068fb53b052 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -74,7 +74,11 @@ class PropalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class PropalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/RestAPIDocumentTest.php b/test/phpunit/RestAPIDocumentTest.php index 9ce14a4ac92..65b8c206c9d 100644 --- a/test/phpunit/RestAPIDocumentTest.php +++ b/test/phpunit/RestAPIDocumentTest.php @@ -76,7 +76,11 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase echo "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase echo __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/RestAPIUserTest.php b/test/phpunit/RestAPIUserTest.php index ea3970e5a4b..9d49d10af73 100644 --- a/test/phpunit/RestAPIUserTest.php +++ b/test/phpunit/RestAPIUserTest.php @@ -80,7 +80,11 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -89,7 +93,11 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index e490054edfa..16884214418 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -86,7 +86,11 @@ class ScriptsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class ScriptsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 4130426d806..5a248006498 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -86,7 +86,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 070a8999bb2..4ed0771d668 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -74,7 +74,11 @@ class SocieteTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class SocieteTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SupplierProposalTest.php b/test/phpunit/SupplierProposalTest.php index 42d7e5842a6..27414ecab0a 100644 --- a/test/phpunit/SupplierProposalTest.php +++ b/test/phpunit/SupplierProposalTest.php @@ -77,7 +77,11 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/TicketTest.php b/test/phpunit/TicketTest.php index fa7ea8df98f..c13bdcfb959 100644 --- a/test/phpunit/TicketTest.php +++ b/test/phpunit/TicketTest.php @@ -74,7 +74,11 @@ class TicketTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class TicketTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index fe08af2bce7..7e3cdd24b3a 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -73,7 +73,11 @@ class UserGroupTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class UserGroupTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 3c89bd52d06..10b0bd7b0b7 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -73,7 +73,11 @@ class UserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class UserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index a1b9eafa45e..dd5ba68ca8f 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -73,7 +73,11 @@ class UtilsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class UtilsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index 8afd50a0394..33d842f6d39 100644 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -77,7 +77,11 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index 7304e2bf367..34686cbec92 100644 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -77,7 +77,11 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 3d74deb721c..70a8c12a498 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -84,7 +84,11 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -92,7 +96,12 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php index 9aefd6c5ce6..1106164b4ee 100644 --- a/test/phpunit/WebservicesThirdpartyTest.php +++ b/test/phpunit/WebservicesThirdpartyTest.php @@ -94,7 +94,11 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -103,7 +107,11 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index de51431b046..bb68f413741 100644 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -77,7 +77,11 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index 26d5e25c54b..9fb1975a1fd 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -73,7 +73,11 @@ class XCalLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class XCalLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db;