diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index ebf97bfb787..f4be1c481f6 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -345,12 +345,6 @@ 0 - - - 0 - - - 0 0 diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 11da2236703..67ae907d9a4 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -173,7 +173,7 @@ while ($obj = $db->fetch_object($resql)) { $sql.= $db->plimit($limit+1, $offset); -dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG ); +dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { @@ -183,7 +183,7 @@ if (! $resql) $num = $db->num_rows($resql); -dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG ); +dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index d6073cbd9fd..775974edb6c 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -475,7 +475,7 @@ class AccountancyExport // elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting if (! empty($data->date_echeance)) //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); - $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy + $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy else $Tab['date_echeance'] = '000000'; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 1611de1e4ee..c6434da6388 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -633,12 +633,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . $key . '"' . $sep; print '"' . $date . '"' . $sep; print '"' . $val["refsologest"] . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; print '"' . $langs->trans("Thirdparty") . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep; print '"' . $journal . '"' ; @@ -654,12 +654,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . $key . '"' . $sep; print '"' . $date . '"' . $sep; print '"' . $val["refsologest"] . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '""' . $sep; - print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; + print '"' . utf8_decode (dol_trunc($accountingaccount->label, 32)) . '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep; print '"' . $journal . '"' ; @@ -679,12 +679,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . $key . '"' . $sep; print '"' . $date . '"' . $sep; print '"' . $val["refsologest"] . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '""' . $sep; print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep; - print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep; print '"' . $journal . '"' ; @@ -700,12 +700,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . $key . '"' . $sep; print '"' . $date . '"' . $sep; print '"' . $val["refsologest"] . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; print '"' . $langs->trans("Thirdparty") . '"' . $sep; - print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep; + print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep; print '"' . $journal . '"' ; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 9629b8572fc..b9a2d15c5cd 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1297,7 +1297,7 @@ else print "\n"; // Categories - if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire )) + if (! empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '' . $form->editfieldkey("Categories", 'memcats', '', $object, 0) . ''; print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 6d09ccac022..864340e1f6d 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -608,7 +608,7 @@ if ($rowid > 0) print "\n"; print ''; - print_liste_field_titre( $langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f9f4896da79..878a1081b40 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -493,7 +493,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index a21eb56cb2c..3a22d73ea3a 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -262,12 +262,12 @@ class Dolistore if ($this->version_compare($product->dolibarr_min, DOL_VERSION) <= 0) { if ($this->version_compare($product->dolibarr_max, DOL_VERSION) >= 0) { //compatible - $version = ''.$langs->trans('CompatibleUpTo', $product->dolibarr_max, + $version = ''.$langs->trans('CompatibleUpTo', $product->dolibarr_max, $product->dolibarr_min, $product->dolibarr_max).''; $compatible = ''; } else { //never compatible, module expired - $version = ''.$langs->trans('NotCompatible', DOL_VERSION, + $version = ''.$langs->trans('NotCompatible', DOL_VERSION, $product->dolibarr_min, $product->dolibarr_max).''; $compatible = 'NotCompatible'; } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index a66f3d8e4ef..a407edd3864 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -207,7 +207,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS') } } elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') { $val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha'); - $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', +$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); if (!$res > 0) { diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 261ff283102..c414eca8158 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -170,7 +170,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER') { $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha'); - $doubleapproval = price2num($doubleapproval ); + $doubleapproval = price2num($doubleapproval); $res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); $res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED", $doubleapproval, 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 577b15579ed..08d5c28ecea 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -281,7 +281,7 @@ if ($mode == 'overwrite') print '
'; print ''; print ''; - print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("NewTranslationStringToShow", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder); //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder); @@ -470,7 +470,7 @@ if ($mode == 'searchkey') print '
'; print '
'; print ''; - print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).''; + print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).''; print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder); //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity",$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder); diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index e50e6db86d2..6db5edf4646 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -161,7 +161,7 @@ class BlockedLogAuthority $sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b"; if ($id) $sql.= " WHERE b.rowid = ". $id; - elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ; + elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape($signature) ."'" ; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index ce0cd81622f..9c7baa0634a 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -394,7 +394,7 @@ class BlockedLog // Add more fields to exclude depending on object type if ($this->element == 'cashcontrol') { - $arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array( + $arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array( 'name','lastname','firstname','region','region_id','region_code','state','state_id','state_code','country','country_id','country_code', 'total_ht','total_tva','total_ttc','total_localtax1','total_localtax2', 'barcode_type','barcode_type_code','barcode_type_label','barcode_type_coder','mode_reglement_id','cond_reglement_id','mode_reglement','cond_reglement','shipping_method_id', @@ -459,7 +459,7 @@ class BlockedLog $lineid++; foreach($tmpline as $keyline => $valueline) { - if (! in_array($keyline, array( + if (! in_array($keyline, array( 'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2' ))) continue; // Discard if not into a dedicated list @@ -575,7 +575,7 @@ class BlockedLog foreach($tmpobject->thirdparty as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' ))) continue; // Discard if not into a dedicated list @@ -592,7 +592,7 @@ class BlockedLog foreach($tmpobject as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public' ))) continue; // Discard if not into a dedicated list if (!is_object($value)) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 1d05f7035dc..20d9a862f33 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -701,10 +701,10 @@ class Categorie extends CommonObject // For backward compatibility if ($type == 'societe') { $type = 'customer'; - dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING); + dol_syslog(get_class($this) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING); } elseif ($type == 'fournisseur') { $type = 'supplier'; - dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING); + dol_syslog(get_class($this) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING); } $this->db->begin(); @@ -758,7 +758,7 @@ class Categorie extends CommonObject $sql = "SELECT c.fk_" . $this->MAP_CAT_FK[$type]; $sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as c"; $sql .= ", " . MAIN_DB_PREFIX . $this->MAP_OBJ_TABLE[$type] . " as o"; - $sql .= " WHERE o.entity IN (" . getEntity( $obj->element).")"; + $sql .= " WHERE o.entity IN (" . getEntity($obj->element).")"; $sql.= " AND c.fk_categorie = ".$this->id; $sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid"; @@ -775,7 +775,7 @@ class Categorie extends CommonObject else { $obj = new $this->MAP_OBJ_CLASS[$type]( $this->db ); - $obj->fetch( $rec['fk_' . $this->MAP_CAT_FK[$type]]); + $obj->fetch($rec['fk_' . $this->MAP_CAT_FK[$type]]); $objs[] = $obj; } } @@ -1008,7 +1008,7 @@ class Categorie extends CommonObject if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; - $sql .= " WHERE c.entity IN (" . getEntity( 'category') . ")"; + $sql .= " WHERE c.entity IN (" . getEntity('category') . ")"; $sql .= " AND c.type = " . $type; dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG); @@ -1418,7 +1418,7 @@ class Categorie extends CommonObject $sql = "SELECT ct.fk_categorie, c.label, c.rowid"; $sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c"; $sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . (int) $id . " AND c.type = " . $this->MAP_ID[$type]; - $sql .= " AND c.entity IN (" . getEntity( 'category') . ")"; + $sql .= " AND c.entity IN (" . getEntity('category') . ")"; $res = $this->db->query($sql); if ($res) @@ -1470,16 +1470,16 @@ class Categorie extends CommonObject // For backward compatibility if (is_numeric($type)) { // We want to reverse lookup - $map_type = array_flip( $this->MAP_ID ); + $map_type = array_flip($this->MAP_ID); $type = $map_type[$type]; - dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead", +dol_syslog( get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING ); } // Generation requete recherche $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "categorie"; $sql .= " WHERE type = " . $this->MAP_ID[$type]; - $sql .= " AND entity IN (" . getEntity( 'category') . ")"; + $sql .= " AND entity IN (" . getEntity('category') . ")"; if ($nom) { if (! $exact) diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index c99b72082dc..df300961fb1 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -77,7 +77,7 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sen { if(empty($file['tmp_name'][$i]) || intval($conf->global->MAIN_UPLOAD_DOC) * 1000 <= filesize($file['tmp_name'][$i]) ) { - setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles' ) ); + setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles')); unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]); } } diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 79f53316e2e..a30bbf5e4b4 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -487,7 +487,7 @@ if ($object->id > 0) $langs->load("categories"); print ''; print '"; } diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index a69af815595..26b16e50d68 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -64,17 +64,17 @@ class FormAdvTargetEmailing extends Form $sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel"; $sql .= " WHERE active > 0"; $sql .= " ORDER BY sortorder"; - dol_syslog ( get_class( $this ) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG ); - $resql = $this->db->query( $sql ); + dol_syslog (get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG); + $resql = $this->db->query($sql); if ($resql) { - $num = $this->db->num_rows( $resql ); + $num = $this->db->num_rows($resql); $i = 0; while ( $i < $num ) { - $obj = $this->db->fetch_object( $resql ); + $obj = $this->db->fetch_object($resql); - $level = $langs->trans( $obj->code ); + $level = $langs->trans($obj->code); if ($level == $obj->code) - $level = $langs->trans( $obj->label ); + $level = $langs->trans($obj->label); $options_array[$obj->code] = $level; $i ++; @@ -120,10 +120,10 @@ class FormAdvTargetEmailing extends Form $foundselected = false; while ($i < $num) { - $obj = $this->db->fetch_object ( $resql ); + $obj = $this->db->fetch_object ($resql); $countryArray [$i] ['rowid'] = $obj->rowid; $countryArray [$i] ['code_iso'] = $obj->code_iso; - $countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso ) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ( "Country" . $obj->code_iso ) : ($obj->label != '-' ? $obj->label : '')); + $countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ("Country" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : '')); $label[$i] = $countryArray[$i]['label']; $i ++; } @@ -166,25 +166,25 @@ class FormAdvTargetEmailing extends Form $sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")"; $sql_usr .= " AND u2.rowid = sc.fk_user "; - if (! empty ( $conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX )) + if (! empty ($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql_usr .= " AND u2.statut<>0 "; $sql_usr .= " ORDER BY name ASC"; // print $sql_usr;exit; - $resql_usr = $this->db->query ( $sql_usr ); + $resql_usr = $this->db->query ($sql_usr); if ($resql_usr) { - while ( $obj_usr = $this->db->fetch_object ( $resql_usr ) ) { + while ( $obj_usr = $this->db->fetch_object ($resql_usr) ) { $label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')'; $options_array [$obj_usr->rowid] = $label; } - $this->db->free ( $resql_usr ); + $this->db->free ($resql_usr); } else { - dol_print_error ( $this->db ); + dol_print_error ($this->db); } - return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array ); + return $this->advMultiselectarray ($htmlname, $options_array, $selected_array); } /** @@ -227,8 +227,8 @@ class FormAdvTargetEmailing extends Form if (is_array($sqlqueryparam)) { - $param_list = array_keys ( $sqlqueryparam ); - $InfoFieldList = explode ( ":", $param_list [0] ); + $param_list = array_keys ($sqlqueryparam); + $InfoFieldList = explode (":", $param_list [0]); // 0 1 : tableName // 1 2 : label field name Nom du champ contenant le libelle @@ -237,8 +237,8 @@ class FormAdvTargetEmailing extends Form $keyList = 'rowid'; - if (count ( $InfoFieldList ) >= 3) { - if (strpos ( $InfoFieldList [3], 'extra.' ) !== false) { + if (count ($InfoFieldList) >= 3) { + if (strpos ($InfoFieldList [3], 'extra.') !== false) { $keyList = 'main.' . $InfoFieldList [2] . ' as rowid'; } else { $keyList = $InfoFieldList [2] . ' as rowid'; @@ -247,10 +247,10 @@ class FormAdvTargetEmailing extends Form $sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1]; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0]; - if (! empty ( $InfoFieldList [3] )) { + if (! empty ($InfoFieldList [3])) { // We have to join on extrafield table - if (strpos ( $InfoFieldList [3], 'extra' ) !== false) { + if (strpos ($InfoFieldList [3], 'extra') !== false) { $sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra'; $sql .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3]; } else { @@ -270,13 +270,13 @@ class FormAdvTargetEmailing extends Form $i = 0; if ($num) { while ( $i < $num ) { - $obj = $this->db->fetch_object ( $resql ); - $labeltoshow = dol_trunc ( $obj->$InfoFieldList [1], 90 ); + $obj = $this->db->fetch_object ($resql); + $labeltoshow = dol_trunc ($obj->$InfoFieldList [1], 90); $options_array[$obj->rowid]=$labeltoshow; $i ++; } } - $this->db->free ( $resql ); + $this->db->free ($resql); } } @@ -328,7 +328,7 @@ class FormAdvTargetEmailing extends Form dol_print_error($this->db); } - return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array ); + return $this->advMultiselectarray ($htmlname, $options_array, $selected_array); } /** @@ -415,7 +415,7 @@ class FormAdvTargetEmailing extends Form dol_print_error($this->db); } - return $this->advMultiselectarray( $htmlname, $options_array, $selected_array ); + return $this->advMultiselectarray($htmlname, $options_array, $selected_array); } /** @@ -438,19 +438,19 @@ class FormAdvTargetEmailing extends Form $sql .= " WHERE type_element='$type_element'"; $sql .= " ORDER BY c.name"; - dol_syslog ( get_class ( $this ) . "::".__METHOD__, LOG_DEBUG ); - $resql = $this->db->query ( $sql ); + dol_syslog (get_class ($this) . "::".__METHOD__, LOG_DEBUG); + $resql = $this->db->query ($sql); if ($resql) { $out .= ''; } else { - dol_print_error ( $this->db ); + dol_print_error ($this->db); } - $this->db->free ( $resql ); + $this->db->free ($resql); return $out; } } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 5a0993a08d1..ac64f65381c 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -165,7 +165,7 @@ if (empty($reshook)) if ($object->id > 0) { if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) { //Get difference between old and new delivery date and change lines according to difference - $date_delivery = dol_mktime(12, 0, 0, + $date_delivery = dol_mktime(12, 0, 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int') @@ -173,7 +173,7 @@ if (empty($reshook)) if (!empty($object->date_livraison) && !empty($date_delivery)) { //Attempt to get the date without possible hour rounding errors - $old_date_delivery = dol_mktime(12, 0, 0, + $old_date_delivery = dol_mktime(12, 0, 0, dol_print_date($object->date_livraison, '%m'), dol_print_date($object->date_livraison, '%d'), dol_print_date($object->date_livraison, '%Y') @@ -724,7 +724,7 @@ if (empty($reshook)) { $lineId = intval($lineId); $originLine = new $lineClassName($db); - if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0) + if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) { $originLine->fetch_optionals($lineId); $desc = $originLine->desc; @@ -1895,7 +1895,7 @@ if ($action == 'create') { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); - $formquestion = array_merge($formquestion, array( +$formquestion = array_merge($formquestion, array( array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), )); } diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index ac0fc2ccd8c..59d294f19ef 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -665,7 +665,7 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->propal->classifyBilled(DolibarrApiAccess::$user ); + $result = $this->propal->classifyBilled(DolibarrApiAccess::$user); if ($result < 0) { throw new RestException(500, 'Error : '.$this->propal->error); } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 46a5352ed53..f660fd3c533 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -667,7 +667,7 @@ class Propal extends CommonObject { global $mysoc; - dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent, +dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1078,7 +1078,7 @@ class Propal extends CommonObject $vatrate = $line->tva_tx; if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')'; - $result = $this->addline( + $result = $this->addline( $line->desc, $line->subprice, $line->qty, diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 8f6c3fa84f5..45c10a3aedd 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1347,7 +1347,7 @@ if (empty($reshook)) { $lineId = intval($lineId); $originLine = new $lineClassName($db); - if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0) + if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) { $originLine->fetch_optionals($lineId); $desc = $originLine->desc; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index faad0e8f4d0..8272b2534bf 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -885,7 +885,7 @@ class Commande extends CommonOrder $vatrate = $line->tva_tx; if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')'; - $result = $this->addline( + $result = $this->addline( $line->desc, $line->subprice, $line->qty, diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 9c6d83e3dfe..fe017a6b1aa 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -290,7 +290,7 @@ if (($action == 'create' || $action == 'add') && !$error) $array_options = $lines[$i]->array_options; } - $result = $object->addline( + $result = $object->addline( $desc, $lines[$i]->subprice, $lines[$i]->qty, diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 84f6a4bacb1..1c7a0c977a8 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1614,7 +1614,7 @@ class Account extends CommonObject //Replace the old AccountNumber key with the new BankAccountNumber key $fieldlists = explode( ' ', - preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', + preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', $conf->global->BANK_SHOW_ORDER_OPTION) ); } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 5d6c1408a57..7b6e0f3f2fa 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -406,7 +406,7 @@ class PaymentVarious extends CommonObject $sign=1; if ($this->sens == '0') $sign=-1; - $bank_line_id = $acc->addline( + $bank_line_id = $acc->addline( $this->datep, $this->type_payment, $this->label, diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 8ff14a88f79..54e1d285f3e 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -463,7 +463,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) print "
"; - print load_fiche_titre( $langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, s.fk_bank, u.salary as current_salary,"; $sql.= " pct.code as payment_code,"; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 47ad635977e..80951464d7b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1449,7 +1449,7 @@ if (empty($reshook)) $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - $result = $object->addline( + $result = $object->addline( $desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, @@ -2118,7 +2118,7 @@ if (empty($reshook)) } } - $result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'), +$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'), $date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('progress'), $_POST['units'], $pu_ht_devise); @@ -2352,7 +2352,7 @@ if (empty($reshook)) { $lineId = intval($lineId); $originLine = new $lineClassName($db); - if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0) + if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) { $originLine->fetch_optionals($lineId); $desc = $originLine->desc; diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 555b6179677..62b89ea213b 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -337,7 +337,7 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $request_data = (object) $request_data; - $updateRes = $this->invoice->updateline( + $updateRes = $this->invoice->updateline( $lineid, $request_data->desc, $request_data->subprice, diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 3ee1a5fd977..8707b73262f 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -225,7 +225,7 @@ class FactureRec extends CommonInvoice $tva_tx = $facsrc->lines[$i]->tva_tx; if (! empty($facsrc->lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$facsrc->lines[$i]->vat_src_code.')'; - $result_insert = $this->addline( + $result_insert = $this->addline( $facsrc->lines[$i]->desc, $facsrc->lines[$i]->subprice, $facsrc->lines[$i]->qty, @@ -1858,7 +1858,7 @@ class FactureLigneRec extends CommonInvoiceLine } $sql.= ", rang=".$this->rang; $sql.= ", special_code=".$this->special_code; - $sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit )."'":"null"); + $sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit)."'":"null"); $sql.= ", fk_contract_line=".($this->fk_contract_line?$this->fk_contract_line:"null"); $sql.= " WHERE rowid = ".$this->id; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 96e6b649a69..8233a50aca3 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -675,7 +675,7 @@ class Facture extends CommonInvoice $vatrate = $line->tva_tx; if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')'; - $result = $this->addline( + $result = $this->addline( $line->desc, $line->subprice, $line->qty, @@ -749,7 +749,7 @@ class Facture extends CommonInvoice $localtax1_tx = $_facrec->lines[$i]->localtax1_tx; $localtax2_tx = $_facrec->lines[$i]->localtax2_tx; - $result_insert = $this->addline( + $result_insert = $this->addline( $_facrec->lines[$i]->desc, $_facrec->lines[$i]->subprice, $_facrec->lines[$i]->qty, diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 6fe0391d688..778c141ed18 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -855,7 +855,7 @@ if (empty($reshook)) // Update line if (! $error) { - $result = $object->updateline( +$result = $object->updateline( GETPOST('lineid'), $description, $pu_ht, diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 87301a4c9b6..0ec1cda8e10 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest') $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } - elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){ + elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE'){ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 3407da6adb3..71e7ef7194e 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -725,7 +725,7 @@ class Paiement extends CommonObject // Add link 'WithdrawalPayment' in bank_url if (! $error && $label == '(WithdrawalPayment)') { - $result=$acc->add_url_line( + $result=$acc->add_url_line( $bank_line_id, $this->id_prelevement, DOL_URL_ROOT.'/compta/prelevement/card.php?id=', diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 1e4dd5e5ef7..aad1d9d6e91 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -424,7 +424,7 @@ class PaymentSalary extends CommonObject // Insert payment into llx_bank // Add link 'payment_salary' in bank_url between payment and bank transaction - $bank_line_id = $acc->addline( + $bank_line_id = $acc->addline( $this->datep, $this->type_payment, $this->label, @@ -467,7 +467,7 @@ class PaymentSalary extends CommonObject $fuser->fetch($this->fk_user); // Add link 'user' in bank_url between operation and bank transaction - $result=$acc->add_url_line( + $result=$acc->add_url_line( $bank_line_id, $this->fk_user, DOL_URL_ROOT.'/user/card.php?id=', diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 675783ba107..fffb63055aa 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -321,7 +321,7 @@ if ($modecompta == 'CREANCES-DETTES') // Array header print ""; - print_liste_field_titre( +print_liste_field_titre( $langs->trans("Product"), $_SERVER["PHP_SELF"], "ref", @@ -331,7 +331,7 @@ if ($modecompta == 'CREANCES-DETTES') $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans('Quantity'), $_SERVER["PHP_SELF"], "qty", @@ -341,7 +341,7 @@ if ($modecompta == 'CREANCES-DETTES') $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans("Percentage"), $_SERVER["PHP_SELF"], "qty", @@ -351,7 +351,7 @@ if ($modecompta == 'CREANCES-DETTES') $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans('AmountHT'), $_SERVER["PHP_SELF"], "amount", @@ -361,7 +361,7 @@ if ($modecompta == 'CREANCES-DETTES') $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans("AmountTTC"), $_SERVER["PHP_SELF"], "amount_ttc", @@ -371,7 +371,7 @@ if ($modecompta == 'CREANCES-DETTES') $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans("Percentage"), $_SERVER["PHP_SELF"], "amount_ttc", diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 13a2036a5d7..03eab8be202 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -378,10 +378,10 @@ if (! $error && $massaction == 'confirm_presend') $parameters=array('mode'=>'formemail'); - if ( ! empty( $listofobjectthirdparties ) ) { + if ( ! empty($listofobjectthirdparties) ) { $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; } - if ( ! empty( $listofobjectref ) ) { + if ( ! empty($listofobjectref) ) { $parameters['listofobjectref'] = $listofobjectref; } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index c46c40999f5..c64b408336c 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1292,21 +1292,20 @@ class CMailFile dol_syslog("Try socket connection to host=".$host." port=".$port); //See if we can connect to the SMTP server - if ($socket = @fsockopen( + if ($socket = @fsockopen( $host, // Host to test, IP or domain. Add ssl:// for SSL/TLS. $port, // which Port number to use $errno, // actual system level error $errstr, // and any text that goes with the error - $timeout - )) // timeout for reading/writing data over the socket - { + $timeout // timeout for reading/writing data over the socket + )) { // Windows still does not have support for this timeout function if (function_exists('stream_set_timeout')) stream_set_timeout($socket, $timeout, 0); dol_syslog("Now we wait for answer 220"); // Check response from Server - if ( $_retVal = $this->server_parse($socket, "220") ) $_retVal = $socket; + if ($_retVal = $this->server_parse($socket, "220")) $_retVal = $socket; } else { diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 42d138402e9..235dde63096 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -882,7 +882,7 @@ abstract class CommonDocGenerator // Sorting - uasort ( $this->cols, array( $this, 'columnSort' ) ); + uasort ($this->cols, array( $this, 'columnSort' )); // Positionning $curX = $this->page_largeur-$this->marge_droite; // start from right @@ -899,7 +899,7 @@ abstract class CommonDocGenerator if(!empty($colDef['scale'])){ // In case of column widht is defined by percentage - $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100 ); + $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100); } if(empty($colDef['width'])){ @@ -1049,7 +1049,7 @@ abstract class CommonDocGenerator if(empty($columnText)) return; $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $colDef = $this->cols[$colKey]; - $pdf->writeHTMLCell( $this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']); + $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']); } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7fe050d8c59..1f86d60598c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7183,8 +7183,8 @@ abstract class CommonObject if (! $error) { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; - $sql.= ' ('.implode( ", ", $keys ).')'; - $sql.= ' VALUES ('.implode( ", ", $values ).')'; + $sql.= ' ('.implode(", ", $keys).')'; + $sql.= ' VALUES ('.implode(", ", $values).')'; $res = $this->db->query($sql); if ($res===false) { @@ -7312,7 +7312,7 @@ abstract class CommonObject }*/ } - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode( ',', $tmp ).' WHERE rowid='.$this->id ; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id ; $this->db->begin(); if (! $error) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 973bfe961b8..921878aef73 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1346,11 +1346,11 @@ class ExtraFields // Init des compteurs $nbPregRepl = $nbPregSel = 0; // On retire toutes les parenthèses sans = avant - $InfoFieldList[4]=preg_replace( '#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl); + $InfoFieldList[4]=preg_replace('#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl); // On retire les espaces autour des = et parenthèses $InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]); // On retire toutes les parenthèses avec = avant - $InfoFieldList[4]=preg_replace( '#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel); + $InfoFieldList[4]=preg_replace('#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel); // On retire les espaces autour des = et parenthèses $InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]); diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 64b67263335..b0c5a09d611 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -145,7 +145,7 @@ class HookManager // Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray). $hooktype='output'; - if (in_array( +if (in_array( $method, array( 'addCalendarChoice', diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3ed57a60aec..3ec30615bce 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1526,7 +1526,7 @@ class Form 'showsoc'=>$showsoc, ); - $reshook = $hookmanager->executeHooks( 'afterSelectContactOptions', $parameters, $this, $action ); // Note that $action and $object may have been modified by some hooks + $reshook = $hookmanager->executeHooks('afterSelectContactOptions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($htmlname != 'none' && ! $options_only) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9bf04b4ee1e..bfd84a1795e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1722,7 +1722,7 @@ class FormFile print '
' . $langs->trans("CustomersCategoriesShort") . ''; - print $form->showCategories( $object->id, 'customer', 1 ); + print $form->showCategories($object->id, 'customer', 1); print "
'; print ''; - print_liste_field_titre( +print_liste_field_titre( $langs->trans("Links"), $_SERVER['PHP_SELF'], "name", @@ -1732,7 +1732,7 @@ class FormFile $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( "", "", "", @@ -1740,7 +1740,7 @@ class FormFile "", 'class="right"' ); - print_liste_field_titre( +print_liste_field_titre( $langs->trans("Date"), $_SERVER['PHP_SELF'], "date", @@ -1750,7 +1750,7 @@ class FormFile $sortfield, $sortorder ); - print_liste_field_titre( +print_liste_field_titre( '', $_SERVER['PHP_SELF'], "", diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 06fd860a560..752d2406ea4 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -426,12 +426,11 @@ class FormMail extends Form $out.= ''; $out.= '   '; $out.= ''; - } - elseif (! empty($this->param['models']) && in_array($this->param['models'], array( + } elseif (! empty($this->param['models']) && in_array($this->param['models'], array( 'propal_send','order_send','facture_send', 'shipping_send','fichinter_send','supplier_proposal_send','order_supplier_send', 'invoice_supplier_send','thirdparty','contract','user','all' - ))) + ))) { // If list of template is empty $out.= '
'."\n"; diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 4404e5563d3..765f7d00d79 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -90,7 +90,7 @@ class FormProjets $selected_input_value=$project->ref; } $urloption='socid='.$socid.'&htmlname='.$htmlname.'&discardclosed='.$discard_closed; - $out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array( +$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array( // 'update' => array( // 'projectid' => 'id' // ) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 85e0059c22c..772b3db29e3 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -530,7 +530,7 @@ class Notify if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message']; } - $mailfile = new CMailFile( + $mailfile = new CMailFile( $subject, $sendto, $replyto, @@ -758,7 +758,7 @@ class Notify if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject']; if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message']; } - $mailfile = new CMailFile( + $mailfile = new CMailFile( $subject, $sendto, $replyto, diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 61c8f2a4bed..f59ad79c430 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -377,14 +377,13 @@ class SMTPs else { //See if we can connect to the SMTP server - if ($this->socket = @fsockopen( + if ($this->socket = @fsockopen( preg_replace('@tls://@i', '', $this->getHost()), // Host to 'hit', IP or domain $this->getPort(), // which Port number to use $this->errno, // actual system level error $this->errstr, // and any text that goes with the error - $this->_smtpTimeout - )) // timeout for reading/writing data over the socket - { + $this->_smtpTimeout // timeout for reading/writing data over the socket + )) { // Fix from PHP SMTP class by 'Chris Ryan' // Sometimes the SMTP server takes a little longer to respond // so we will give it a longer timeout for the first read @@ -990,7 +989,7 @@ class SMTPs $aryHost = $this->_msgRecipients; // Only run this if we have something - if ( !empty ($_addrList )) + if ( !empty ($_addrList)) { // $_addrList can be a STRING or an array if ( is_string($_addrList) ) diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index 72722a1a948..9f202644238 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -93,7 +93,7 @@ function SendError($number, $text) if ( $_GET['Command'] == 'FileUpload' ) SendUploadResults($number, "", "", $text); - if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) + if ( isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent'] ) { SendErrorNode($number, $text); CreateXmlFooter(); diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index cf7caa6dc2b..f54fcc61c0d 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -140,7 +140,7 @@ function CreateFolder($resourceType, $currentFolder) $sErrorNumber = '0' ; $sErrorMsg = '' ; - if ( isset( $_GET['NewFolderName'] ) ) + if ( isset($_GET['NewFolderName']) ) { $sNewFolderName = $_GET['NewFolderName'] ; $sNewFolderName = SanitizeFolderName($sNewFolderName); @@ -202,7 +202,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') $sErrorNumber = '0' ; $sFileName = '' ; - if ( isset( $_FILES['NewFile'] ) && !is_null($_FILES['NewFile']['tmp_name']) + if ( isset($_FILES['NewFile']) && !is_null($_FILES['NewFile']['tmp_name']) // This is for the QuickUpload tab box or (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name']))) { @@ -223,7 +223,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') $sExtension = substr($sFileName, (strrpos($sFileName, '.') + 1)); $sExtension = strtolower($sExtension); - if ( isset( $Config['SecureImageUploads'] ) ) + if ( isset($Config['SecureImageUploads']) ) { if ( ( $isImageValid = IsImageValid($oFile['tmp_name'], $sExtension) ) === false ) { @@ -231,7 +231,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') } } - if ( isset( $Config['HtmlExtensions'] ) ) + if ( isset($Config['HtmlExtensions']) ) { if (!IsHtmlExtension($sExtension, $Config['HtmlExtensions']) && ($detectHtml = DetectHtml($oFile['tmp_name'])) === true) @@ -261,13 +261,13 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') if ( is_file($sFilePath) ) { - if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) + if ( isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload'] ) { break ; } $permissions = '0777'; - if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) + if ( isset($Config['ChmodOnUpload']) && $Config['ChmodOnUpload'] ) { $permissions = (string) $Config['ChmodOnUpload'] ; } @@ -285,12 +285,12 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') if ( file_exists($sFilePath) ) { //previous checks failed, try once again - if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false ) + if ( isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false ) { @unlink($sFilePath); $sErrorNumber = '202' ; } - elseif ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) + elseif ( isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true ) { @unlink($sFilePath); $sErrorNumber = '202' ; @@ -318,7 +318,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') else { //issue the CKEditor Callback - SendCKEditorResults( +SendCKEditorResults( $CKEcallback, $sFileUrl, ($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful') diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.php b/htdocs/core/filemanagerdol/connectors/php/connector.php index 2f3c6f64388..12eea88b5c0 100644 --- a/htdocs/core/filemanagerdol/connectors/php/connector.php +++ b/htdocs/core/filemanagerdol/connectors/php/connector.php @@ -45,7 +45,7 @@ function DoResponse() if (!isset($_GET)) { global $_GET; } - if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) ) + if ( !isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder']) ) return; // Get the main request informaiton. diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 505d790935c..76bcf6250ae 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -175,14 +175,14 @@ function CreateServerFolder($folderPath, $lastFolder = null) // Enable error tracking to catch the error. ini_set('track_errors', '1'); - if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] ) + if ( isset($Config['ChmodOnFolderCreate']) && !$Config['ChmodOnFolderCreate'] ) { mkdir($folderPath); } else { $permissions = '0777'; - if ( isset( $Config['ChmodOnFolderCreate'] ) && $Config['ChmodOnFolderCreate']) + if ( isset($Config['ChmodOnFolderCreate']) && $Config['ChmodOnFolderCreate']) { $permissions = (string) $Config['ChmodOnFolderCreate']; } @@ -315,7 +315,7 @@ function GetCurrentFolder() if (!isset($_GET)) { global $_GET; } - $sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? GETPOST('CurrentFolder', '', 1) : '/' ; + $sCurrentFolder = isset($_GET['CurrentFolder']) ? GETPOST('CurrentFolder', '', 1) : '/' ; // Check the current folder syntax (must begin and start with a slash). if (!preg_match('|/$|', $sCurrentFolder)) diff --git a/htdocs/core/filemanagerdol/connectors/php/upload.php b/htdocs/core/filemanagerdol/connectors/php/upload.php index 3e019e38062..7527847cf19 100644 --- a/htdocs/core/filemanagerdol/connectors/php/upload.php +++ b/htdocs/core/filemanagerdol/connectors/php/upload.php @@ -47,7 +47,7 @@ if ( !$Config['Enabled'] ) $sCommand = 'QuickUpload' ; // The file type (from the QueryString, by default 'File'). -$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ; +$sType = isset($_GET['Type']) ? $_GET['Type'] : 'File' ; $sCurrentFolder = "/" ; diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 18efdd0da70..96f4bba5c40 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -136,7 +136,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit) $interval = new DateInterval($deltastring); if($sub) $date->sub($interval); - else $date->add( $interval ); + else $date->add($interval); return $date->getTimestamp(); } @@ -809,7 +809,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', // Easter sunday // Monday after easter - $date_eastermonday = mktime( + $date_eastermonday = mktime( date("H", $date_paques), date("i", $date_paques), date("s", $date_paques), @@ -823,7 +823,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', // Easter monday // Christi Himmelfahrt (39 days after easter sunday) - $date_ch = mktime( + $date_ch = mktime( date("H", $date_paques), date("i", $date_paques), date("s", $date_paques), @@ -837,7 +837,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', // Christi Himmelfahrt // Pfingsten (50 days after easter sunday) - $date_pentecote = mktime( + $date_pentecote = mktime( date("H", $date_paques), date("i", $date_paques), date("s", $date_paques), @@ -851,7 +851,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', // Pfingsten // Fronleichnam (60 days after easter sunday) - $date_fronleichnam = mktime( + $date_fronleichnam = mktime( date("H", $date_paques), date("i", $date_paques), date("s", $date_paques), diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 67217f9837f..b00ce5e54ad 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13,7 +13,7 @@ * Copyright (C) 2014 Cédric GROSS * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -843,7 +843,7 @@ function dol_string_unaccent($str) else { // See http://www.ascii-code.com/ - $string = strtr( +$string = strtr( $str, "\xC0\xC1\xC2\xC3\xC4\xC5\xC7 \xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1 @@ -2969,12 +2969,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $picto .= '.png'; } $fullpathpicto = $picto; - } - else { + } else { $pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) - if (empty($srconly) && in_array($pictowithoutext, array( + if (empty($srconly) && in_array($pictowithoutext, array( 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'note', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', 'jabber','skype','twitter','facebook' @@ -5247,7 +5246,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart) // We will enhance here a common way of forging path for document storage // Here, object->id, object->ref and modulepart are required. //var_dump($modulepart); - if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice', + if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice', 'supplier_order','supplier_proposal','shipment','contract','expensereport'))) { $path=($object->ref?$object->ref:$object->id); @@ -5306,7 +5305,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = null) umask(0); $dirmaskdec=octdec($newmask); if (empty($newmask)) { - $dirmaskdec = empty( $conf->global->MAIN_UMASK ) ? octdec( '0755' ) : octdec( $conf->global->MAIN_UMASK ); + $dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK); } $dirmaskdec |= octdec('0111'); // Set x bit required for directories if (! @mkdir($ccdir_osencoded, $dirmaskdec)) @@ -5792,7 +5791,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, // Add SIGNATURE into substitutionarray first, so, when we will make the substitution, // this will include signature content first and then replace var found into content of signature $signature = $user->signature; - $substitutionarray=array_merge($substitutionarray, array( +$substitutionarray=array_merge($substitutionarray, array( '__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '') ) ); @@ -5802,7 +5801,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : ''); } - $substitutionarray=array_merge($substitutionarray, array( +$substitutionarray=array_merge($substitutionarray, array( '__USER_ID__' => (string) $user->id, '__USER_LOGIN__' => (string) $user->login, '__USER_LASTNAME__' => (string) $user->lastname, @@ -5815,7 +5814,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, } if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc)) { - $substitutionarray=array_merge($substitutionarray, array( +$substitutionarray=array_merge($substitutionarray, array( '__MYCOMPANY_NAME__' => $mysoc->name, '__MYCOMPANY_EMAIL__' => $mysoc->email, '__MYCOMPANY_PROFID1__' => $mysoc->idprof1, @@ -6072,7 +6071,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $tmp5=dol_get_next_month($tmp['mon'], $tmp['year']); - $substitutionarray=array_merge($substitutionarray, array( +$substitutionarray=array_merge($substitutionarray, array( '__DAY__' => (string) $tmp['mday'], '__DAY_TEXT__' => $outputlangs->trans('Day'.$tmp['wday']), // Monday '__DAY_TEXT_SHORT__' => $outputlangs->trans($tmp['weekday'].'Min'), // Mon diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 1c0d2556b3f..7ffc09625a3 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2318,7 +2318,7 @@ function getModuleDirForApiClass($module) */ function random_color_part($min = 0, $max = 255) { - return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT); + return str_pad(dechex(mt_rand($min, $max)), 2, '0', STR_PAD_LEFT); } /* diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index c6b27a3e2eb..b275025084a 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -273,7 +273,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' if ($val['default'] != '') { if (preg_match('/^null$/i', $val['default'])) $texttoinsert.= " DEFAULT NULL"; - elseif (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; + elseif (preg_match('/varchar/', $type)) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'"; else $texttoinsert.= (($val['default'] > 0)?' DEFAULT '.$val['default']:''); } } diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 9c2d25819c3..399983dbd16 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -124,7 +124,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $invoicefieldref='ref'; } - if ( strpos( $type, 'localtax' ) === 0 ) { + if ( strpos($type, 'localtax') === 0 ) { $f_rate = $type . '_tx'; } else { $f_rate = 'tva_tx'; @@ -593,7 +593,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $invoicefieldref='ref'; } - if ( strpos( $type, 'localtax' ) === 0 ) { + if ( strpos($type, 'localtax') === 0 ) { $f_rate = $type . '_tx'; } else { $f_rate = 'tva_tx'; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 5f77d6e2de7..4196022b854 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -339,7 +339,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->commande->dir_temp, diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index d825b014f68..7f64765009d 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1228,7 +1228,7 @@ class pdf_eratosthene extends ModelePDFCommandes if (empty($hidetop)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] ); + $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); $textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1]; $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index d9c7b041c7f..74ab8b04fc9 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -343,7 +343,7 @@ class doc_generic_contract_odt extends ModelePDFContract // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->contrat->dir_temp, diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 77ea8d01fe0..2fa786f096e 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -337,7 +337,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->expedition->dir_temp, diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index ac61582c7bb..e154b06943e 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -601,7 +601,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalttc, 4, price($object->lines[$linenumber]->total_ttc), 0, 'R'); // Comments - $pdf->SetXY($this->posxcomment, $curY ); + $pdf->SetXY($this->posxcomment, $curY); $comment = $outputlangs->trans("Date").':'. dol_print_date($object->lines[$linenumber]->date, "day", false, $outputlangs).' '; $comment .= $outputlangs->trans("Type").':'. $expensereporttypecodetoshow.'
'; if (! empty($object->lines[$linenumber]->projet_ref)) { diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index dc8e65a9b0f..136f75f56cf 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -344,7 +344,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->facture->dir_temp, diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 098ef40ff4a..41d65e6b0bc 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1519,7 +1519,7 @@ class pdf_sponge extends ModelePDFFactures if (empty($hidetop)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] ); + $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); $textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1]; $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 2524cf8f128..68aad4e3533 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -44,7 +44,7 @@ class modHRM extends DolibarrModules $this->family = "hr"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace( '/^mod/i', '', get_class($this)); + $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Management of employees carrier and feelings (department, employment contract)"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index fa4b131c056..8676f002757 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -438,7 +438,7 @@ class modProduct extends DolibarrModules if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR')); if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); - $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array( +$this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array( 'sp.price'=>"PriceQtyMinHT*", 'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent'=>'DiscountQtyMin' diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index eeb99cdc883..ed50ebaa870 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -95,7 +95,7 @@ class printing_printgcp extends PrintingDriver $storage = new DoliStorage($this->db, $this->conf); //$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE); // Setup the credentials for the requests - $credentials = new Credentials( + $credentials = new Credentials( $this->google_id, $this->google_secret, $urlwithroot.'/core/modules/oauth/google_oauthcallback.php' diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 59b102ecfe7..f713b3a2a53 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -357,7 +357,7 @@ class doc_generic_product_odt extends ModelePDFProduct // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->produit->dir_temp, diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index af19b93835f..71435faafc7 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -677,7 +677,7 @@ class pdf_standard extends ModelePDFProduct $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', + $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); } } diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index edb3828ff41..22003125439 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -588,7 +588,7 @@ class doc_generic_project_odt extends ModelePDFProjects // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->projet->dir_temp, diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 80bd4958932..fefaefc426c 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -515,7 +515,7 @@ class doc_generic_task_odt extends ModelePDFTask // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->projet->dir_temp, diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index bedcefb5d9c..7620b923b9d 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -369,7 +369,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity], diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 369c63fdf53..cba9d951fb6 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1398,7 +1398,7 @@ class pdf_cyan extends ModelePDFPropales if (empty($hidetop)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] ); + $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); $textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1]; $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 3b269513e76..fb93998ef84 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -318,7 +318,7 @@ class doc_generic_reception_odt extends ModelePdfReception // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->reception->dir_temp, diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 556a711479b..4ded1d5391a 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -265,7 +265,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity], diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 2cfec34bcf8..c28751e9074 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -357,7 +357,7 @@ class doc_generic_stock_odt extends ModelePDFStock // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->produit->dir_temp, diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 76fdf7c8219..c7f2a2b969e 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -909,7 +909,7 @@ class pdf_standard extends ModelePDFStock if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', +$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C'); } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 287fbb9753b..f30b696db67 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -365,7 +365,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->supplier_proposal->dir_temp, diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 9fb7ac18d31..2ace83b4e55 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -1244,7 +1244,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', + $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); } } diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 67dde2b7efa..9e018a4d6c6 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -331,7 +331,7 @@ class doc_generic_user_odt extends ModelePDFUser // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->user->dir_temp, diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index fc0992ea5b1..c14a1953042 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -353,7 +353,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->user->dir_temp, diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index a750481a3d1..ea5b6e06e4d 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -146,7 +146,7 @@ print '