@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
273 | 273 | $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
274 | 274 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
275 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int)$conf->entity); |
|
275 | + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
276 | 276 | } |
277 | 277 | if (getDolGlobalString('EXPORTTOOL_CATEGORIES')) { |
278 | 278 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN ' . MAIN_DB_PREFIX . 'categorie as cat ON cp.fk_categorie = cat.rowid'; |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
422 | 422 | $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
423 | 423 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
424 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int)$conf->entity); |
|
424 | + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity); |
|
425 | 425 | } |
426 | 426 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_extrafields as extra ON p.rowid = extra.fk_object,'; |
427 | 427 | $this->export_sql_end[$r] .= ' ' . MAIN_DB_PREFIX . 'product_association as pa, ' . MAIN_DB_PREFIX . 'product as p2'; |
@@ -248,8 +248,8 @@ |
||
248 | 248 | } |
249 | 249 | |
250 | 250 | $sql = array( |
251 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'contract' AND entity = " . ((int)$conf->entity), |
|
252 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "', 'contract', " . ((int)$conf->entity) . ")" |
|
251 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'contract' AND entity = " . ((int) $conf->entity), |
|
252 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "', 'contract', " . ((int) $conf->entity) . ")" |
|
253 | 253 | ); |
254 | 254 | |
255 | 255 | return $this->_init($sql, $options); |
@@ -163,7 +163,7 @@ |
||
163 | 163 | 'priority' => 61, |
164 | 164 | 'label' => 'MutltiCurrencyAutoUpdateCurrencies', |
165 | 165 | 'jobtype' => 'method', |
166 | - 'class' => 'multicurrency/class/multicurrency.class.php', // TODO: Review. Is correct? The file no longer exists! |
|
166 | + 'class' => 'multicurrency/class/multicurrency.class.php', // TODO: Review. Is correct? The file no longer exists! |
|
167 | 167 | 'objectname' => 'MultiCurrency', |
168 | 168 | 'method' => 'syncRates', |
169 | 169 | 'parameters' => '0,0,cron', |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facturedet_extrafields as extra2 on fd.rowid = extra2.fk_object'; |
657 | 657 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product as p on (fd.fk_product = p.rowid)'; |
658 | 658 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
659 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int)$conf->entity); |
|
659 | + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
660 | 660 | } |
661 | 661 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_extrafields as extra3 on p.rowid = extra3.fk_object'; |
662 | 662 | $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'accounting_account as aa on fd.fk_code_ventilation = aa.rowid'; |
@@ -793,8 +793,8 @@ discard block |
||
793 | 793 | } |
794 | 794 | |
795 | 795 | $sql = array( |
796 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'invoice' AND entity = " . ((int)$conf->entity), |
|
797 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "','invoice'," . ((int)$conf->entity) . ")" |
|
796 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'invoice' AND entity = " . ((int) $conf->entity), |
|
797 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "','invoice'," . ((int) $conf->entity) . ")" |
|
798 | 798 | ); |
799 | 799 | |
800 | 800 | return $this->_init($sql, $options); |
@@ -266,8 +266,8 @@ |
||
266 | 266 | $this->remove($options); |
267 | 267 | |
268 | 268 | $sql = array( |
269 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = 'standard' AND type='expensereport' AND entity = " . ((int)$conf->entity), |
|
270 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('standard','expensereport'," . ((int)$conf->entity) . ")" |
|
269 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = 'standard' AND type='expensereport' AND entity = " . ((int) $conf->entity), |
|
270 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('standard','expensereport'," . ((int) $conf->entity) . ")" |
|
271 | 271 | ); |
272 | 272 | |
273 | 273 | return $this->_init($sql, $options); |
@@ -436,7 +436,7 @@ |
||
436 | 436 | 'linkedObjectsIds', |
437 | 437 | 'linkedObjects', |
438 | 438 | 'fk_delivery_address', |
439 | - 'projet', // There is already ->fk_project |
|
439 | + 'projet', // There is already ->fk_project |
|
440 | 440 | 'restrictiononfksoc', |
441 | 441 | 'specimen', |
442 | 442 | ); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | global $conf; |
126 | 126 | |
127 | - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "multicurrency WHERE code = '" . $dbs->escape($code) . "' AND entity = " . ((int)$conf->entity); |
|
127 | + $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "multicurrency WHERE code = '" . $dbs->escape($code) . "' AND entity = " . ((int) $conf->entity); |
|
128 | 128 | |
129 | 129 | dol_syslog(__METHOD__, LOG_DEBUG); |
130 | 130 | $resql = $dbs->query($sql); |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | |
199 | 199 | if ($multicurrency_tx) { |
200 | 200 | if ($way == 'dolibarr') { |
201 | - return (float)price2num($amount * $multicurrency_tx, 'MU'); |
|
201 | + return (float) price2num($amount * $multicurrency_tx, 'MU'); |
|
202 | 202 | } else { |
203 | - return (float)price2num($amount / $multicurrency_tx, 'MU'); |
|
203 | + return (float) price2num($amount / $multicurrency_tx, 'MU'); |
|
204 | 204 | } |
205 | 205 | } else { |
206 | 206 | return false; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | { |
219 | 219 | global $db; |
220 | 220 | |
221 | - $sql = "SELECT multicurrency_tx FROM " . MAIN_DB_PREFIX . $table . " WHERE rowid = " . ((int)$fk_facture); |
|
221 | + $sql = "SELECT multicurrency_tx FROM " . MAIN_DB_PREFIX . $table . " WHERE rowid = " . ((int) $fk_facture); |
|
222 | 222 | |
223 | 223 | dol_syslog(__METHOD__, LOG_DEBUG); |
224 | 224 | $resql = $db->query($sql); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element . " SET"; |
259 | 259 | $sql .= " name = '" . $this->db->escape($this->name) . "',"; |
260 | 260 | $sql .= " code = '" . $this->db->escape($this->code) . "'"; |
261 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
261 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
262 | 262 | |
263 | 263 | $this->db->begin(); |
264 | 264 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . $this->table_element; |
322 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
322 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
323 | 323 | |
324 | 324 | dol_syslog(__METHOD__, LOG_DEBUG); |
325 | 325 | $resql = $this->db->query($sql); |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | if (!empty($code)) { |
480 | 480 | $sql .= ' WHERE c.code = \'' . $this->db->escape($code) . '\' AND c.entity = ' . $conf->entity; |
481 | 481 | } else { |
482 | - $sql .= ' WHERE c.rowid = ' . ((int)$id); |
|
482 | + $sql .= ' WHERE c.rowid = ' . ((int) $id); |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | dol_syslog(__METHOD__, LOG_DEBUG); |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | { |
525 | 525 | $sql = "SELECT cr.rowid"; |
526 | 526 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element_line . ' as cr'; |
527 | - $sql .= ' WHERE cr.fk_multicurrency = ' . ((int)$this->id); |
|
527 | + $sql .= ' WHERE cr.fk_multicurrency = ' . ((int) $this->id); |
|
528 | 528 | $sql .= ' ORDER BY cr.date_sync DESC'; |
529 | 529 | |
530 | 530 | $this->rates = array(); |
@@ -560,8 +560,8 @@ discard block |
||
560 | 560 | { |
561 | 561 | $sql = "SELECT cr.rowid"; |
562 | 562 | $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element_line . " as cr"; |
563 | - $sql .= " WHERE cr.fk_multicurrency = " . ((int)$this->id); |
|
564 | - $sql .= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM " . MAIN_DB_PREFIX . $this->table_element_line . " AS cr2 WHERE cr2.fk_multicurrency = " . ((int)$this->id) . ")"; |
|
563 | + $sql .= " WHERE cr.fk_multicurrency = " . ((int) $this->id); |
|
564 | + $sql .= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM " . MAIN_DB_PREFIX . $this->table_element_line . " AS cr2 WHERE cr2.fk_multicurrency = " . ((int) $this->id) . ")"; |
|
565 | 565 | |
566 | 566 | dol_syslog(__METHOD__, LOG_DEBUG); |
567 | 567 | $resql = $this->db->query($sql); |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | global $user; |
596 | 596 | |
597 | 597 | $currencyRate = new CurrencyRate($this->db); |
598 | - $currencyRate->rate = (float)price2num($rate); |
|
598 | + $currencyRate->rate = (float) price2num($rate); |
|
599 | 599 | |
600 | 600 | if ($currencyRate->create($user, $this->id) > 0) { |
601 | 601 | $this->rate = $currencyRate; |
@@ -643,9 +643,9 @@ discard block |
||
643 | 643 | $sql .= ') VALUES ('; |
644 | 644 | $sql .= " '" . $this->db->escape($this->code) . "',"; |
645 | 645 | $sql .= " '" . $this->db->escape($this->name) . "',"; |
646 | - $sql .= " " . ((int)$this->entity) . ","; |
|
646 | + $sql .= " " . ((int) $this->entity) . ","; |
|
647 | 647 | $sql .= " '" . $this->db->idate($now) . "',"; |
648 | - $sql .= " " . ((int)$user->id); |
|
648 | + $sql .= " " . ((int) $user->id); |
|
649 | 649 | $sql .= ')'; |
650 | 650 | |
651 | 651 | $this->db->begin(); |
@@ -2663,6 +2663,8 @@ |
||
2663 | 2663 | $this->dictionaries['tab' . $field][] = $dictionaryArray[$field]; |
2664 | 2664 | } |
2665 | 2665 | } |
2666 | - if ($langs && !in_array($langs, $this->dictionaries[$langs])) $this->dictionaries['langs'][] = $langs; |
|
2666 | + if ($langs && !in_array($langs, $this->dictionaries[$langs])) { |
|
2667 | + $this->dictionaries['langs'][] = $langs; |
|
2668 | + } |
|
2667 | 2669 | } |
2668 | 2670 | } |
@@ -555,9 +555,9 @@ discard block |
||
555 | 555 | |
556 | 556 | // If the module is active |
557 | 557 | foreach ($this->rights as $key => $value) { |
558 | - $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
558 | + $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
559 | 559 | $r_label = $this->rights[$key][self::KEY_LABEL]; |
560 | - $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
560 | + $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
561 | 561 | $r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0; |
562 | 562 | $r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? ''; |
563 | 563 | $r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? ''; |
@@ -585,8 +585,8 @@ discard block |
||
585 | 585 | |
586 | 586 | // Search if perm already present |
587 | 587 | $sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "rights_def"; |
588 | - $sql .= " WHERE entity = " . ((int)$entity); |
|
589 | - $sql .= " AND id = " . ((int)$r_id); |
|
588 | + $sql .= " WHERE entity = " . ((int) $entity); |
|
589 | + $sql .= " AND id = " . ((int) $r_id); |
|
590 | 590 | |
591 | 591 | $resqlselect = $this->db->query($sql); |
592 | 592 | if ($resqlselect) { |
@@ -598,19 +598,19 @@ discard block |
||
598 | 598 | $sql .= ", libelle"; |
599 | 599 | $sql .= ", module"; |
600 | 600 | $sql .= ", module_origin"; |
601 | - $sql .= ", type"; // TODO deprecated |
|
601 | + $sql .= ", type"; // TODO deprecated |
|
602 | 602 | $sql .= ", bydefault"; |
603 | 603 | $sql .= ", perms"; |
604 | 604 | $sql .= ", subperms"; |
605 | 605 | $sql .= ", enabled"; |
606 | 606 | $sql .= ") VALUES ("; |
607 | - $sql .= ((int)$r_id); |
|
608 | - $sql .= ", " . ((int)$entity); |
|
607 | + $sql .= ((int) $r_id); |
|
608 | + $sql .= ", " . ((int) $entity); |
|
609 | 609 | $sql .= ", '" . $this->db->escape($r_label) . "'"; |
610 | 610 | $sql .= ", '" . $this->db->escape($r_module) . "'"; |
611 | 611 | $sql .= ", '" . $this->db->escape($r_module_origin) . "'"; |
612 | - $sql .= ", '" . $this->db->escape($r_type) . "'"; // TODO deprecated |
|
613 | - $sql .= ", " . ((int)$r_default); |
|
612 | + $sql .= ", '" . $this->db->escape($r_type) . "'"; // TODO deprecated |
|
613 | + $sql .= ", " . ((int) $r_default); |
|
614 | 614 | $sql .= ", '" . $this->db->escape($r_perms) . "'"; |
615 | 615 | $sql .= ", '" . $this->db->escape($r_subperms) . "'"; |
616 | 616 | $sql .= ", '" . $this->db->escape($r_enabled) . "'"; |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | } |
847 | 847 | |
848 | 848 | // Run complementary sql requests |
849 | - $num = count((array)$array_sql); |
|
849 | + $num = count((array) $array_sql); |
|
850 | 850 | for ($i = 0; $i < $num; $i++) { |
851 | 851 | if (!$err) { |
852 | 852 | dol_syslog(get_only_class($this) . "::_remove", LOG_DEBUG); |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | $moduleNameInConf = 'supplier_proposal'; |
872 | 872 | } |
873 | 873 | |
874 | - unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
874 | + unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
875 | 875 | |
876 | 876 | return 1; |
877 | 877 | } else { |
@@ -1050,7 +1050,7 @@ discard block |
||
1050 | 1050 | |
1051 | 1051 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "boxes_def"; |
1052 | 1052 | $sql .= " WHERE file = '" . $this->db->escape($file) . "'"; |
1053 | - $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1053 | + $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1054 | 1054 | |
1055 | 1055 | dol_syslog(get_only_class($this) . "::delete_boxes", LOG_DEBUG); |
1056 | 1056 | $resql = $this->db->query($sql); |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | |
1114 | 1114 | // Delete all entities if core module |
1115 | 1115 | if (empty($this->core_enabled)) { |
1116 | - $sql .= " AND entity = " . ((int)$conf->entity); |
|
1116 | + $sql .= " AND entity = " . ((int) $conf->entity); |
|
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | dol_syslog(get_only_class($this) . "::delete_permissions", LOG_DEBUG); |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | |
1143 | 1143 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "menu"; |
1144 | 1144 | $sql .= " WHERE module = '" . $this->db->escape($module) . "'"; |
1145 | - $sql .= " AND menu_handler = 'all'"; // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria' |
|
1145 | + $sql .= " AND menu_handler = 'all'"; // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria' |
|
1146 | 1146 | $sql .= " AND entity IN (0, " . $conf->entity . ")"; |
1147 | 1147 | |
1148 | 1148 | dol_syslog(get_only_class($this) . "::delete_menus", LOG_DEBUG); |
@@ -1196,7 +1196,7 @@ discard block |
||
1196 | 1196 | if ($pathoffile) { // Mostly for external modules |
1197 | 1197 | $content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb |
1198 | 1198 | |
1199 | - if ((float)DOL_VERSION >= 6.0) { |
|
1199 | + if ((float) DOL_VERSION >= 6.0) { |
|
1200 | 1200 | @include_once DOL_DOCUMENT_ROOT . '/core/lib/parsemd.lib.php'; |
1201 | 1201 | |
1202 | 1202 | $content = dolMd2Html( |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | if ($filefound) { // Mostly for external modules |
1297 | 1297 | $content = file_get_contents($pathoffile); |
1298 | 1298 | |
1299 | - if ((float)DOL_VERSION >= 6.0) { |
|
1299 | + if ((float) DOL_VERSION >= 6.0) { |
|
1300 | 1300 | @include_once DOL_DOCUMENT_ROOT . '/core/lib/parsemd.lib.php'; |
1301 | 1301 | |
1302 | 1302 | $content = dolMd2Html($content, 'parsedown', array('doc/' => dol_buildpath(strtolower($this->name) . '/doc/', 1))); |
@@ -1574,7 +1574,7 @@ discard block |
||
1574 | 1574 | $ignoreerror = $val['ignoreerror']; |
1575 | 1575 | } |
1576 | 1576 | // Add current entity id |
1577 | - $sql = str_replace('__ENTITY__', (string)$conf->entity, $sql); |
|
1577 | + $sql = str_replace('__ENTITY__', (string) $conf->entity, $sql); |
|
1578 | 1578 | |
1579 | 1579 | dol_syslog(get_only_class($this) . "::_init ignoreerror=" . $ignoreerror, LOG_DEBUG); |
1580 | 1580 | $result = $this->db->query($sql, $ignoreerror); |
@@ -1951,7 +1951,7 @@ discard block |
||
1951 | 1951 | } |
1952 | 1952 | |
1953 | 1953 | $sql = "INSERT INTO " . MAIN_DB_PREFIX . "boxes (box_id, position, box_order, fk_user, entity)"; |
1954 | - $sql .= " VALUES (" . ((int)$lastid) . ", " . ((int)$key2) . ", '0', 0, " . ((int)$conf->entity) . ")"; |
|
1954 | + $sql .= " VALUES (" . ((int) $lastid) . ", " . ((int) $key2) . ", '0', 0, " . ((int) $conf->entity) . ")"; |
|
1955 | 1955 | |
1956 | 1956 | dol_syslog(get_only_class($this) . "::insert_boxes onto page " . $key2 . "=" . $val2, LOG_DEBUG); |
1957 | 1957 | $resql = $this->db->query($sql); |
@@ -2034,7 +2034,7 @@ discard block |
||
2034 | 2034 | if ($parameters) { |
2035 | 2035 | $sql .= " AND params = '".$this->db->escape($parameters)."'"; |
2036 | 2036 | }*/ |
2037 | - $sql .= " AND entity = " . ((int)$entity); // Must be exact entity |
|
2037 | + $sql .= " AND entity = " . ((int) $entity); // Must be exact entity |
|
2038 | 2038 | |
2039 | 2039 | $now = dol_now(); |
2040 | 2040 | |
@@ -2082,7 +2082,7 @@ discard block |
||
2082 | 2082 | $sql .= "'" . $this->db->escape($priority) . "', "; |
2083 | 2083 | } |
2084 | 2084 | if (is_int($status)) { |
2085 | - $sql .= ((int)$status) . ", "; |
|
2085 | + $sql .= ((int) $status) . ", "; |
|
2086 | 2086 | } |
2087 | 2087 | $sql .= $entity . ","; |
2088 | 2088 | $sql .= "'" . $this->db->escape($test) . "'"; |
@@ -2394,7 +2394,7 @@ discard block |
||
2394 | 2394 | |
2395 | 2395 | $return .= '<div class="valignmiddle inline-block info-box-more">'; |
2396 | 2396 | //if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' '; |
2397 | - $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\'' . constant('BASE_URL') . '/admin/modulehelp.php?id=' . ((int)$this->numero) . '\',\'text/html\',\'' . dol_escape_js($langs->trans("Module")) . '\')">' . img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule") . ' - ' : '') . $langs->trans("ClickToShowDescription"), $imginfo) . '</a>'; |
|
2397 | + $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\'' . constant('BASE_URL') . '/admin/modulehelp.php?id=' . ((int) $this->numero) . '\',\'text/html\',\'' . dol_escape_js($langs->trans("Module")) . '\')">' . img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule") . ' - ' : '') . $langs->trans("ClickToShowDescription"), $imginfo) . '</a>'; |
|
2398 | 2398 | $return .= '</div><br>'; |
2399 | 2399 | |
2400 | 2400 | $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
@@ -2550,7 +2550,7 @@ discard block |
||
2550 | 2550 | { |
2551 | 2551 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/geturl.lib.php'; |
2552 | 2552 | if (!empty($this->url_last_version)) { |
2553 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2553 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2554 | 2554 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
2555 | 2555 | // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - |
2556 | 2556 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | } |
514 | 514 | } |
515 | 515 | |
516 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
516 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
517 | 517 | /** |
518 | 518 | * Load array lines |
519 | 519 | * |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | */ |
523 | 523 | public function fetch_lines($filters = '') |
524 | 524 | { |
525 | - // phpcs:enable |
|
525 | + // phpcs:enable |
|
526 | 526 | global $langs; |
527 | 527 | |
528 | 528 | $this->lines = array(); |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | return $this->LibStatut(0, $mode); |
1243 | 1243 | } |
1244 | 1244 | |
1245 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1245 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1246 | 1246 | /** |
1247 | 1247 | * Return label of a status |
1248 | 1248 | * |
@@ -1252,7 +1252,7 @@ discard block |
||
1252 | 1252 | */ |
1253 | 1253 | public function LibStatut($status, $mode = 1) |
1254 | 1254 | { |
1255 | - // phpcs:enable |
|
1255 | + // phpcs:enable |
|
1256 | 1256 | return ''; |
1257 | 1257 | } |
1258 | 1258 |