@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | // update of object |
76 | 76 | if ($forcelangprod == $current_lang) { |
77 | - $object->label = GETPOST("libelle", 'alphanohtml'); |
|
77 | + $object->label = GETPOST("libelle", 'alphanohtml'); |
|
78 | 78 | $object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); |
79 | 79 | //$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); |
80 | 80 | } else { |
@@ -682,7 +682,7 @@ |
||
682 | 682 | { |
683 | 683 | $base = new DateTime("$year-03-21", new DateTimeZone("UTC")); |
684 | 684 | $days = easter_days($year); // Return number of days between 21 march and easter day. |
685 | - $tmp = $base->add(new DateInterval("P{$days}D")); |
|
685 | + $tmp = $base->add(new DateInterval("p{$days}d")); |
|
686 | 686 | return $tmp->getTimestamp(); |
687 | 687 | } |
688 | 688 |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | $newtimeyear = (int) dol_print_date($newtime, '%Y'); |
185 | 185 | $newtimemonth = (int) dol_print_date($newtime, '%m'); |
186 | - $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
186 | + $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
187 | 187 | |
188 | 188 | if ($monthsexpected < $newtimetotalmonths) { |
189 | 189 | $newtimehours = (int) dol_print_date($newtime, '%H'); |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | $sql = "SELECT id, code, entity, fk_country, dayrule, year, month, day, active"; |
797 | 797 | $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
798 | 798 | $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
799 | - $sql .= " AND entity IN (0," .getEntity('holiday') .")"; |
|
799 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
800 | 800 | |
801 | 801 | $resql = $db->query($sql); |
802 | 802 | if ($resql) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | case 'sellist': |
49 | 49 | $tmp = ''; |
50 | 50 | $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null |
51 | - if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
51 | + if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
52 | 52 | $tmpkeys = array_keys($tmpparam['options']); |
53 | 53 | $tmp = array_shift($tmpkeys); |
54 | 54 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | |
140 | 140 | // If we have a hash public (hashp), we guess the original_file. |
141 | -$ecmfile=''; |
|
141 | +$ecmfile = ''; |
|
142 | 142 | if (!empty($hashp)) { |
143 | 143 | include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; |
144 | 144 | $ecmfile = new EcmFiles($db); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | // Security: Delete string ../ or ..\ into $original_file |
199 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
199 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
200 | 200 | $original_file = str_replace('../', '/', $original_file); |
201 | 201 | $original_file = str_replace('..\\', '/', $original_file); |
202 | 202 |
@@ -124,8 +124,8 @@ |
||
124 | 124 | $htmlname = 'activesynchro'; |
125 | 125 | } |
126 | 126 | |
127 | - $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
128 | - $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
127 | + $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP").(($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
128 | + $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr").(($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
129 | 129 | |
130 | 130 | $arraylist = array( |
131 | 131 | Ldap::SYNCHRO_NONE => $langs->trans("No"), |
@@ -201,7 +201,7 @@ |
||
201 | 201 | $this->rights[$r][0] = 130; |
202 | 202 | $this->rights[$r][1] = 'Modify thirdparty information payment'; |
203 | 203 | $this->rights[$r][3] = 0; |
204 | - $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
204 | + $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
205 | 205 | $this->rights[$r][5] = 'write'; |
206 | 206 | |
207 | 207 | // 262 : Restrict access to sales representative |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $title = $langs->trans("Bookmarks"); |
59 | 59 | |
60 | 60 | // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests |
61 | -$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
61 | +$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
62 | 62 | $arrayofjs = array(); |
63 | 63 | $arrayofcss = array(); |
64 | 64 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $title = $langs->trans("Menu"); |
85 | 85 | |
86 | 86 | // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests |
87 | -$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page |
|
87 | +$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page |
|
88 | 88 | $arrayofjs = array(); |
89 | 89 | $arrayofcss = array(); |
90 | 90 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -149,7 +149,7 @@ |
||
149 | 149 | $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED; |
150 | 150 | $sql .= " AND ("; |
151 | 151 | $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')"; |
152 | -$sql .= " OR"; // For leave over several months |
|
152 | +$sql .= " OR"; // For leave over several months |
|
153 | 153 | $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') "; |
154 | 154 | $sql .= " )"; |
155 | 155 | if (!empty($search_ref)) { |