Completed
Push — master ( 55a138...ee7aee )
by Michael
05:41
created
class/ExtcalPersistableObjectHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -536,7 +536,7 @@
 block discarded – undo
536 536
 
537 537
     /**
538 538
      * @param        $objects
539
-     * @param array  $externalKeys
539
+     * @param string[]  $externalKeys
540 540
      * @param string $format
541 541
      *
542 542
      * @return array
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         if (is_array($this->keyName)) {
105 105
             $criteria = new \CriteriaCompo();
106 106
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
107
-                $criteria->add(new \Criteria($this->keyName[$i], (int)$id[$i]));
107
+                $criteria->add(new \Criteria($this->keyName[$i], (int) $id[$i]));
108 108
             }
109 109
         } else {
110
-            $criteria = new \Criteria($this->keyName, (int)$id);
110
+            $criteria = new \Criteria($this->keyName, (int) $id);
111 111
         }
112 112
         $criteria->setLimit(1);
113 113
         $objectArray = $this->getObjects($criteria, false, true);
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $ret   = [];
133 133
         $limit = $start = 0;
134
-        $sql   = 'SELECT * FROM ' . $this->table;
134
+        $sql   = 'SELECT * FROM '.$this->table;
135 135
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
136
-            $sql .= ' ' . $criteria->renderWhere();
136
+            $sql .= ' '.$criteria->renderWhere();
137 137
             if ('' != $criteria->getSort()) {
138
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
138
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
139 139
             }
140 140
             $limit = $criteria->getLimit();
141 141
             $start = $criteria->getStart();
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     $ret[] = $obj;
171 171
                 } else {
172 172
                     $row  = [];
173
-                    $vars =& $obj->getVars();
173
+                    $vars = & $obj->getVars();
174 174
                     foreach (array_keys($vars) as $i) {
175 175
                         $row[$i] = $obj->getVar($i);
176 176
                     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                     $ret[$myrow[$this->keyName]] = $obj;
182 182
                 } else {
183 183
                     $row  = [];
184
-                    $vars =& $obj->getVars();
184
+                    $vars = & $obj->getVars();
185 185
                     foreach (array_keys($vars) as $i) {
186 186
                         $row[$i] = $obj->getVar($i);
187 187
                     }
@@ -214,15 +214,15 @@  discard block
 block discarded – undo
214 214
             $criteria->setSort($this->identifierName);
215 215
         }
216 216
 
217
-        $sql = 'SELECT ' . $this->keyName;
217
+        $sql = 'SELECT '.$this->keyName;
218 218
         if (!empty($this->identifierName)) {
219
-            $sql .= ', ' . $this->identifierName;
219
+            $sql .= ', '.$this->identifierName;
220 220
         }
221
-        $sql .= ' FROM ' . $this->table;
221
+        $sql .= ' FROM '.$this->table;
222 222
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
223
-            $sql .= ' ' . $criteria->renderWhere();
223
+            $sql .= ' '.$criteria->renderWhere();
224 224
             if ('' != $criteria->getSort()) {
225
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
225
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
226 226
             }
227 227
             $limit = $criteria->getLimit();
228 228
             $start = $criteria->getStart();
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
256 256
             if ('' != $criteria->groupby) {
257 257
                 $groupby = true;
258
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
258
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
259 259
             }
260 260
         }
261
-        $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table;
261
+        $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
262 262
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
263
-            $sql .= ' ' . $criteria->renderWhere();
263
+            $sql .= ' '.$criteria->renderWhere();
264 264
             if ('' != $criteria->groupby) {
265 265
                 $sql .= $criteria->getGroupby();
266 266
             }
@@ -296,13 +296,13 @@  discard block
 block discarded – undo
296 296
         if (is_array($this->keyName)) {
297 297
             $clause = [];
298 298
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
299
-                $clause[] = $this->keyName[$i] . ' = ' . $id[$i];
299
+                $clause[] = $this->keyName[$i].' = '.$id[$i];
300 300
             }
301 301
             $whereclause = implode(' AND ', $clause);
302 302
         } else {
303
-            $whereclause = $this->keyName . ' = ' . $id;
303
+            $whereclause = $this->keyName.' = '.$id;
304 304
         }
305
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
305
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
306 306
         if (false !== $force) {
307 307
             $result = $this->db->queryF($sql);
308 308
         } else {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             }
334 334
 
335 335
             if (!($obj instanceof $this->className && class_exists($this->className))) {
336
-                $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
336
+                $obj->setErrors(get_class($obj).' Differs from '.$this->className);
337 337
 
338 338
                 return false;
339 339
             }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         foreach ($obj->cleanVars as $k => $v) {
346 346
             if (XOBJ_DTYPE_INT == $obj->vars[$k]['data_type']) {
347
-                $cleanvars[$k] = (int)$v;
347
+                $cleanvars[$k] = (int) $v;
348 348
             } elseif (is_array($v)) {
349 349
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
350 350
             } else {
@@ -354,12 +354,12 @@  discard block
 block discarded – undo
354 354
         if ($obj->isNew()) {
355 355
             if (!is_array($this->keyName)) {
356 356
                 if ($cleanvars[$this->keyName] < 1) {
357
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
357
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
358 358
                 }
359 359
             }
360
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
360
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')';
361 361
         } else {
362
-            $sql = 'UPDATE ' . $this->table . ' SET';
362
+            $sql = 'UPDATE '.$this->table.' SET';
363 363
             foreach ($cleanvars as $key => $value) {
364 364
                 if ((!is_array($this->keyName) && $key == $this->keyName)
365 365
                     || (is_array($this->keyName)
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                 if (isset($notfirst)) {
370 370
                     $sql .= ',';
371 371
                 }
372
-                $sql      .= ' ' . $key . ' = ' . $value;
372
+                $sql .= ' '.$key.' = '.$value;
373 373
                 $notfirst = true;
374 374
             }
375 375
             if (is_array($this->keyName)) {
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
                     if ($i > 0) {
379 379
                         $whereclause .= ' AND ';
380 380
                     }
381
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
381
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
382 382
                 }
383 383
             } else {
384
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
384
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
385 385
             }
386
-            $sql .= ' WHERE ' . $whereclause;
386
+            $sql .= ' WHERE '.$whereclause;
387 387
         }
388 388
         if (false !== $force) {
389 389
             $result = $this->db->queryF($sql);
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      */
413 413
     public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false)
414 414
     {
415
-        $setClause = $fieldname . ' = ';
415
+        $setClause = $fieldname.' = ';
416 416
         if (is_numeric($fieldvalue)) {
417 417
             $setClause .= $fieldvalue;
418 418
         } elseif (is_array($fieldvalue)) {
@@ -420,9 +420,9 @@  discard block
 block discarded – undo
420 420
         } else {
421 421
             $setClause .= $this->db->quoteString($fieldvalue);
422 422
         }
423
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause;
423
+        $sql = 'UPDATE '.$this->table.' SET '.$setClause;
424 424
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
425
-            $sql .= ' ' . $criteria->renderWhere();
425
+            $sql .= ' '.$criteria->renderWhere();
426 426
         }
427 427
         if (false !== $force) {
428 428
             $result = $this->db->queryF($sql);
@@ -446,9 +446,9 @@  discard block
 block discarded – undo
446 446
      */
447 447
     public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
448 448
     {
449
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;
449
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
450 450
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
451
-            $sql .= ' ' . $criteria->renderWhere();
451
+            $sql .= ' '.$criteria->renderWhere();
452 452
         }
453 453
         if (false !== $force) {
454 454
             $result = $this->db->queryF($sql);
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
     public function deleteAll(\CriteriaElement $criteria = null, $force = true, $asObject = false)
476 476
     {
477 477
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
478
-            $sql = 'DELETE FROM ' . $this->table;
479
-            $sql .= ' ' . $criteria->renderWhere();
478
+            $sql = 'DELETE FROM '.$this->table;
479
+            $sql .= ' '.$criteria->renderWhere();
480 480
             if (!$this->db->query($sql)) {
481 481
                 return false;
482 482
             }
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
      */
611 611
     public function updateCounter($fieldname, $criteria, $op = '+')
612 612
     {
613
-        $sql    = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';
614
-        $sql    .= ' ' . $criteria->renderWhere();
613
+        $sql    = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
614
+        $sql .= ' '.$criteria->renderWhere();
615 615
         $result = $this->db->queryF($sql);
616 616
         if (!$result) {
617 617
             return false;
@@ -633,12 +633,12 @@  discard block
 block discarded – undo
633 633
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
634 634
             if ('' != $criteria->groupby) {
635 635
                 $groupby = true;
636
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
636
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
637 637
             }
638 638
         }
639
-        $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;
639
+        $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
640 640
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
641
-            $sql .= ' ' . $criteria->renderWhere();
641
+            $sql .= ' '.$criteria->renderWhere();
642 642
             if ('' != $criteria->groupby) {
643 643
                 $sql .= $criteria->getGroupby();
644 644
             }
@@ -674,12 +674,12 @@  discard block
 block discarded – undo
674 674
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
675 675
             if ('' != $criteria->groupby) {
676 676
                 $groupby = true;
677
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
677
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
678 678
             }
679 679
         }
680
-        $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;
680
+        $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
681 681
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
682
-            $sql .= ' ' . $criteria->renderWhere();
682
+            $sql .= ' '.$criteria->renderWhere();
683 683
             if ('' != $criteria->groupby) {
684 684
                 $sql .= $criteria->getGroupby();
685 685
             }
@@ -712,9 +712,9 @@  discard block
 block discarded – undo
712 712
     {
713 713
         $field = '';
714 714
 
715
-        $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;
715
+        $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
716 716
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
717
-            $sql .= ' ' . $criteria->renderWhere();
717
+            $sql .= ' '.$criteria->renderWhere();
718 718
         }
719 719
         $result = $this->db->query($sql);
720 720
         if (!$result) {
Please login to merge, or discard this patch.
include/constantes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
108 108
 
109 109
 define('_EXTCAL_NAV_LIST',
110
-       _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
110
+        _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
111 111
 
112 112
 define('_EXTCAL_PREFIX_VIEW', 'view_');
113 113
 define('_EXTCAL_SUFFIX_VIEW', '.php');
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 define('_EXTCAL_CLN_EVENT', 'Event');
42 42
 
43 43
 //-------------------------------------------------------------------
44
-define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__ . '/../class/pear');
44
+define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__.'/../class/pear');
45 45
 //define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' );
46 46
 
47 47
 $pear_path = _EXTCAL_PEAR_ROOT_DEFAULT;
@@ -78,22 +78,22 @@  discard block
 block discarded – undo
78 78
 //}
79 79
 define('_EXTCAL_PEAR_ROOT', $pear_path);
80 80
 
81
-define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar');
82
-define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/');
81
+define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT.'/Calendar');
82
+define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT.'/');
83 83
 
84 84
 //-------------------------------------------------------------------
85 85
 define('_EXTCAL_SHOW_NO_PICTURE', false);
86 86
 
87 87
 define('_EXTCAL_PATH_HORLOGES', '/modules/extcal/assets/images/horloges/');
88
-define('_EXTCAL_PATH_ICONS16', XOOPS_URL . '/Frameworks/moduleclasses/icons/16/');
89
-define('_EXTCAL_PATH_ICONS32', XOOPS_URL . '/Frameworks/moduleclasses/icons/32/');
90
-define('_EXTCAL_PATH_FO', XOOPS_URL . '/modules/extcal/');
91
-define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO . 'admin/');
92
-define('_EXTCAL_PATH_LG', XOOPS_URL . '/modules/extcal/languages/');
88
+define('_EXTCAL_PATH_ICONS16', XOOPS_URL.'/Frameworks/moduleclasses/icons/16/');
89
+define('_EXTCAL_PATH_ICONS32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32/');
90
+define('_EXTCAL_PATH_FO', XOOPS_URL.'/modules/extcal/');
91
+define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO.'admin/');
92
+define('_EXTCAL_PATH_LG', XOOPS_URL.'/modules/extcal/languages/');
93 93
 
94 94
 define('_EXTCAL_IMG_INTERVAL', 'interval04.png');
95
-define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16 . _EXTCAL_IMG_INTERVAL);
96
-define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32 . _EXTCAL_IMG_INTERVAL);
95
+define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16._EXTCAL_IMG_INTERVAL);
96
+define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32._EXTCAL_IMG_INTERVAL);
97 97
 
98 98
 //define('_EXTCAL_DIRNAME',    $xoopsModule->getVar('dirname'));
99 99
 
@@ -109,21 +109,21 @@  discard block
 block discarded – undo
109 109
 define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
110 110
 
111 111
 define('_EXTCAL_NAV_LIST',
112
-       _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
112
+       _EXTCAL_NAV_CALMONTH."\n"._EXTCAL_NAV_CALWEEK."\n"._EXTCAL_NAV_YEAR."\n"._EXTCAL_NAV_MONTH."\n"._EXTCAL_NAV_WEEK."\n"._EXTCAL_NAV_DAY."\n"._EXTCAL_NAV_AGENDA_WEEK."\n"._EXTCAL_NAV_AGENDA_DAY."\n"._EXTCAL_NAV_SEARCH."\n"._EXTCAL_NAV_NEW_EVENT);
113 113
 
114 114
 define('_EXTCAL_PREFIX_VIEW', 'view_');
115 115
 define('_EXTCAL_SUFFIX_VIEW', '.php');
116 116
 
117
-define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW);
118
-define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW);
119
-define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW);
120
-define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW);
121
-define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW);
122
-define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW);
123
-define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW);
124
-define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW);
125
-define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW);
126
-define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW);
117
+define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALMONTH._EXTCAL_SUFFIX_VIEW);
118
+define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALWEEK._EXTCAL_SUFFIX_VIEW);
119
+define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_YEAR._EXTCAL_SUFFIX_VIEW);
120
+define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_MONTH._EXTCAL_SUFFIX_VIEW);
121
+define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_WEEK._EXTCAL_SUFFIX_VIEW);
122
+define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_DAY._EXTCAL_SUFFIX_VIEW);
123
+define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_WEEK._EXTCAL_SUFFIX_VIEW);
124
+define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_DAY._EXTCAL_SUFFIX_VIEW);
125
+define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_SEARCH._EXTCAL_SUFFIX_VIEW);
126
+define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_NEW_EVENT._EXTCAL_SUFFIX_VIEW);
127 127
 
128 128
 define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php');
129 129
 
Please login to merge, or discard this patch.
admin/permissions.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
22
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
22
+require_once __DIR__.'/admin_header.php';
23 23
 
24 24
 $step = 'default';
25 25
 if (isset($_POST['step'])) {
@@ -95,35 +95,35 @@  discard block
 block discarded – undo
95 95
         echo '<fieldset id="defaultBookmark"><legend><a href="#defaultBookmark" style="font-weight:bold; color:#990000;" onClick="toggle(\'default\'); toggleIcon(\'defaultIcon\');"><img id="defaultIcon" src="../assets/images/icons/minus.gif">&nbsp;'
96 96
              . _AM_EXTCAL_PUBLIC_PERM_MASK
97 97
              . '</a></legend><div id="default">';
98
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
98
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
99 99
         echo _AM_EXTCAL_PUBLIC_PERM_MASK_INFO;
100 100
         echo '</fieldset><br>';
101 101
         echo '<table class="outer" style="width:100%;">';
102 102
         echo '<form method="post" action="permissions.php">';
103 103
         echo '<tr>';
104
-        echo '<th colspan="8" style="text-align:center;">' . _AM_EXTCAL_PUBLIC_PERM_MASK . '</th>';
104
+        echo '<th colspan="8" style="text-align:center;">'._AM_EXTCAL_PUBLIC_PERM_MASK.'</th>';
105 105
         echo '</tr>';
106 106
         echo '<tr>';
107
-        echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_GROUP_NAME . '</td>';
108
-        echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_VIEW . '</td>';
109
-        echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_SUBMIT . '</td>';
110
-        echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_AUTO_APPROVE . '</td>';
111
-        echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_EDIT . '</td>';
107
+        echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_GROUP_NAME.'</td>';
108
+        echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_VIEW.'</td>';
109
+        echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_SUBMIT.'</td>';
110
+        echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_AUTO_APPROVE.'</td>';
111
+        echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_EDIT.'</td>';
112 112
         echo '</tr>';
113 113
         $i = 0;
114 114
         foreach ($glist as $k => $v) {
115 115
             $style = (0 == ++$i % 2) ? 'odd' : 'even';
116 116
             echo '<tr>';
117
-            echo '<td class="' . $style . '">' . $v . '</td>';
118
-            echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][1]" type="checkbox"' . getChecked($viewGroup, $k) . '></td>';
119
-            echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][2]" type="checkbox"' . getChecked($submitGroup, $k) . '></td>';
120
-            echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][4]" type="checkbox"' . getChecked($autoApproveGroup, $k) . '></td>';
121
-            echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][8]" type="checkbox"' . getChecked($editGroup, $k) . '></td>';
117
+            echo '<td class="'.$style.'">'.$v.'</td>';
118
+            echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][1]" type="checkbox"'.getChecked($viewGroup, $k).'></td>';
119
+            echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][2]" type="checkbox"'.getChecked($submitGroup, $k).'></td>';
120
+            echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][4]" type="checkbox"'.getChecked($autoApproveGroup, $k).'></td>';
121
+            echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][8]" type="checkbox"'.getChecked($editGroup, $k).'></td>';
122 122
             echo '</tr>';
123 123
         }
124 124
         echo '<input type="hidden" name="type" value="public">';
125 125
         echo '<input type="hidden" name="step" value="enreg">';
126
-        echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="' . _SUBMIT . '"></td></tr></form>';
126
+        echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="'._SUBMIT.'"></td></tr></form>';
127 127
         echo '</table><br>';
128 128
 
129 129
         echo '</div></fieldset><br>';
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
              . '</a></legend><div id="'
159 159
              . $permName
160 160
              . '">';
161
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
161
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
162 162
         echo $permDesc;
163 163
         echo '</fieldset>';
164 164
 
165 165
         if ($catHandler->getCount()) {
166
-            echo $form->render() . '<br>';
166
+            echo $form->render().'<br>';
167 167
         } else {
168 168
             redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false);
169 169
         }
@@ -196,11 +196,11 @@  discard block
 block discarded – undo
196 196
              . '</a></legend><div id="'
197 197
              . $permName
198 198
              . '">';
199
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
199
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
200 200
         echo $permDesc;
201 201
         echo '</fieldset>';
202 202
         if ($catHandler->getCount()) {
203
-            echo $form->render() . '<br>';
203
+            echo $form->render().'<br>';
204 204
         } else {
205 205
             redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false);
206 206
         }
@@ -233,11 +233,11 @@  discard block
 block discarded – undo
233 233
              . '</a></legend><div id="'
234 234
              . $permName
235 235
              . '">';
236
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
236
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
237 237
         echo $permDesc;
238 238
         echo '</fieldset>';
239 239
         if ($catHandler->getCount()) {
240
-            echo $form->render() . '<br>';
240
+            echo $form->render().'<br>';
241 241
         } else {
242 242
             redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false);
243 243
         }
@@ -270,11 +270,11 @@  discard block
 block discarded – undo
270 270
              . '</a></legend><div id="'
271 271
              . $permName
272 272
              . '">';
273
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
273
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
274 274
         echo $permDesc;
275 275
         echo '</fieldset>';
276 276
         if ($catHandler->getCount()) {
277
-            echo $form->render() . '<br>';
277
+            echo $form->render().'<br>';
278 278
         } else {
279 279
             redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false);
280 280
         }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         echo 'toggle(\'extcal_cat_edit\'); toggleIcon (\'extcal_cat_editIcon\');';
292 292
         echo '</script>';
293 293
 
294
-        require_once __DIR__ . '/admin_footer.php';
294
+        require_once __DIR__.'/admin_footer.php';
295 295
 
296 296
         break;
297 297
 
Please login to merge, or discard this patch.
blocks/minical.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -455,11 +455,11 @@
 block discarded – undo
455 455
  * @param array      $event
456 456
  * @param array      $eventsArray
457 457
  * @param Extcal\Time       $timeHandler
458
- * @param            $startMonth
459
- * @param            $endMonth
458
+ * @param            integer $startMonth
459
+ * @param            integer $endMonth
460 460
  * @param            $cats
461 461
  *
462
- * @return bool
462
+ * @return false|null
463 463
  */
464 464
 function bExtcalMinicalAddEventToArray($event, &$eventsArray, $timeHandler, $startMonth, $endMonth, $cats)
465 465
 {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
     // Flag current day
167 167
     $selectedDays = [
168 168
         new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $timeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), date('n', xoops_getUserTimestamp(time(), $timeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))),
169
-                         date('j', xoops_getUserTimestamp(time(), $timeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
169
+                            date('j', xoops_getUserTimestamp(time(), $timeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
170 170
     ];
171 171
 
172 172
     // Build calendar object
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 use XoopsModules\Extcal;
21 21
 
22 22
 global $extcalConfig, $xoopsUser;
23
-require_once __DIR__ . '/../include/constantes.php';
23
+require_once __DIR__.'/../include/constantes.php';
24 24
 //require_once __DIR__ . '/../class/Utility.php';
25 25
 //require_once __DIR__ . '/../class/tableForm.php';
26 26
 //---------------------------------------------------------------------------
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
     //    require_once __DIR__ . '/../class/config.php';
39 39
 
40
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php';
41
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php';
42
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php';
40
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php';
41
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php';
42
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php';
43 43
     //     require_once CALENDAR_ROOT . 'Month/Weeks.php';
44 44
     //     require_once CALENDAR_ROOT . 'Day.php';
45 45
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             'category'     => $tCatSelected,
129 129
             'externalKeys' => 'cat_id',
130 130
         ];
131
-        $events   = $eventHandler->getEventsOnPeriode($criteres);
131
+        $events = $eventHandler->getEventsOnPeriode($criteres);
132 132
     } else {
133 133
         $events = [];
134 134
     }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 'number'     => $dayCalObj->thisDay(),
191 191
                 'isSelected' => $dayCalObj->isSelected(),
192 192
             ];
193
-            $day                                = $dayCalObj->thisDay();
193
+            $day = $dayCalObj->thisDay();
194 194
             if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) {
195 195
                 $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true;
196 196
                 $tableRows[$rowId]['week'][$cellId]['color']      = $eventsArray[$day]['color'];
@@ -220,15 +220,15 @@  discard block
 block discarded – undo
220 220
     // Making navig data
221 221
     $navig = [
222 222
         'page' => $extcalConfig['start_page'],
223
-        'uri'  => 'year=' . $monthCalObj->thisYear() . '&amp;month=' . $monthCalObj->thisMonth(),
223
+        'uri'  => 'year='.$monthCalObj->thisYear().'&amp;month='.$monthCalObj->thisMonth(),
224 224
         'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()),
225 225
     ];
226 226
 
227 227
     $horloge             = [];
228 228
     $horloge['display']  = ('' != trim($options[11]));
229
-    $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11];
230
-    $horloge['width']    = $options[12] . 'px';
231
-    $horloge['height']   = $options[13] . 'px';
229
+    $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11];
230
+    $horloge['width']    = $options[12].'px';
231
+    $horloge['height']   = $options[13].'px';
232 232
 
233 233
     $ret = [
234 234
         'imageParam'   => $imageParam,
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     $imageCatHandler = xoops_getHandler('imagecategory');
276 276
 
277 277
     //=====================================================================
278
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head');
278
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head');
279 279
 
280 280
     $k           = 0;
281 281
     $xfValue[$k] = new \XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]);
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     $xfValue[$k] = new Extcal\Form\Spin\FormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = '');
317 317
     $form->addElement($xfValue[$k], false);
318 318
     //=====================================================================
319
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head');
319
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head');
320 320
 
321 321
     $t = [
322 322
         -1 => _MB_EXTCAL_PREVIEW,
@@ -355,9 +355,9 @@  discard block
 block discarded – undo
355 355
     $form->addElement($xfValue[$k], false);
356 356
 
357 357
     //=====================================================================
358
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head');
358
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head');
359 359
     //---------------------------------------------------------------------
360
-    $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES);
360
+    $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES);
361 361
     $t = array_merge([' ' => _NONE], $t);
362 362
 
363 363
     $k           = 11;
@@ -442,12 +442,12 @@  discard block
 block discarded – undo
442 442
         // $src   = $doc->createElement('src');
443 443
         $src   = clone $tempSrc;
444 444
         $src   = $photo->appendChild($src);
445
-        $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name'));
445
+        $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name'));
446 446
         $src->appendChild($value);
447 447
     }
448 448
 
449 449
     // get completed xml document
450
-    $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml');
450
+    $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml');
451 451
 }
452 452
 
453 453
 /**************************************************************************/
Please login to merge, or discard this patch.
class/EventHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -889,7 +889,7 @@
 block discarded – undo
889 889
 
890 890
     /**
891 891
      * @param $criteria
892
-     * @param $cats
892
+     * @param integer $cats
893 893
      */
894 894
     public function addCatSelectCriteria(&$criteria, $cats = null)
895 895
     {
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
25 25
 
26
-require_once __DIR__ . '/../include/constantes.php';
26
+require_once __DIR__.'/../include/constantes.php';
27 27
 
28 28
 /**
29 29
  * Class EventHandler.
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
         //        while (list($k, $v) = each($events)) {
339 339
         foreach ($events as $k => $v) {
340
-            $ordre[] = (int)$v['event_start'];
340
+            $ordre[] = (int) $v['event_start'];
341 341
             $this->formatEventDate($v, $extcalConfig['event_date_week']);
342 342
             //$v['cat']['cat_light_color'] = $v['cat']['cat_color'];
343 343
             $v['cat']['cat_light_color'] = Extcal\Utility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX);
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 
543 543
         reset($period);
544 544
         foreach ($period as $dt) {
545
-            echo $dt->format("l d-m-Y H:i:s\n") . '<br>';
545
+            echo $dt->format("l d-m-Y H:i:s\n").'<br>';
546 546
         }
547 547
     }
548 548
 
@@ -875,10 +875,10 @@  discard block
 block discarded – undo
875 875
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
876 876
         $count                = count($authorizedAccessCats);
877 877
         if ($count > 0) {
878
-            $in = '(' . $authorizedAccessCats[0];
878
+            $in = '('.$authorizedAccessCats[0];
879 879
             array_shift($authorizedAccessCats);
880 880
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
881
-                $in .= ',' . $authorizedAccessCat;
881
+                $in .= ','.$authorizedAccessCat;
882 882
             }
883 883
             $in .= ')';
884 884
             $criteria->add(new \Criteria('cat_id', $in, 'IN'));
@@ -898,10 +898,10 @@  discard block
 block discarded – undo
898 898
         }
899 899
         if (is_array($cats)) {
900 900
             if (false === array_search(0, $cats)) {
901
-                $in = '(' . current($cats);
901
+                $in = '('.current($cats);
902 902
                 array_shift($cats);
903 903
                 foreach ($cats as $cat) {
904
-                    $in .= ',' . $cat;
904
+                    $in .= ','.$cat;
905 905
                 }
906 906
                 $in .= ')';
907 907
                 $criteria->add(new \Criteria('cat_id', $in, 'IN'));
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
             if ('clone' === $mode) {
943 943
                 $data['event_id'] = 0;
944 944
                 $event->setVar('event_id', 0);
945
-                $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')';
945
+                $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')';
946 946
                 $event->setVar('event_title', $newTitle);
947 947
             }
948 948
 
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
         $form->addElement($catSelect, true);
1127 1127
         //-----------------------------------------------------------
1128 1128
 
1129
-        $file_path = __DIR__ . '/../assets/css/images';
1129
+        $file_path = __DIR__.'/../assets/css/images';
1130 1130
         $tf        = \XoopsLists::getImgListAsArray($file_path);
1131 1131
         array_unshift($tf, _MD_EXTCAL_NONE);
1132 1132
         $xfIcones = new \XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, '');
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
         if (count($files) > 0) {
1232 1232
             $eventFiles = new Extcal\Form\FormFileCheckBox('', 'filetokeep');
1233 1233
             foreach ($files as $file) {
1234
-                $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size'];
1234
+                $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size'];
1235 1235
                 $eventFiles->addOption($file['file_id'], $name);
1236 1236
             }
1237 1237
             $fileElmtTray->addElement($eventFiles);
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
         //Picture1
1248 1248
         $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), '');
1249 1249
         if (!empty($event_picture1)) {
1250
-            $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>"));
1250
+            $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>"));
1251 1251
             $check_del_img = new \XoopsFormCheckBox('', 'delimg_1');
1252 1252
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1253 1253
             $file_tray->addElement($check_del_img);
@@ -1258,8 +1258,8 @@  discard block
 block discarded – undo
1258 1258
         }
1259 1259
         $file_img->setExtra("size ='40'");
1260 1260
         $file_tray->addElement($file_img);
1261
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1262
-        $file_label = new \XoopsFormLabel('', '<br>' . $msg);
1261
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1262
+        $file_label = new \XoopsFormLabel('', '<br>'.$msg);
1263 1263
         $file_tray->addElement($file_label);
1264 1264
         $form->addElement($file_tray);
1265 1265
         $form->addElement(new \XoopsFormHidden('file1', $event_picture1));
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
         //Picture2
1268 1268
         $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
1269 1269
         if (!empty($event_picture2)) {
1270
-            $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>"));
1270
+            $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>"));
1271 1271
             $check_del_img = new \XoopsFormCheckBox('', 'delimg_2');
1272 1272
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1273 1273
             $file_tray->addElement($check_del_img);
@@ -1278,8 +1278,8 @@  discard block
 block discarded – undo
1278 1278
         }
1279 1279
         $file_img->setExtra("size ='40'");
1280 1280
         $file_tray->addElement($file_img);
1281
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1282
-        $file_label = new \XoopsFormLabel('', '<br>' . $msg);
1281
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1282
+        $file_label = new \XoopsFormLabel('', '<br>'.$msg);
1283 1283
         $file_tray->addElement($file_label);
1284 1284
         $form->addElement($file_tray);
1285 1285
         $form->addElement(new \XoopsFormHidden('file2', $event_picture2));
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
                 $recurRules = 'weekly|';
1347 1347
                 $recurRules .= $parm['rrule_weekly_interval'];
1348 1348
                 foreach ($parm['rrule_weekly_bydays'] as $day) {
1349
-                    $recurRules .= '|' . $day;
1349
+                    $recurRules .= '|'.$day;
1350 1350
                 }
1351 1351
 
1352 1352
                 break;
@@ -1356,11 +1356,11 @@  discard block
 block discarded – undo
1356 1356
                     $parm['rrule_monthly_interval'] = 0;
1357 1357
                 }
1358 1358
                 $recurRules = 'monthly|';
1359
-                $recurRules .= $parm['rrule_monthly_interval'] . '|';
1359
+                $recurRules .= $parm['rrule_monthly_interval'].'|';
1360 1360
                 if ('' != $parm['rrule_monthly_byday']) {
1361 1361
                     $recurRules .= $parm['rrule_monthly_byday'];
1362 1362
                 } else {
1363
-                    $recurRules .= 'MD' . $parm['rrule_bymonthday'];
1363
+                    $recurRules .= 'MD'.$parm['rrule_bymonthday'];
1364 1364
                 }
1365 1365
 
1366 1366
                 break;
@@ -1394,9 +1394,9 @@  discard block
 block discarded – undo
1394 1394
 
1395 1395
                 $recurRules = 'yearly|';
1396 1396
                 $recurRules .= $parm['rrule_yearly_interval'];
1397
-                $recurRules .= '|' . $parm['rrule_yearly_byday'];
1397
+                $recurRules .= '|'.$parm['rrule_yearly_byday'];
1398 1398
                 foreach ($parm['rrule_yearly_bymonths'] as $month) {
1399
-                    $recurRules .= '|' . $month;
1399
+                    $recurRules .= '|'.$month;
1400 1400
                 }
1401 1401
 
1402 1402
                 break;
@@ -2326,10 +2326,10 @@  discard block
 block discarded – undo
2326 2326
         global $xoopsDB;
2327 2327
 
2328 2328
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2329
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2330
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2329
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2330
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2331 2331
 
2332
-        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}";
2332
+        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}";
2333 2333
         //---------------------------------------------------
2334 2334
         $tw   = [];
2335 2335
         $tw[] = 'te.cat_id = tc.cat_id';
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2339 2339
         $inCat                = 'te.cat_id IN (0)';
2340 2340
         if (count($authorizedAccessCats) > 0) {
2341
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2341
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2342 2342
         }
2343 2343
         //echo $tw[count($tw)-1];
2344 2344
 
@@ -2374,12 +2374,12 @@  discard block
 block discarded – undo
2374 2374
                 'te.event_address',
2375 2375
                 'tc.cat_name',
2376 2376
             ];
2377
-            $t       = [];
2377
+            $t = [];
2378 2378
             foreach ($queryarray as $i => $iValue) {
2379 2379
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2380 2380
             }
2381 2381
 
2382
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2382
+            $flt = '('.implode(" {$andor} ", $t1).')';
2383 2383
 
2384 2384
             $t = [];
2385 2385
             foreach ($tFields as $h => $hValue) {
@@ -2388,10 +2388,10 @@  discard block
 block discarded – undo
2388 2388
 
2389 2389
             $filtre = implode(' OR ', $t);
2390 2390
             $filtre = str_replace('#', '%', $filtre);
2391
-            $tw[]   = '(' . $filtre . ')';
2391
+            $tw[]   = '('.$filtre.')';
2392 2392
         }
2393 2393
 
2394
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2394
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2395 2395
         //------------------------------------------------------------
2396 2396
         if (count($orderBy) > 0) {
2397 2397
             $t = [];
@@ -2401,7 +2401,7 @@  discard block
 block discarded – undo
2401 2401
                 }
2402 2402
             }
2403 2403
             if (count($t) > 0) {
2404
-                $sql .= ' ORDER BY ' . implode(',', $t);
2404
+                $sql .= ' ORDER BY '.implode(',', $t);
2405 2405
             }
2406 2406
         }
2407 2407
 
@@ -2434,7 +2434,7 @@  discard block
 block discarded – undo
2434 2434
         $i = 0;
2435 2435
         while ($myrow = $xoopsDB->fetchArray($result)) {
2436 2436
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2437
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2437
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2438 2438
             $ret[$i]['title'] = $myrow['event_title'];
2439 2439
             $ret[$i]['time']  = $myrow['event_submitdate'];
2440 2440
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2474,23 +2474,23 @@  discard block
 block discarded – undo
2474 2474
         //        }
2475 2475
         $tEvent = $xoopsDB->prefix('extcal_event');
2476 2476
         $tCat   = $xoopsDB->prefix('extcal_cat');
2477
-        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2477
+        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2478 2478
 
2479 2479
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2480 2480
         $count                = count($authorizedAccessCats);
2481 2481
         if ($count > 0) {
2482
-            $in = '(' . $authorizedAccessCats[0];
2482
+            $in = '('.$authorizedAccessCats[0];
2483 2483
             array_shift($authorizedAccessCats);
2484 2484
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2485
-                $in .= ',' . $authorizedAccessCat;
2485
+                $in .= ','.$authorizedAccessCat;
2486 2486
             }
2487 2487
             $in .= ')';
2488 2488
         } else {
2489 2489
             $in = '(0)';
2490 2490
         }
2491
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2491
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2492 2492
         if (0 != $userId) {
2493
-            $sql .= " AND event_submitter = '" . $userId . "'";
2493
+            $sql .= " AND event_submitter = '".$userId."'";
2494 2494
         }
2495 2495
 
2496 2496
         //echoArray($queryarray,false);
@@ -2510,7 +2510,7 @@  discard block
 block discarded – undo
2510 2510
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2511 2511
             }
2512 2512
 
2513
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2513
+            $flt = '('.implode(" {$andor} ", $t1).')';
2514 2514
 
2515 2515
             $t = [];
2516 2516
             foreach ($tFields as $h => $hValue) {
@@ -2519,11 +2519,11 @@  discard block
 block discarded – undo
2519 2519
 
2520 2520
             $filtre = implode(' OR ', $t);
2521 2521
             $filtre = str_replace('#', '%', $filtre);
2522
-            $sql    .= " AND ($filtre)";
2522
+            $sql .= " AND ($filtre)";
2523 2523
         }
2524 2524
 
2525 2525
         if ('' != $criteresPlus) {
2526
-            $sql .= ' AND ' . $criteresPlus;
2526
+            $sql .= ' AND '.$criteresPlus;
2527 2527
         }
2528 2528
         $sql .= ' ORDER BY event_id DESC';
2529 2529
 
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
         if ($xoopsSearch) {
2534 2534
             while ($myrow = $xoopsDB->fetchArray($result)) {
2535 2535
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2536
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2536
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2537 2537
                 $ret[$i]['title'] = $myrow['event_title'];
2538 2538
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2539 2539
                 $ret[$i]['uid']   = $myrow['event_submitter'];
Please login to merge, or discard this patch.
class/Form/FormFileCheckBox.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 class FormFileCheckBox extends \XoopsFormCheckBox
25 25
 {
26 26
     /**
27
-     * @param      $caption
28
-     * @param      $name
27
+     * @param      string $caption
28
+     * @param      string $name
29 29
      * @param null $value
30 30
      *
31 31
      */
Please login to merge, or discard this patch.
class/Utility.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 require_once XOOPS_ROOT_PATH . '/class/uploader.php';
20 20
 
21 21
 use XoopsModules\Extcal;
22
-use XoopsModules\Extcal\Common;
23 22
 
24 23
 /**
25 24
  * Class Utility
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@
 block discarded – undo
151 151
             $cat_color = $catList->getVar('cat_color');
152 152
             $checked   = in_array($cat_id, $cat) ? 'checked' : '';
153 153
             $cat       = ''
154
-                         . "<div style='float:left; margin-left:5px;'>"
155
-                         . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
156
-                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
157
-                         . " {$name}"
158
-                         . '</div>';
154
+                            . "<div style='float:left; margin-left:5px;'>"
155
+                            . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
156
+                            . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
157
+                            . " {$name}"
158
+                            . '</div>';
159 159
 
160 160
             $t[] = $cat;
161 161
         }
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * L'utilisation de ce formulaire d'adminitration suppose
17 17
  * que la classe correspondante de la table a été générées avec classGenerator
18 18
  **/
19
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
19
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
20 20
 
21 21
 use XoopsModules\Extcal;
22 22
 use XoopsModules\Extcal\Common;
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
     public static function loadImg(&$REQUEST, &$event_picture1, &$event_picture2)
61 61
     {
62 62
         ///////////////////////////////////////////////////////////////////////////////
63
-        $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/';
64
-        $uploadurl_event = XOOPS_URL . '/uploads/extcal/';
63
+        $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/';
64
+        $uploadurl_event = XOOPS_URL.'/uploads/extcal/';
65 65
         //$picture = '';
66 66
         for ($j = 1; $j < 3; ++$j) {
67
-            $delimg = @$REQUEST['delimg_' . $j . ''];
68
-            $delimg = isset($delimg) ? (int)$delimg : 0;
67
+            $delimg = @$REQUEST['delimg_'.$j.''];
68
+            $delimg = isset($delimg) ? (int) $delimg : 0;
69 69
             if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) {
70 70
                 $upload = new \XoopsMediaUploader($uploaddir_event, [
71 71
                     'image/gif',
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
                             $event_picture2 = $upload->getSavedFileName();
89 89
                         }
90 90
                     }
91
-                } elseif (!empty($REQUEST['file' . $j])) {
91
+                } elseif (!empty($REQUEST['file'.$j])) {
92 92
                     if (1 == $j) {
93
-                        $event_picture1 = $REQUEST['file' . $j];
93
+                        $event_picture1 = $REQUEST['file'.$j];
94 94
                     } elseif (2 == $j) {
95
-                        $event_picture2 = $REQUEST['file' . $j];
95
+                        $event_picture2 = $REQUEST['file'.$j];
96 96
                     }
97 97
                 }
98 98
             } else {
99
-                $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j];
99
+                $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j];
100 100
                 if (1 == $j) {
101 101
                     $event_picture1 = '';
102 102
                 } elseif (2 == $j) {
@@ -192,17 +192,17 @@  discard block
 block discarded – undo
192 192
             $select->addOption('', '');
193 193
         }
194 194
 
195
-        $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
196
-        $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
195
+        $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC);
196
+        $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC);
197 197
 
198
-        $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
199
-        $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
198
+        $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC);
199
+        $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC);
200 200
 
201
-        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
202
-        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
201
+        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC);
202
+        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC);
203 203
 
204
-        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
205
-        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
204
+        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC);
205
+        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC);
206 206
 
207 207
         return $select;
208 208
     }
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     public static function echoDateArray($period)
317 317
     {
318 318
         foreach ($period as $dt) {
319
-            echo $dt->format("l Y-m-d H:i:s\n") . '<br>';
319
+            echo $dt->format("l Y-m-d H:i:s\n").'<br>';
320 320
         }
321 321
     }
322 322
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         }
333 333
 
334 334
         $txt = print_r($t, true);
335
-        echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>";
335
+        echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>";
336 336
     }
337 337
 
338 338
     /*****************************************************************/
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         if ('' != $msg) {
346 346
             echo "<hr>{$msg}<hr>";
347 347
         }
348
-        echo $line . '<br>';
348
+        echo $line.'<br>';
349 349
     }
350 350
 
351 351
     /*****************************************************************/
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             echo "<hr>{$msg}<hr>";
373 373
         }
374 374
 
375
-        echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>';
375
+        echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>';
376 376
     }
377 377
 
378 378
     /*****************************************************************/
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
      */
487 487
     public static function getLighterColor($color, $plancher, $plafond)
488 488
     {
489
-        require_once __DIR__ . '/ColorTools.php';
489
+        require_once __DIR__.'/ColorTools.php';
490 490
 
491 491
         //$ct = new \ColorTools();
492 492
         //return $ct->eclaircir($color,$plancher,$plafond);
Please login to merge, or discard this patch.
view_search.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@  discard block
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
7
-$params                                  = [
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7
+$params = [
8 8
     'view' => _EXTCAL_NAV_SEARCH,
9 9
     'file' => _EXTCAL_FILE_SEARCH,
10 10
 ];
11 11
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
12
-require_once __DIR__ . '/header.php';
12
+require_once __DIR__.'/header.php';
13 13
 
14 14
 $recurEventsArray = [];
15 15
 //needed to save the state of the form, so we don't show on the first time the list of available events
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 /***************************************************************/
22 22
 $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : '';
23 23
 $andor     = isset($_POST['andor']) ? $_POST['andor'] : '';
24
-$year      = isset($_POST['year']) ? (int)$_POST['year'] : date('Y');
25
-$month     = isset($_POST['month']) ? (int)$_POST['month'] : date('n');
26
-$day       = isset($_POST['day']) ? (int)$_POST['day'] : 0;
27
-$cat       = isset($_POST['cat']) ? (int)$_POST['cat'] : 0;
24
+$year      = isset($_POST['year']) ? (int) $_POST['year'] : date('Y');
25
+$month     = isset($_POST['month']) ? (int) $_POST['month'] : date('n');
26
+$day       = isset($_POST['day']) ? (int) $_POST['day'] : 0;
27
+$cat       = isset($_POST['cat']) ? (int) $_POST['cat'] : 0;
28 28
 $orderby1  = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC';
29 29
 $orderby2  = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC';
30 30
 $orderby3  = isset($_POST['orderby3']) ? $_POST['orderby3'] : '';
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     }
147 147
 }
148 148
 
149
-$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray);
149
+$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray);
150 150
 
151 151
 // Sort event array by event start
152 152
 //usort($eventsArray, "orderEvents");
@@ -237,4 +237,4 @@  discard block
 block discarded – undo
237 237
 $xoopsTpl->assign('lang', $lang);
238 238
 $xoopsTpl->assign('view', 'search');
239 239
 
240
-include XOOPS_ROOT_PATH . '/footer.php';
240
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view_day.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
  * @author       XOOPS Development Team,
20 20
  */
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
23
-require_once __DIR__ . '/include/constantes.php';
22
+include __DIR__.'/../../mainfile.php';
23
+require_once __DIR__.'/include/constantes.php';
24 24
 $params                                  = ['view' => _EXTCAL_NAV_DAY, 'file' => _EXTCAL_FILE_DAY];
25 25
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
26
-require_once __DIR__ . '/header.php';
26
+require_once __DIR__.'/header.php';
27 27
 
28 28
 /* ========================================================================== */
29
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
30
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
31
-$day   = isset($_GET['day']) ? (int)$_GET['day'] : date('j');
32
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
29
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
30
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
31
+$day   = isset($_GET['day']) ? (int) $_GET['day'] : date('j');
32
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
33 33
 /* ========================================================================== */
34 34
 
35 35
 $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     'cat'          => $cat,
54 54
     'externalKeys' => 'cat_id',
55 55
 ];
56
-$events   = $eventHandler->getEventsOnPeriode($criteres);
56
+$events = $eventHandler->getEventsOnPeriode($criteres);
57 57
 /**********************************************************************/
58 58
 $eventsArray = $events;
59 59
 
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
 
100 100
 $navig = [
101 101
     'prev' => [
102
-        'uri'  => 'year=' . $pDayCalObj->thisYear() . '&amp;month=' . $pDayCalObj->thisMonth() . '&amp;day=' . $pDayCalObj->thisDay(),
102
+        'uri'  => 'year='.$pDayCalObj->thisYear().'&amp;month='.$pDayCalObj->thisMonth().'&amp;day='.$pDayCalObj->thisDay(),
103 103
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()),
104 104
     ],
105 105
     'this' => [
106
-        'uri'  => 'year=' . $dayCalObj->thisYear() . '&amp;month=' . $dayCalObj->thisMonth() . '&amp;day=' . $dayCalObj->thisDay(),
106
+        'uri'  => 'year='.$dayCalObj->thisYear().'&amp;month='.$dayCalObj->thisMonth().'&amp;day='.$dayCalObj->thisDay(),
107 107
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()),
108 108
     ],
109 109
     'next' => [
110
-        'uri'  => 'year=' . $nDayCalObj->thisYear() . '&amp;month=' . $nDayCalObj->thisMonth() . '&amp;day=' . $nDayCalObj->thisDay(),
110
+        'uri'  => 'year='.$nDayCalObj->thisYear().'&amp;month='.$nDayCalObj->thisMonth().'&amp;day='.$nDayCalObj->thisDay(),
111 111
         'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()),
112 112
     ],
113 113
 ];
114 114
 
115 115
 // Title of the page
116
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
116
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
117 117
 
118 118
 // Assigning navig data to the template
119 119
 $xoopsTpl->assign('navig', $navig);
@@ -172,4 +172,4 @@  discard block
 block discarded – undo
172 172
 $xoopsTpl->assign('lang', $lang);
173 173
 $xoopsTpl->assign('view', 'day');
174 174
 
175
-include XOOPS_ROOT_PATH . '/footer.php';
175
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.