@@ -118,7 +118,7 @@ |
||
118 | 118 | if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED') && $user->hasRight('supplier_proposal', 'lire')) { |
119 | 119 | $arrayresult['searchintosupplierpropal'] = array('position' => 100, 'img' => 'object_supplier_proposal', 'label' => $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text' => img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url' => constant('BASE_URL') . '/supplier_proposal/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
120 | 120 | } |
121 | -if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) { |
|
121 | +if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) { |
|
122 | 122 | $arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_supplier_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_supplier_order', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => constant('BASE_URL') . '/fourn/commande/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
123 | 123 | } |
124 | 124 | if (isModEnabled('reception') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_RECEPTION_DISABLED') && $user->hasRight('reception', 'lire')) { |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | // Security check |
48 | 48 | if (!isModEnabled('incoterm')) { |
49 | - httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
49 | + httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
50 | 50 | } |
51 | 51 | // There is no other permission on this component. Everybody connected can read content of the incoterm table |
52 | 52 |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | if ($reshook > 0) { |
140 | 140 | $perm = $hookmanager->resArray['perm']; |
141 | 141 | } |
142 | - if (! $perm) { |
|
142 | + if (!$perm) { |
|
143 | 143 | // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. |
144 | 144 | // If we are here, it is a hack attempt, so we report a warning. |
145 | 145 | print 'Bad permission to modify position of lines for object in table ' . $table_element_line; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | // Reorder line to have position of children lines sharing same counter than parent lines |
163 | 163 | // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database. |
164 | - if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) { |
|
164 | + if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) { |
|
165 | 165 | $result = $row->line_order(true); |
166 | 166 | } |
167 | 167 | } else { |
@@ -131,7 +131,7 @@ |
||
131 | 131 | $sql .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = ' . ((int) $user->id); |
132 | 132 | $sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '" . $db->idate(dol_now()) . "'"; |
133 | 133 | $sql .= " AND ar.status = 0"; |
134 | - $sql .= " AND ar.entity = " . ((int) $conf->entity); // No sharing of entity for alerts |
|
134 | + $sql .= " AND ar.entity = " . ((int) $conf->entity); // No sharing of entity for alerts |
|
135 | 135 | $sql .= $db->order('datep', 'ASC'); |
136 | 136 | $sql .= $db->plimit(10); // Avoid too many notification at once |
137 | 137 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // Load object according to $id and $element |
55 | 55 | $object = fetchObjectByElement($id, $element); |
56 | 56 | if (!is_object($object)) { |
57 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
57 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $object->fields[$field] = array('type' => $format, 'enabled' => 1); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if (!empty($user->socid)) { |
73 | 73 | $socid = $user->socid; |
74 | 74 | if (!empty($object->socid) && $socid != $object->socid) { |
75 | - httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
75 | + httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products |
84 | 84 | restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid'); |
85 | 85 | } else { |
86 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
86 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
87 | 87 | } |
88 | 88 | |
89 | 89 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $title = $langs->trans("Bookmarks"); |
72 | 72 | |
73 | 73 | // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests |
74 | -$head = '<!-- Bookmarks -->' . "\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
74 | +$head = '<!-- Bookmarks -->' . "\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
75 | 75 | $arrayofjs = array(); |
76 | 76 | $arrayofcss = array(); |
77 | 77 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -398,7 +398,7 @@ |
||
398 | 398 | $object->actionmsg = $message; // Long text |
399 | 399 | $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentByTo')...); |
400 | 400 | if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) { |
401 | - $object->actionmsg2 = $subject; // Short text |
|
401 | + $object->actionmsg2 = $subject; // Short text |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | $object->trackid = $trackid; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | |
117 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
117 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
118 | 118 | /** |
119 | 119 | * Fonction generant la rapport sur le disque |
120 | 120 | * |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function write_file($_dir, $month, $year, $outputlangs) |
128 | 128 | { |
129 | - // phpcs:enable |
|
129 | + // phpcs:enable |
|
130 | 130 | include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
131 | 131 | |
132 | 132 | global $conf, $hookmanager, $langs, $user; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | return 1; |
383 | 383 | } |
384 | 384 | |
385 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
385 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
386 | 386 | /** |
387 | 387 | * Show top header of page. |
388 | 388 | * |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | protected function _pagehead(&$pdf, $page, $showaddress, $outputlangs) |
396 | 396 | { |
397 | - // phpcs:enable |
|
397 | + // phpcs:enable |
|
398 | 398 | |
399 | 399 | // Do not add the BACKGROUND as this is a report |
400 | 400 | //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } |
458 | 458 | |
459 | 459 | |
460 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
460 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
461 | 461 | /** |
462 | 462 | * Output body |
463 | 463 | * |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | */ |
470 | 470 | public function Body(&$pdf, $page, $lines, $outputlangs) |
471 | 471 | { |
472 | - // phpcs:enable |
|
472 | + // phpcs:enable |
|
473 | 473 | global $langs, $conf; |
474 | 474 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
475 | 475 |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | // We need constructor into function unActivateModule into admin.lib.php |
427 | 427 | |
428 | 428 | |
429 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
429 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
430 | 430 | /** |
431 | 431 | * Enables a module. |
432 | 432 | * Inserts all information into database. |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | */ |
440 | 440 | protected function _init($array_sql, $options = '') |
441 | 441 | { |
442 | - // phpcs:enable |
|
442 | + // phpcs:enable |
|
443 | 443 | global $conf; |
444 | 444 | $err = 0; |
445 | 445 | |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | } |
539 | 539 | } |
540 | 540 | |
541 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
541 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
542 | 542 | /** |
543 | 543 | * Disable function. Deletes the module constants and boxes from the database. |
544 | 544 | * |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | protected function _remove($array_sql, $options = '') |
551 | 551 | { |
552 | 552 | global $conf; |
553 | - // phpcs:enable |
|
553 | + // phpcs:enable |
|
554 | 554 | $err = 0; |
555 | 555 | |
556 | 556 | $this->db->begin(); |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | } |
1062 | 1062 | |
1063 | 1063 | |
1064 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1064 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1065 | 1065 | /** |
1066 | 1066 | * Insert constants for module activation |
1067 | 1067 | * |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | */ |
1070 | 1070 | protected function _active() |
1071 | 1071 | { |
1072 | - // phpcs:enable |
|
1072 | + // phpcs:enable |
|
1073 | 1073 | global $conf, $user; |
1074 | 1074 | |
1075 | 1075 | $err = 0; |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | } |
1112 | 1112 | |
1113 | 1113 | |
1114 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1114 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1115 | 1115 | /** |
1116 | 1116 | * Module deactivation |
1117 | 1117 | * |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | */ |
1120 | 1120 | protected function _unactive() |
1121 | 1121 | { |
1122 | - // phpcs:enable |
|
1122 | + // phpcs:enable |
|
1123 | 1123 | global $conf; |
1124 | 1124 | |
1125 | 1125 | $err = 0; |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | } |
1139 | 1139 | |
1140 | 1140 | |
1141 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1141 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1142 | 1142 | /** |
1143 | 1143 | * Create tables and keys required by module: |
1144 | 1144 | * - Files table.sql or table-module.sql with create table instructions |
@@ -1156,7 +1156,7 @@ discard block |
||
1156 | 1156 | */ |
1157 | 1157 | protected function _load_tables($reldir, $onlywithsuffix = '') |
1158 | 1158 | { |
1159 | - // phpcs:enable |
|
1159 | + // phpcs:enable |
|
1160 | 1160 | global $conf; |
1161 | 1161 | |
1162 | 1162 | $error = 0; |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | } |
1328 | 1328 | |
1329 | 1329 | |
1330 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1330 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1331 | 1331 | /** |
1332 | 1332 | * Adds boxes |
1333 | 1333 | * |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | */ |
1338 | 1338 | public function insert_boxes($option = '') |
1339 | 1339 | { |
1340 | - // phpcs:enable |
|
1340 | + // phpcs:enable |
|
1341 | 1341 | include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; |
1342 | 1342 | |
1343 | 1343 | global $conf; |
@@ -1427,7 +1427,7 @@ discard block |
||
1427 | 1427 | } |
1428 | 1428 | |
1429 | 1429 | |
1430 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1430 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1431 | 1431 | /** |
1432 | 1432 | * Removes boxes |
1433 | 1433 | * |
@@ -1435,7 +1435,7 @@ discard block |
||
1435 | 1435 | */ |
1436 | 1436 | public function delete_boxes() |
1437 | 1437 | { |
1438 | - // phpcs:enable |
|
1438 | + // phpcs:enable |
|
1439 | 1439 | global $conf; |
1440 | 1440 | |
1441 | 1441 | $err = 0; |
@@ -1501,7 +1501,7 @@ discard block |
||
1501 | 1501 | return $err; |
1502 | 1502 | } |
1503 | 1503 | |
1504 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1504 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1505 | 1505 | /** |
1506 | 1506 | * Adds cronjobs |
1507 | 1507 | * |
@@ -1509,7 +1509,7 @@ discard block |
||
1509 | 1509 | */ |
1510 | 1510 | public function insert_cronjobs() |
1511 | 1511 | { |
1512 | - // phpcs:enable |
|
1512 | + // phpcs:enable |
|
1513 | 1513 | include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php'; |
1514 | 1514 | |
1515 | 1515 | global $conf; |
@@ -1635,7 +1635,7 @@ discard block |
||
1635 | 1635 | } |
1636 | 1636 | |
1637 | 1637 | |
1638 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1638 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1639 | 1639 | /** |
1640 | 1640 | * Removes boxes |
1641 | 1641 | * |
@@ -1643,7 +1643,7 @@ discard block |
||
1643 | 1643 | */ |
1644 | 1644 | public function delete_cronjobs() |
1645 | 1645 | { |
1646 | - // phpcs:enable |
|
1646 | + // phpcs:enable |
|
1647 | 1647 | global $conf; |
1648 | 1648 | |
1649 | 1649 | $err = 0; |
@@ -1666,7 +1666,7 @@ discard block |
||
1666 | 1666 | return $err; |
1667 | 1667 | } |
1668 | 1668 | |
1669 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1669 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1670 | 1670 | /** |
1671 | 1671 | * Removes tabs |
1672 | 1672 | * |
@@ -1674,7 +1674,7 @@ discard block |
||
1674 | 1674 | */ |
1675 | 1675 | public function delete_tabs() |
1676 | 1676 | { |
1677 | - // phpcs:enable |
|
1677 | + // phpcs:enable |
|
1678 | 1678 | global $conf; |
1679 | 1679 | |
1680 | 1680 | $err = 0; |
@@ -1692,7 +1692,7 @@ discard block |
||
1692 | 1692 | return $err; |
1693 | 1693 | } |
1694 | 1694 | |
1695 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1695 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1696 | 1696 | /** |
1697 | 1697 | * Adds tabs |
1698 | 1698 | * |
@@ -1700,7 +1700,7 @@ discard block |
||
1700 | 1700 | */ |
1701 | 1701 | public function insert_tabs() |
1702 | 1702 | { |
1703 | - // phpcs:enable |
|
1703 | + // phpcs:enable |
|
1704 | 1704 | global $conf; |
1705 | 1705 | |
1706 | 1706 | $err = 0; |
@@ -1759,7 +1759,7 @@ discard block |
||
1759 | 1759 | return $err; |
1760 | 1760 | } |
1761 | 1761 | |
1762 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1762 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1763 | 1763 | /** |
1764 | 1764 | * Adds constants |
1765 | 1765 | * |
@@ -1767,7 +1767,7 @@ discard block |
||
1767 | 1767 | */ |
1768 | 1768 | public function insert_const() |
1769 | 1769 | { |
1770 | - // phpcs:enable |
|
1770 | + // phpcs:enable |
|
1771 | 1771 | global $conf; |
1772 | 1772 | |
1773 | 1773 | $err = 0; |
@@ -1828,7 +1828,7 @@ discard block |
||
1828 | 1828 | return $err; |
1829 | 1829 | } |
1830 | 1830 | |
1831 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1831 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1832 | 1832 | /** |
1833 | 1833 | * Removes constants tagged 'deleteonunactive' |
1834 | 1834 | * |
@@ -1836,7 +1836,7 @@ discard block |
||
1836 | 1836 | */ |
1837 | 1837 | public function delete_const() |
1838 | 1838 | { |
1839 | - // phpcs:enable |
|
1839 | + // phpcs:enable |
|
1840 | 1840 | global $conf; |
1841 | 1841 | |
1842 | 1842 | $err = 0; |
@@ -1864,7 +1864,7 @@ discard block |
||
1864 | 1864 | return $err; |
1865 | 1865 | } |
1866 | 1866 | |
1867 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1867 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1868 | 1868 | /** |
1869 | 1869 | * Adds access rights |
1870 | 1870 | * |
@@ -1875,7 +1875,7 @@ discard block |
||
1875 | 1875 | */ |
1876 | 1876 | public function insert_permissions($reinitadminperms = 0, $force_entity = null, $notrigger = 0) |
1877 | 1877 | { |
1878 | - // phpcs:enable |
|
1878 | + // phpcs:enable |
|
1879 | 1879 | global $conf, $user; |
1880 | 1880 | |
1881 | 1881 | $err = 0; |
@@ -2034,7 +2034,7 @@ discard block |
||
2034 | 2034 | } |
2035 | 2035 | |
2036 | 2036 | |
2037 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2037 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2038 | 2038 | /** |
2039 | 2039 | * Removes access rights |
2040 | 2040 | * |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | */ |
2043 | 2043 | public function delete_permissions() |
2044 | 2044 | { |
2045 | - // phpcs:enable |
|
2045 | + // phpcs:enable |
|
2046 | 2046 | global $conf; |
2047 | 2047 | |
2048 | 2048 | $err = 0; |
@@ -2067,7 +2067,7 @@ discard block |
||
2067 | 2067 | } |
2068 | 2068 | |
2069 | 2069 | |
2070 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2070 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2071 | 2071 | /** |
2072 | 2072 | * Adds menu entries |
2073 | 2073 | * |
@@ -2075,7 +2075,7 @@ discard block |
||
2075 | 2075 | */ |
2076 | 2076 | public function insert_menus() |
2077 | 2077 | { |
2078 | - // phpcs:enable |
|
2078 | + // phpcs:enable |
|
2079 | 2079 | global $conf, $user; |
2080 | 2080 | |
2081 | 2081 | if (!is_array($this->menu) || empty($this->menu)) { |
@@ -2168,7 +2168,7 @@ discard block |
||
2168 | 2168 | } |
2169 | 2169 | |
2170 | 2170 | |
2171 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2171 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2172 | 2172 | /** |
2173 | 2173 | * Removes menu entries |
2174 | 2174 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
2176 | 2176 | */ |
2177 | 2177 | public function delete_menus() |
2178 | 2178 | { |
2179 | - // phpcs:enable |
|
2179 | + // phpcs:enable |
|
2180 | 2180 | global $conf; |
2181 | 2181 | |
2182 | 2182 | $err = 0; |
@@ -2199,7 +2199,7 @@ discard block |
||
2199 | 2199 | return $err; |
2200 | 2200 | } |
2201 | 2201 | |
2202 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2202 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2203 | 2203 | /** |
2204 | 2204 | * Creates directories |
2205 | 2205 | * |
@@ -2207,7 +2207,7 @@ discard block |
||
2207 | 2207 | */ |
2208 | 2208 | public function create_dirs() |
2209 | 2209 | { |
2210 | - // phpcs:enable |
|
2210 | + // phpcs:enable |
|
2211 | 2211 | global $langs, $conf; |
2212 | 2212 | |
2213 | 2213 | $err = 0; |
@@ -2265,7 +2265,7 @@ discard block |
||
2265 | 2265 | } |
2266 | 2266 | |
2267 | 2267 | |
2268 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2268 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2269 | 2269 | /** |
2270 | 2270 | * Adds directories definitions |
2271 | 2271 | * |
@@ -2276,7 +2276,7 @@ discard block |
||
2276 | 2276 | */ |
2277 | 2277 | public function insert_dirs($name, $dir) |
2278 | 2278 | { |
2279 | - // phpcs:enable |
|
2279 | + // phpcs:enable |
|
2280 | 2280 | global $conf; |
2281 | 2281 | |
2282 | 2282 | $err = 0; |
@@ -2307,7 +2307,7 @@ discard block |
||
2307 | 2307 | } |
2308 | 2308 | |
2309 | 2309 | |
2310 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2310 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2311 | 2311 | /** |
2312 | 2312 | * Removes directories |
2313 | 2313 | * |
@@ -2315,7 +2315,7 @@ discard block |
||
2315 | 2315 | */ |
2316 | 2316 | public function delete_dirs() |
2317 | 2317 | { |
2318 | - // phpcs:enable |
|
2318 | + // phpcs:enable |
|
2319 | 2319 | global $conf; |
2320 | 2320 | |
2321 | 2321 | $err = 0; |
@@ -2333,7 +2333,7 @@ discard block |
||
2333 | 2333 | return $err; |
2334 | 2334 | } |
2335 | 2335 | |
2336 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2336 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2337 | 2337 | /** |
2338 | 2338 | * Save configuration for generic features. |
2339 | 2339 | * This also generate website templates if the module provide some. |
@@ -2342,7 +2342,7 @@ discard block |
||
2342 | 2342 | */ |
2343 | 2343 | public function insert_module_parts() |
2344 | 2344 | { |
2345 | - // phpcs:enable |
|
2345 | + // phpcs:enable |
|
2346 | 2346 | global $conf, $langs; |
2347 | 2347 | |
2348 | 2348 | $error = 0; |
@@ -2447,7 +2447,7 @@ discard block |
||
2447 | 2447 | return $error; |
2448 | 2448 | } |
2449 | 2449 | |
2450 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2450 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2451 | 2451 | /** |
2452 | 2452 | * Removes generic parts |
2453 | 2453 | * |
@@ -2455,7 +2455,7 @@ discard block |
||
2455 | 2455 | */ |
2456 | 2456 | public function delete_module_parts() |
2457 | 2457 | { |
2458 | - // phpcs:enable |
|
2458 | + // phpcs:enable |
|
2459 | 2459 | global $conf; |
2460 | 2460 | |
2461 | 2461 | $err = 0; |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | $moduleNameInConf = 'supplier_proposal'; |
627 | 627 | } |
628 | 628 | |
629 | - unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
629 | + unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
630 | 630 | |
631 | 631 | return 1; |
632 | 632 | } else { |
@@ -1487,7 +1487,7 @@ discard block |
||
1487 | 1487 | |
1488 | 1488 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "boxes_def"; |
1489 | 1489 | $sql .= " WHERE file = '" . $this->db->escape($file) . "'"; |
1490 | - $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1490 | + $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1491 | 1491 | |
1492 | 1492 | dol_syslog(get_class($this) . "::delete_boxes", LOG_DEBUG); |
1493 | 1493 | $resql = $this->db->query($sql); |
@@ -1910,9 +1910,9 @@ discard block |
||
1910 | 1910 | |
1911 | 1911 | // If the module is active |
1912 | 1912 | foreach ($this->rights as $key => $value) { |
1913 | - $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1913 | + $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1914 | 1914 | $r_label = $this->rights[$key][self::KEY_LABEL]; |
1915 | - $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
1915 | + $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
1916 | 1916 | $r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0; |
1917 | 1917 | $r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? ''; |
1918 | 1918 | $r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? ''; |
@@ -1936,7 +1936,7 @@ discard block |
||
1936 | 1936 | } |
1937 | 1937 | |
1938 | 1938 | // condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..) |
1939 | - $r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1'; |
|
1939 | + $r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1'; |
|
1940 | 1940 | |
1941 | 1941 | // Search if perm already present |
1942 | 1942 | $sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "rights_def"; |
@@ -1953,7 +1953,7 @@ discard block |
||
1953 | 1953 | $sql .= ", libelle"; |
1954 | 1954 | $sql .= ", module"; |
1955 | 1955 | $sql .= ", module_origin"; |
1956 | - $sql .= ", type"; // TODO deprecated |
|
1956 | + $sql .= ", type"; // TODO deprecated |
|
1957 | 1957 | $sql .= ", bydefault"; |
1958 | 1958 | $sql .= ", perms"; |
1959 | 1959 | $sql .= ", subperms"; |
@@ -1964,7 +1964,7 @@ discard block |
||
1964 | 1964 | $sql .= ", '" . $this->db->escape($r_label) . "'"; |
1965 | 1965 | $sql .= ", '" . $this->db->escape($r_module) . "'"; |
1966 | 1966 | $sql .= ", '" . $this->db->escape($r_module_origin) . "'"; |
1967 | - $sql .= ", '" . $this->db->escape($r_type) . "'"; // TODO deprecated |
|
1967 | + $sql .= ", '" . $this->db->escape($r_type) . "'"; // TODO deprecated |
|
1968 | 1968 | $sql .= ", " . ((int) $r_default); |
1969 | 1969 | $sql .= ", '" . $this->db->escape($r_perms) . "'"; |
1970 | 1970 | $sql .= ", '" . $this->db->escape($r_subperms) . "'"; |
@@ -2186,7 +2186,7 @@ discard block |
||
2186 | 2186 | |
2187 | 2187 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "menu"; |
2188 | 2188 | $sql .= " WHERE module = '" . $this->db->escape($module) . "'"; |
2189 | - $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' |
|
2189 | + $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' |
|
2190 | 2190 | $sql .= " AND entity IN (0, " . $conf->entity . ")"; |
2191 | 2191 | |
2192 | 2192 | dol_syslog(get_class($this) . "::delete_menus", LOG_DEBUG); |
@@ -2570,36 +2570,36 @@ discard block |
||
2570 | 2570 | } |
2571 | 2571 | |
2572 | 2572 | if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { |
2573 | - $versionTitle = $langs->trans("Version") . ' ' . $this->getVersion(1); |
|
2573 | + $versionTitle = $langs->trans("Version") . ' ' . $this->getVersion(1); |
|
2574 | 2574 | if ($this->needUpdate) { |
2575 | 2575 | $versionTitle .= '<br>' . $langs->trans('ModuleUpdateAvailable') . ' : ' . $this->lastVersion; |
2576 | 2576 | } |
2577 | 2577 | |
2578 | - $return .= '<span class="info-box-icon-version' . ($versiontrans ? ' ' . $versiontrans : '') . ' classfortooltip" title="' . dol_escape_js($versionTitle) . '" >'; |
|
2579 | - $return .= $this->getVersion(1); |
|
2580 | - $return .= '</span>'; |
|
2578 | + $return .= '<span class="info-box-icon-version' . ($versiontrans ? ' ' . $versiontrans : '') . ' classfortooltip" title="' . dol_escape_js($versionTitle) . '" >'; |
|
2579 | + $return .= $this->getVersion(1); |
|
2580 | + $return .= '</span>'; |
|
2581 | 2581 | } |
2582 | 2582 | |
2583 | - $return .= '</div> |
|
2583 | + $return .= '</div> |
|
2584 | 2584 | <div class="info-box-content info-box-text-module' . (!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled' . ($versiontrans ? ' info-box-content-warning' : '')) . '"> |
2585 | 2585 | <span class="info-box-title">' . $this->getName() . '</span> |
2586 | 2586 | <span class="info-box-desc twolinesmax opacitymedium" title="' . dol_escape_htmltag($this->getDesc()) . '">' . nl2br($this->getDesc()) . '</span>'; |
2587 | 2587 | |
2588 | - $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2588 | + $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2589 | 2589 | //if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' '; |
2590 | - $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>'; |
|
2591 | - $return .= '</div><br>'; |
|
2592 | - |
|
2593 | - $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2594 | - $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2595 | - $return .= $codetoconfig; |
|
2596 | - $return .= '</div>'; |
|
2597 | - $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2598 | - $return .= $codeenabledisable; |
|
2599 | - $return .= '</div>'; |
|
2600 | - $return .= '</div>'; |
|
2601 | - |
|
2602 | - $return .= ' |
|
2590 | + $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>'; |
|
2591 | + $return .= '</div><br>'; |
|
2592 | + |
|
2593 | + $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2594 | + $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2595 | + $return .= $codetoconfig; |
|
2596 | + $return .= '</div>'; |
|
2597 | + $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2598 | + $return .= $codeenabledisable; |
|
2599 | + $return .= '</div>'; |
|
2600 | + $return .= '</div>'; |
|
2601 | + |
|
2602 | + $return .= ' |
|
2603 | 2603 | </div><!-- /.info-box-content --> |
2604 | 2604 | </div><!-- /.info-box --> |
2605 | 2605 | </div>'; |
@@ -2618,7 +2618,7 @@ discard block |
||
2618 | 2618 | { |
2619 | 2619 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/geturl.lib.php'; |
2620 | 2620 | if (!empty($this->url_last_version)) { |
2621 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2621 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2622 | 2622 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
2623 | 2623 | // 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 _ . - |
2624 | 2624 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -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 | } |