@@ -685,7 +685,7 @@ |
||
685 | 685 | //print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\n"; |
686 | 686 | // Other attributes |
687 | 687 | $parameters['tdclass'] = 'titlefieldauto'; |
688 | -$parameters['tpl_context'] = 'public'; // define template context to public |
|
688 | +$parameters['tpl_context'] = 'public'; // define template context to public |
|
689 | 689 | include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
690 | 690 | // Comments |
691 | 691 | print '<tr>'; |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | if (!defined("NOSESSION")) { |
46 | 46 | define("NOSESSION", '1'); |
47 | 47 | } |
48 | -if (! defined('NOREQUIREHTML')) { |
|
49 | - define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php |
|
48 | +if (!defined('NOREQUIREHTML')) { |
|
49 | + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php |
|
50 | 50 | } |
51 | -if (! defined('NOREQUIREAJAX')) { |
|
52 | - define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library |
|
51 | +if (!defined('NOREQUIREAJAX')) { |
|
52 | + define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $mtid = GETPOST('mtid'); |
65 | 65 | $email = GETPOST('email'); |
66 | -$tag = GETPOST('tag'); // To retrieve the emailing, and recipient |
|
66 | +$tag = GETPOST('tag'); // To retrieve the emailing, and recipient |
|
67 | 67 | $unsuscrib = GETPOST('unsuscrib'); |
68 | 68 | $securitykey = GETPOST('securitykey'); |
69 | 69 |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | */ |
374 | 374 | function encodePath(string $path): string |
375 | 375 | { |
376 | - return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\)\/:@])/', function ($match) { |
|
376 | + return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\)\/:@])/', function($match) { |
|
377 | 377 | return '%' . sprintf('%02x', ord($match[0])); |
378 | 378 | }, $path); |
379 | 379 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | */ |
386 | 386 | function encodePathSegment(string $pathSegment): string |
387 | 387 | { |
388 | - return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\):@])/', function ($match) { |
|
388 | + return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\):@])/', function($match) { |
|
389 | 389 | return '%' . sprintf('%02x', ord($match[0])); |
390 | 390 | }, $pathSegment); |
391 | 391 | } |
@@ -491,29 +491,29 @@ |
||
491 | 491 | { |
492 | 492 | // \d{8}|\d{4}-\d\d|--\d\d(\d\d)?|---\d\d |
493 | 493 | $valueDate = '/^(?J)(?:' . |
494 | - '(?<year>\d{4})(?<month>\d\d)(?<date>\d\d)' . |
|
495 | - '|(?<year>\d{4})-(?<month>\d\d)' . |
|
496 | - '|--(?<month>\d\d)(?<date>\d\d)?' . |
|
497 | - '|---(?<date>\d\d)' . |
|
498 | - ')$/'; |
|
494 | + '(?<year>\d{4})(?<month>\d\d)(?<date>\d\d)' . |
|
495 | + '|(?<year>\d{4})-(?<month>\d\d)' . |
|
496 | + '|--(?<month>\d\d)(?<date>\d\d)?' . |
|
497 | + '|---(?<date>\d\d)' . |
|
498 | + ')$/'; |
|
499 | 499 | |
500 | 500 | // (\d\d(\d\d(\d\d)?)?|-\d\d(\d\d)?|--\d\d)(Z|[+\-]\d\d(\d\d)?)? |
501 | 501 | $valueTime = '/^(?J)(?:' . |
502 | - '((?<hour>\d\d)((?<minute>\d\d)(?<second>\d\d)?)?' . |
|
503 | - '|-(?<minute>\d\d)(?<second>\d\d)?' . |
|
504 | - '|--(?<second>\d\d))' . |
|
505 | - '(?<timezone>(Z|[+\-]\d\d(\d\d)?))?' . |
|
506 | - ')$/'; |
|
502 | + '((?<hour>\d\d)((?<minute>\d\d)(?<second>\d\d)?)?' . |
|
503 | + '|-(?<minute>\d\d)(?<second>\d\d)?' . |
|
504 | + '|--(?<second>\d\d))' . |
|
505 | + '(?<timezone>(Z|[+\-]\d\d(\d\d)?))?' . |
|
506 | + ')$/'; |
|
507 | 507 | |
508 | 508 | // (\d{8}|--\d{4}|---\d\d)T\d\d(\d\d(\d\d)?)?(Z|[+\-]\d\d(\d\d?)? |
509 | 509 | $valueDateTime = '/^(?:' . |
510 | - '((?<year0>\d{4})(?<month0>\d\d)(?<date0>\d\d)' . |
|
511 | - '|--(?<month1>\d\d)(?<date1>\d\d)' . |
|
512 | - '|---(?<date2>\d\d))' . |
|
513 | - 'T' . |
|
514 | - '(?<hour>\d\d)((?<minute>\d\d)(?<second>\d\d)?)?' . |
|
515 | - '(?<timezone>(Z|[+\-]\d\d(\d\d?)))?' . |
|
516 | - ')$/'; |
|
510 | + '((?<year0>\d{4})(?<month0>\d\d)(?<date0>\d\d)' . |
|
511 | + '|--(?<month1>\d\d)(?<date1>\d\d)' . |
|
512 | + '|---(?<date2>\d\d))' . |
|
513 | + 'T' . |
|
514 | + '(?<hour>\d\d)((?<minute>\d\d)(?<second>\d\d)?)?' . |
|
515 | + '(?<timezone>(Z|[+\-]\d\d(\d\d?)))?' . |
|
516 | + ')$/'; |
|
517 | 517 | |
518 | 518 | // date-and-or-time is date | date-time | time |
519 | 519 | // in this strict order. |
@@ -275,7 +275,7 @@ |
||
275 | 275 | |
276 | 276 | return $this->name . '=' . array_reduce( |
277 | 277 | $value, |
278 | - function ($out, $item) { |
|
278 | + function($out, $item) { |
|
279 | 279 | if (!is_null($out)) { |
280 | 280 | $out .= ','; |
281 | 281 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | // more. |
238 | 238 | return array_filter( |
239 | 239 | $result, |
240 | - function ($child) use ($group) { |
|
240 | + function($child) use ($group) { |
|
241 | 241 | return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group; |
242 | 242 | } |
243 | 243 | ); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | * |
283 | 283 | * @return int |
284 | 284 | */ |
285 | - $sortScore = function ($key, $array) { |
|
285 | + $sortScore = function($key, $array) { |
|
286 | 286 | if ($array[$key] instanceof Component) { |
287 | 287 | // We want to encode VTIMEZONE first, this is a personal |
288 | 288 | // preference. |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $tmp = $children; |
318 | 318 | uksort( |
319 | 319 | $children, |
320 | - function ($a, $b) use ($sortScore, $tmp) { |
|
320 | + function($a, $b) use ($sortScore, $tmp) { |
|
321 | 321 | $sA = $sortScore($a, $tmp); |
322 | 322 | $sB = $sortScore($b, $tmp); |
323 | 323 |
@@ -208,7 +208,7 @@ |
||
208 | 208 | $vavailComps = iterator_to_array($vavailability->VAVAILABILITY); |
209 | 209 | usort( |
210 | 210 | $vavailComps, |
211 | - function ($a, $b) { |
|
211 | + function($a, $b) { |
|
212 | 212 | // We need to order the components by priority. Priority 1 |
213 | 213 | // comes first, up until priority 9. Priority 0 comes after |
214 | 214 | // priority 9. No priority implies priority 0. |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function getBaseComponents($componentName = null) |
177 | 177 | { |
178 | - $isBaseComponent = function ($component) { |
|
178 | + $isBaseComponent = function($component) { |
|
179 | 179 | if (!$component instanceof VObject\Component) { |
180 | 180 | return false; |
181 | 181 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function getBaseComponent($componentName = null) |
228 | 228 | { |
229 | - $isBaseComponent = function ($component) { |
|
229 | + $isBaseComponent = function($component) { |
|
230 | 230 | if (!$component instanceof VObject\Component) { |
231 | 231 | return false; |
232 | 232 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $timeZone = new DateTimeZone('UTC'); |
291 | 291 | } |
292 | 292 | |
293 | - $stripTimezones = function (Component $component) use ($timeZone, &$stripTimezones) { |
|
293 | + $stripTimezones = function(Component $component) use ($timeZone, &$stripTimezones) { |
|
294 | 294 | foreach ($component->children() as $componentChild) { |
295 | 295 | if ($componentChild instanceof Property\ICalendar\DateTime && $componentChild->hasTime()) { |
296 | 296 | $dt = $componentChild->getDateTimes($timeZone); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | */ |
517 | 517 | public function getByUID($uid) |
518 | 518 | { |
519 | - return array_filter($this->getComponents(), function ($item) use ($uid) { |
|
519 | + return array_filter($this->getComponents(), function($item) use ($uid) { |
|
520 | 520 | if (!$itemUid = $item->select('UID')) { |
521 | 521 | return false; |
522 | 522 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | 'ROLE' => VObject\Property\FlatText::class, |
89 | 89 | 'LOGO' => VObject\Property\Binary::class, |
90 | 90 | // 'AGENT' => 'Sabre\\VObject\\Property\\', // Todo: is an embedded vCard. Probably rare, so |
91 | - // not supported at the moment |
|
91 | + // not supported at the moment |
|
92 | 92 | 'ORG' => VObject\Property\Text::class, |
93 | 93 | 'NOTE' => VObject\Property\FlatText::class, |
94 | 94 | 'REV' => VObject\Property\VCard\TimeStamp::class, |
@@ -50,7 +50,7 @@ |
||
50 | 50 | public static $valueMap = [ |
51 | 51 | 'BINARY' => VObject\Property\Binary::class, |
52 | 52 | 'BOOLEAN' => VObject\Property\Boolean::class, |
53 | - 'CONTENT-ID' => VObject\Property\FlatText::class, // vCard 2.1 only |
|
53 | + 'CONTENT-ID' => VObject\Property\FlatText::class, // vCard 2.1 only |
|
54 | 54 | 'DATE' => VObject\Property\VCard\Date::class, |
55 | 55 | 'DATE-TIME' => VObject\Property\VCard\DateTime::class, |
56 | 56 | 'DATE-AND-OR-TIME' => VObject\Property\VCard\DateAndOrTime::class, // vCard only |