@@ -81,9 +81,9 @@ |
||
81 | 81 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
82 | 82 | require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
83 | 83 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
84 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
85 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; |
|
86 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
84 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
85 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
|
86 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
87 | 87 | |
88 | 88 | // Load translation files required by the page |
89 | 89 | $langs->loadLangs(array("hrm", "companies", "other", "mails")); |
@@ -91,8 +91,8 @@ |
||
91 | 91 | $label_default = getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT'); |
92 | 92 | $qty_default = 1; |
93 | 93 | |
94 | - print '<input type="text" id="label" name="label" class="takepospay" value="' . $label_default . '" style="width:40%;" placeholder="' . $langs->trans('Label') . '">'; |
|
95 | - print '<input type="text" id="qty" name="qty" class="takepospay" value="' . $qty_default . '" style="width:10%;" placeholder="' . $langs->trans('Qty') . '">'; |
|
94 | + print '<input type="text" id="label" name="label" class="takepospay" value="'.$label_default.'" style="width:40%;" placeholder="'.$langs->trans('Label').'">'; |
|
95 | + print '<input type="text" id="qty" name="qty" class="takepospay" value="'.$qty_default.'" style="width:10%;" placeholder="'.$langs->trans('Qty').'">'; |
|
96 | 96 | } |
97 | 97 | ?> |
98 | 98 | <input type="button" class="button takepospay clearboth" value="OK" onclick="Save();"> |
@@ -273,7 +273,7 @@ |
||
273 | 273 | print '<tr class="oddeven"><td>'; |
274 | 274 | print $langs->trans('PrintWithoutDetailsLabelDefault'); |
275 | 275 | print '<td colspan="2">'; |
276 | - print '<input type="text" name="TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT" value="' . getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT') . '" />'; |
|
276 | + print '<input type="text" name="TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT" value="'.getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS_LABEL_DEFAULT').'" />'; |
|
277 | 277 | print "</td></tr>\n"; |
278 | 278 | } |
279 | 279 |
@@ -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 |
@@ -295,11 +295,11 @@ discard block |
||
295 | 295 | $sTime .= dol_print_date($iSecond, 'hourduration', true); |
296 | 296 | } |
297 | 297 | } elseif ($format == 'allhourminsec') { |
298 | - return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))).':'.sprintf("%02d", ((int) ($iSecond % 60))); |
|
298 | + return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))).':'.sprintf("%02d", ((int) ($iSecond % 60))); |
|
299 | 299 | } elseif ($format == 'allhourmin') { |
300 | - return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600)/60))); |
|
300 | + return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))); |
|
301 | 301 | } elseif ($format == 'allhour') { |
302 | - return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond/3600))); |
|
302 | + return sprintf("%02d", ($sWeek * $lengthOfWeek * $nbHbyDay + $sDay * $nbHbyDay + (int) floor($iSecond / 3600))); |
|
303 | 303 | } |
304 | 304 | } elseif ($format == 'hour') { // only hour part |
305 | 305 | $sTime = dol_print_date($iSecond, '%H', true); |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | $sql = "SELECT code, entity, fk_country, dayrule, year, month, day, active"; |
804 | 804 | $sql .= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday"; |
805 | 805 | $sql .= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")"; |
806 | - $sql .= " AND entity IN (0," .getEntity('holiday') .")"; |
|
806 | + $sql .= " AND entity IN (0,".getEntity('holiday').")"; |
|
807 | 807 | |
808 | 808 | $resql = $db->query($sql); |
809 | 809 | if ($resql) { |
@@ -947,7 +947,7 @@ discard block |
||
947 | 947 | $jour_1sunsept = date("d", $date_1sunsept); |
948 | 948 | $mois_1sunsept = date("m", $date_1sunsept); |
949 | 949 | if ($jour_1sunsept == $jour && $mois_1sunsept == $mois) { |
950 | - $ferie=true; |
|
950 | + $ferie = true; |
|
951 | 951 | } |
952 | 952 | // Geneva fast in Switzerland |
953 | 953 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | |
129 | 129 | // Array to add new pages in new tabs |
130 | 130 | $this->tabs = array(); |
131 | - $this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1 |
|
131 | + $this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1 |
|
132 | 132 | //$this->tabs[] = array('data'=>'job:+tabname1:Poste:mylangfile@hrm:1:/hrm/poste_list.php?fk_job=__ID__'); // To add a new tab identified by code tabname1 |
133 | 133 | // Example: |
134 | 134 | // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@hrm:$user->rights->hrm->read:/hrm/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 |
@@ -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"), |