@@ -64,7 +64,7 @@ |
||
64 | 64 | // Initialize technical objects |
65 | 65 | $object = new Mailing($db); |
66 | 66 | $extrafields = new ExtraFields($db); |
67 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
67 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
68 | 68 | |
69 | 69 | // Fetch optionals attributes and labels |
70 | 70 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $offsetunit = GETPOST('offsetunittype_duration', 'aZ09'); |
76 | 76 | $remindertype = GETPOST('selectremindertype', 'aZ09'); |
77 | 77 | $modelmail = GETPOSTINT('actioncommsendmodel_mail'); |
78 | -$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
78 | +$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
79 | 79 | $private = GETPOST('private', 'alphanohtml'); |
80 | 80 | if ($complete == 'na' || $complete == -2) { |
81 | 81 | $complete = -1; |
@@ -610,12 +610,12 @@ discard block |
||
610 | 610 | if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) { |
611 | 611 | $firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear")); |
612 | 612 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel'); |
613 | - $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after |
|
613 | + $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd'); //We begin the week after |
|
614 | 614 | $dayoffset = 7; |
615 | 615 | $monthoffset = 0; |
616 | 616 | } elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) { |
617 | 617 | $firstday = $selectedrecurrulebymonthday; |
618 | - $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth");//We begin the week after |
|
618 | + $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth"); //We begin the week after |
|
619 | 619 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstmonth, $firstday, GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); |
620 | 620 | $dayoffset = 0; |
621 | 621 | $monthoffset = 1; |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | reset($object->socpeopleassigned); |
820 | 820 | $object->contact_id = key($object->socpeopleassigned); |
821 | 821 | } |
822 | - $object->fk_project = GETPOSTINT("projectid"); |
|
822 | + $object->fk_project = GETPOSTINT("projectid"); |
|
823 | 823 | $object->note_private = trim(GETPOST("note", "restricthtml")); |
824 | 824 | |
825 | 825 | if (GETPOST("elementtype", 'alpha')) { |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { |
1064 | 1064 | $error = 0; |
1065 | 1065 | |
1066 | - $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1066 | + $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1067 | 1067 | $smin = dol_print_date($object->datep, "%M", 'tzuserrel'); |
1068 | 1068 | |
1069 | 1069 | $newdate = GETPOST('newdate', 'alpha'); |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | $default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV'); |
1274 | 1274 | print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"'); |
1275 | 1275 | $selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default); |
1276 | - print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1276 | + print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1277 | 1277 | print '</td></tr>'; |
1278 | 1278 | } |
1279 | 1279 | |
@@ -1587,7 +1587,7 @@ discard block |
||
1587 | 1587 | } |
1588 | 1588 | //var_dump('origin='.$origin.' originid='.$originid.' hasPermissionOnLinkedObject='.$hasPermissionOnLinkedObject); |
1589 | 1589 | |
1590 | - if (! in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1590 | + if (!in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1591 | 1591 | // We do not use link for object that already contains a hard coded field to make links with agenda events |
1592 | 1592 | print '<tr><td class="titlefieldcreate">' . $langs->trans("LinkedObject") . '</td>'; |
1593 | 1593 | print '<td colspan="3">'; |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | $object->socpeopleassigned[$id] = array('id' => $tmpid); |
1739 | 1739 | } |
1740 | 1740 | $object->contact_id = GETPOSTINT("contactid"); |
1741 | - $object->fk_project = GETPOSTINT("projectid"); |
|
1741 | + $object->fk_project = GETPOSTINT("projectid"); |
|
1742 | 1742 | |
1743 | 1743 | $object->note_private = GETPOST("note", 'restricthtml'); |
1744 | 1744 | } |
@@ -1814,7 +1814,7 @@ discard block |
||
1814 | 1814 | if ($backtopage) { |
1815 | 1815 | print '<input type="hidden" name="backtopage" value="' . ($backtopage != '1' ? $backtopage : '') . '">'; |
1816 | 1816 | } |
1817 | - if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1817 | + if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && !preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1818 | 1818 | print '<input type="hidden" name="actioncode" value="' . $object->type_code . '">'; |
1819 | 1819 | } |
1820 | 1820 | |
@@ -2187,7 +2187,7 @@ discard block |
||
2187 | 2187 | })'; |
2188 | 2188 | print '</script>' . "\n"; |
2189 | 2189 | |
2190 | - print '</div>'; // End of div for reminderparameters |
|
2190 | + print '</div>'; // End of div for reminderparameters |
|
2191 | 2191 | } |
2192 | 2192 | |
2193 | 2193 | print dol_get_fiche_end(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; |
57 | 57 | |
58 | 58 | // $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; |
59 | -$showbirthday = 0; // will be hidden here |
|
59 | +$showbirthday = 0; // will be hidden here |
|
60 | 60 | |
61 | 61 | // If not choice done on calendar owner, we filter on user. |
62 | 62 | if (empty($filtert) && !getDolGlobalString('AGENDA_ALL_CALENDARS')) { |
@@ -997,8 +997,8 @@ discard block |
||
997 | 997 | // We are in a particular day for $username, now we scan all events |
998 | 998 | foreach ($eventarray as $daykey => $notused) { |
999 | 999 | $annee = dol_print_date($daykey, '%Y', 'tzuserrel'); |
1000 | - $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1001 | - $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1000 | + $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1001 | + $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1002 | 1002 | |
1003 | 1003 | if ($day == $jour && (int) $month == (int) $mois && $year == $annee) { // Is it the day we are looking for when calling function ? |
1004 | 1004 | // Scan all event for this date |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $mode = GETPOST('mode', 'aZ09'); |
59 | 59 | if (empty($mode) && preg_match('/show_/', $action)) { |
60 | - $mode = $action; // For backward compatibility |
|
60 | + $mode = $action; // For backward compatibility |
|
61 | 61 | } |
62 | 62 | $resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); |
63 | 63 | $pid = GETPOSTINT("search_projectid", 3) ? GETPOSTINT("search_projectid", 3) : GETPOSTINT("projectid", 3); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | $object->fields = dol_sort_array($object->fields, 'position'); |
181 | 181 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
182 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
182 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
183 | 183 | |
184 | 184 | $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); |
185 | 185 | if ($user->socid && $socid) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | if (isModEnabled('category') && $user->hasRight('agenda', 'myactions', 'create')) { |
415 | 415 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"') . $langs->trans("AffectTag"); |
416 | 416 | } |
417 | -if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
417 | +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
418 | 418 | $arrayofmassactions = array(); |
419 | 419 | } |
420 | 420 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
@@ -1156,8 +1156,8 @@ |
||
1156 | 1156 | // We are in a particular day for $username, now we scan all events |
1157 | 1157 | foreach ($eventarray as $daykey => $notused) { |
1158 | 1158 | $annee = dol_print_date($daykey, '%Y', 'tzuserrel'); |
1159 | - $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | - $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1159 | + $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | + $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1161 | 1161 | //var_dump("daykey=$daykey day=$day jour=$jour, month=$month mois=$mois, year=$year annee=$annee"); |
1162 | 1162 | |
1163 | 1163 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $conf->global->AGENDA_EXT_NB = 5; |
53 | 53 | } |
54 | 54 | $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB'); |
55 | -$DELAYFORCACHE = 300; // 300 seconds |
|
55 | +$DELAYFORCACHE = 300; // 300 seconds |
|
56 | 56 | |
57 | 57 | $disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); |
58 | 58 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $mode = GETPOST('mode', 'aZ09'); |
111 | 111 | if (empty($mode) && preg_match('/show_/', $action)) { |
112 | - $mode = $action; // For backward compatibility |
|
112 | + $mode = $action; // For backward compatibility |
|
113 | 113 | } |
114 | 114 | $resourceid = GETPOST("search_resourceid", 'int'); |
115 | 115 | $year = GETPOSTINT("year") ? GETPOSTINT("year") : date("Y"); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | $defaultview = getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'); // default for app |
147 | -$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
147 | +$defaultview = getDolUserString('AGENDA_DEFAULT_VIEW', $defaultview); // default for user |
|
148 | 148 | if (empty($mode) && !GETPOSTISSET('mode')) { |
149 | 149 | $mode = $defaultview; |
150 | 150 | } |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | |
540 | 540 | $viewmode .= '</div>'; |
541 | 541 | |
542 | -$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
542 | +$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools |
|
543 | 543 | |
544 | 544 | |
545 | 545 | $newparam = ''; |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | $newparam .= '&month=' . ((int) $month) . '&year=' . ((int) $tmpforcreatebutton['year']) . '&mode=' . urlencode($mode); |
551 | 551 | |
552 | 552 | //$param='month='.$monthshown.'&year='.$year; |
553 | - $hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt') . '0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
553 | + $hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt') . '0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
554 | 554 | |
555 | 555 | $urltocreateaction = constant('BASE_URL') . '/comm/action/card.php?action=create'; |
556 | 556 | $urltocreateaction .= '&apyear=' . $tmpforcreatebutton['year'] . '&apmonth=' . $tmpforcreatebutton['mon'] . '&apday=' . $tmpforcreatebutton['mday'] . '&aphour=' . $tmpforcreatebutton['hours'] . '&apmin=' . $tmpforcreatebutton['minutes']; |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $sql .= " WHERE bc.status = 1"; |
577 | 577 | $sql .= " AND ba.status = 1"; |
578 | 578 | if (!empty($filtert) && $filtert != -1) { |
579 | - $sql .= " AND bc.visibility = " . (int) $filtert ; |
|
579 | + $sql .= " AND bc.visibility = " . (int) $filtert; |
|
580 | 580 | } |
581 | 581 | $resql = $db->query($sql); |
582 | 582 | if ($resql) { |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | $s .= '</script>' . "\n"; |
659 | 659 | |
660 | 660 | foreach ($showextcals as $val) { |
661 | - $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
661 | + $htmlname = md5($val['name']); // not used for security purpose, only to get a string with no special char |
|
662 | 662 | |
663 | 663 | if (!empty($val['default']) || GETPOSTINT('check_ext' . $htmlname)) { |
664 | 664 | $default = "checked"; |
@@ -1109,7 +1109,7 @@ discard block |
||
1109 | 1109 | |
1110 | 1110 | if ($mode == 'show_day') { |
1111 | 1111 | // Request only leaves for the current selected day |
1112 | - $sql .= " AND '" . $db->escape($year) . "-" . $db->escape($month) . "-" . $db->escape($day) . "' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time |
|
1112 | + $sql .= " AND '" . $db->escape($year) . "-" . $db->escape($month) . "-" . $db->escape($day) . "' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time |
|
1113 | 1113 | } elseif ($mode == 'show_week') { |
1114 | 1114 | // Restrict on current month (we get more, but we will filter later) |
1115 | 1115 | $sql .= " AND date_debut < '" . $db->idate(dol_get_last_day($year, $month)) . "'"; |
@@ -1655,7 +1655,7 @@ discard block |
||
1655 | 1655 | |
1656 | 1656 | for ($iter_day = 0; $iter_day < 7; $iter_day++) { |
1657 | 1657 | // Show days of the current week |
1658 | - $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
1658 | + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server |
|
1659 | 1659 | $tmpday = dol_print_date($curtime, '%d', 'tzuserrel'); |
1660 | 1660 | $tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel'); |
1661 | 1661 | $tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel'); |
@@ -1885,9 +1885,9 @@ discard block |
||
1885 | 1885 | $tmpholiday = new Holiday($db); |
1886 | 1886 | |
1887 | 1887 | foreach ($eventarray as $daykey => $notused) { // daykey is the 'YYYYMMDD' to show according to user |
1888 | - $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1889 | - $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1890 | - $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1888 | + $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1889 | + $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1890 | + $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' |
|
1891 | 1891 | |
1892 | 1892 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."<br>\n"; |
1893 | 1893 | //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' day='.$day.' month='.$month.' year='.$year."<br>\n"; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * \brief Page to edit absolute discounts for a customer |
27 | 27 | */ |
28 | 28 | |
29 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
29 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
30 | 30 | define('CSRFCHECK_WITH_TOKEN', '1'); |
31 | 31 | } // Force use of CSRF protection with tokens even for GET |
32 | 32 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Parameters |
69 | 69 | $action = GETPOST('action', 'aZ09'); |
70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
72 | 72 | |
73 | 73 | $value = GETPOST('value', 'alpha'); |
74 | 74 | $label = GETPOST('label', 'alpha'); |
@@ -39,13 +39,13 @@ |
||
39 | 39 | // Get parameters |
40 | 40 | $id = GETPOSTINT('id'); |
41 | 41 | $ref = GETPOST('ref', 'alpha'); |
42 | -$lineid = GETPOSTINT('lineid'); |
|
42 | +$lineid = GETPOSTINT('lineid'); |
|
43 | 43 | |
44 | 44 | $action = GETPOST('action', 'aZ09'); |
45 | 45 | $confirm = GETPOST('confirm', 'alpha'); |
46 | 46 | $cancel = GETPOST('cancel', 'aZ09'); |
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
48 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
48 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
50 | 50 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
51 | 51 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |