Completed
Branch master (55a138)
by Michael
03:21
created
class/Form/FormFileCheckBox.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
 class FormFileCheckBox extends \XoopsFormCheckBox
24 24
 {
25 25
     /**
26
-     * @param      $caption
27
-     * @param      $name
26
+     * @param      string $caption
27
+     * @param      string $name
28 28
      * @param null $value
29 29
      *
30 30
      * @return FormFileCheckBox
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@
 block discarded – undo
43 43
     {
44 44
         $ret = '';
45 45
         if (count($this->getOptions()) > 1 && '[]' !== substr($this->getName(), -2, 2)) {
46
-            $newname = $this->getName() . '[]';
46
+            $newname = $this->getName().'[]';
47 47
             $this->setName($newname);
48 48
         }
49 49
         foreach ($this->getOptions() as $value => $name) {
50
-            $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
50
+            $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
51 51
             $ret .= ' checked';
52
-            $ret .= $this->getExtra() . '>' . $name . "<br>\n";
52
+            $ret .= $this->getExtra().'>'.$name."<br>\n";
53 53
         }
54 54
 
55 55
         return $ret;
Please login to merge, or discard this patch.
class/Form/FormRRuleCheckBox.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 class FormRRuleCheckBox extends \XoopsFormCheckBox
25 25
 {
26 26
     /**
27
-     * @param      $caption
28
-     * @param      $name
29
-     * @param null $value
27
+     * @param      string $caption
28
+     * @param      string $name
29
+     * @param string $value
30 30
      */
31 31
     public function __construct($caption, $name, $value = null)
32 32
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@
 block discarded – undo
42 42
         $ret = '<table><tr>';
43 43
         $i   = 0;
44 44
         if (count($this->getOptions()) > 1 && '[]' !== substr($this->getName(), -2, 2)) {
45
-            $newname = $this->getName() . '[]';
45
+            $newname = $this->getName().'[]';
46 46
             $this->setName($newname);
47 47
         }
48 48
         foreach ($this->getOptions() as $value => $name) {
49 49
             if (0 == (++$i) % 6) {
50 50
                 $ret .= '</tr><tr>';
51 51
             }
52
-            $ret .= "<td><input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
52
+            $ret .= "<td><input type='checkbox' name='".$this->getName()."' value='".$value."'";
53 53
             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
54 54
                 $ret .= ' checked';
55 55
             }
56
-            $ret .= $this->getExtra() . '>' . $name . "</td>\n";
56
+            $ret .= $this->getExtra().'>'.$name."</td>\n";
57 57
         }
58 58
         $ret .= '</tr></table>';
59 59
 
Please login to merge, or discard this patch.
class/Form/Spin/FormSpin.php 2 patches
Doc Comments   +16 added lines, -11 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     /**
179 179
      * Set the value.
180 180
      *
181
-     * @param  $value int
181
+     * @param  integer $value int
182 182
      */
183 183
     public function setValue($value)
184 184
     {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     /**
198 198
      * Set the min value.
199 199
      *
200
-     * @param  $min int
200
+     * @param  integer $min int
201 201
      */
202 202
     public function setMin($min)
203 203
     {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     /**
216 216
      * Set the max value - must be more great then min.
217 217
      *
218
-     * @param  $max int
218
+     * @param  integer $max int
219 219
      */
220 220
     public function setMax($max)
221 221
     {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      * Set the small increment when click a short time on up down nutton
236 236
      * must be  " > 0 ".
237 237
      *
238
-     * @param $smallIncrement
238
+     * @param integer $smallIncrement
239 239
      *
240 240
      * @internal param int $value
241 241
      */
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     /**
260 260
      * Set the large increment when click a long time on up down nutton.
261 261
      *
262
-     * @param  $largeIncrement int
262
+     * @param  integer $largeIncrement int
263 263
      */
264 264
     public function setLargeIncrement($largeIncrement)
265 265
     {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      * Set the size in nb car of the input text for the value
283 283
      * must be 2 car min.
284 284
      *
285
-     * @param  $size mixed
285
+     * @param  integer $size mixed
286 286
      */
287 287
     public function setSize($size)
288 288
     {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     /**
308 308
      * Set the shortname of the folder images.
309 309
      *
310
-     * @param  $folder string
310
+     * @param  string $folder string
311 311
      */
312 312
     public function setImgFolder($folder)
313 313
     {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     /**
328 328
      * Set the label of unites between value and buttons.
329 329
      *
330
-     * @param  $unite string
330
+     * @param  string $unite string
331 331
      */
332 332
     public function setUnite($unite)
333 333
     {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     /**
346 346
      * Set the style CSS of the text.
347 347
      *
348
-     * @param  $style string
348
+     * @param  string $style string
349 349
      */
350 350
     public function setStyleText($style)
351 351
     {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     /**
366 366
      * Set the style CSS of the frame.
367 367
      *
368
-     * @param  $style string
368
+     * @param  string $style string
369 369
      */
370 370
     public function setStyleBordure($style)
371 371
     {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     /**
386 386
      * Set  MinMaxVisible : show the button to go min and max value.
387 387
      *
388
-     * @param  $visible bool
388
+     * @param  boolean $visible bool
389 389
      */
390 390
     public function setMinMaxVisible($visible)
391 391
     {
@@ -494,6 +494,11 @@  discard block
 block discarded – undo
494 494
      * @param string $default
495 495
      * @return string
496 496
      */
497
+
498
+    /**
499
+     * @param string $attribut
500
+     * @param string $value
501
+     */
497 502
     public function htmlAddAttribut($attribut, $value, $default = '')
498 503
     {
499 504
         $r = '';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function setMin($min)
203 203
     {
204
-        $this->_min = (int)$min;
204
+        $this->_min = (int) $min;
205 205
     }
206 206
     /*-----------------------------------------------------------------*/
207 207
     /**
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function setMax($max)
221 221
     {
222
-        $this->_max = (int)$max;
222
+        $this->_max = (int) $max;
223 223
     }
224 224
 
225 225
     /*-----------------------------------------------------------------*/
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function setSmallIncrement($smallIncrement)
243 243
     {
244
-        $this->_smallIncrement = (int)$smallIncrement;
244
+        $this->_smallIncrement = (int) $smallIncrement;
245 245
         if (0 == $this->_smallIncrement) {
246 246
             $this->_smallIncrement = 1;
247 247
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function setLargeIncrement($largeIncrement)
265 265
     {
266
-        $this->_largeIncrement = (int)$largeIncrement;
266
+        $this->_largeIncrement = (int) $largeIncrement;
267 267
         if (0 == $this->_largeIncrement) {
268 268
             $this->_largeIncrement = 10;
269 269
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
405 405
 
406 406
         $prefixe  = $this->getName();
407
-        $prefixe2 = 'spin' . $prefixe;
407
+        $prefixe2 = 'spin'.$prefixe;
408 408
 
409 409
         $smallIncrement = $this->getSmallIncrement();
410 410
         $largeIncrement = $this->getLargeIncrement();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $t = [];
424 424
 
425 425
         if ($this->_loadJS) {
426
-            $js  = $sSpinFolder . '/js/spin.js';
426
+            $js  = $sSpinFolder.'/js/spin.js';
427 427
             $t[] = "<script src='{$js}' type='text/javascript'></script>";
428 428
         }
429 429
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         //-------------------------------------------------------
469 469
 
470 470
         $t[] = '  </tr>';
471
-        $t[] = '</table>' . "\n";
471
+        $t[] = '</table>'."\n";
472 472
         $t[] = '</div>';
473 473
         //-------------------------------------------
474 474
         $html = implode("\n", $t);
Please login to merge, or discard this patch.
class/TableForm.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @internal param bool $encode To sanitizer the text?
42 42
      *
43
-     * @return array array of name/value pairs assigned to form elements
43
+     * @return boolean|string array of name/value pairs assigned to form elements
44 44
      */
45 45
     public function getAddBaliseTable()
46 46
     {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function insertBreak($extra = '', $class = '')
57 57
     {
58
-        $class = ('' != $class) ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : '';
58
+        $class = ('' != $class) ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : '';
59 59
         // Fix for $extra tag not showing
60 60
         if ($extra) {
61
-            $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>';
61
+            $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>';
62 62
             $this->addElement($extra);
63 63
         } else {
64
-            $extra = '<tr><td colspan="2" ' . $class . '>&nbsp;</td></tr>';
64
+            $extra = '<tr><td colspan="2" '.$class.'>&nbsp;</td></tr>';
65 65
             $this->addElement($extra);
66 66
         }
67 67
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         if ('' != $title) {
93
-            $ret .= '<tr><th colspan="2">' . $title . '</th></tr>';
93
+            $ret .= '<tr><th colspan="2">'.$title.'</th></tr>';
94 94
         }
95 95
 
96 96
         $hidden = '';
@@ -102,24 +102,24 @@  discard block
 block discarded – undo
102 102
                 if (!$ele->getNocolspan()) {
103 103
                     $ret .= '<tr valign="top" align="left"><td class="head">';
104 104
                     if ('' != ($caption = $ele->getCaption())) {
105
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
106
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
105
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
106
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
107 107
                         $ret .= '<span class="caption-marker">*</span>';
108 108
                         $ret .= '</div>';
109 109
                     }
110 110
                     if ('' != ($desc = $ele->getDescription())) {
111
-                        $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>';
111
+                        $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>';
112 112
                     }
113
-                    $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE;
113
+                    $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE;
114 114
                 } else {
115 115
                     $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
116 116
                     if ('' != ($caption = $ele->getCaption())) {
117
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
118
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
117
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
118
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
119 119
                         $ret .= '<span class="caption-marker">*</span>';
120 120
                         $ret .= '</div>';
121 121
                     }
122
-                    $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>';
122
+                    $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>';
123 123
                 }
124 124
             } else {
125 125
                 $hidden .= $ele->render();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $ret .= '</table>';
131 131
         }
132 132
 
133
-        $ret .= NWLINE . ' ' . $hidden . NWLINE;
133
+        $ret .= NWLINE.' '.$hidden.NWLINE;
134 134
 
135 135
         return $ret;
136 136
     }
Please login to merge, or discard this patch.
class/Time.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-     * @param $id
41
+     * @param integer $id
42 42
      *
43 43
      * @return mixed
44 44
      */
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @param $format
87 87
      * @param $timestamp
88 88
      *
89
-     * @return mixed
89
+     * @return string
90 90
      */
91 91
     public function getFormatedDate($format, $timestamp)
92 92
     {
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
6 6
 
7
-require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php';
7
+require_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php';
8 8
 
9 9
 $moduleDirName = basename(dirname(__DIR__));
10 10
 Extcal\Helper::getInstance()->loadLanguage('main');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function getFormatedDate($format, $timestamp)
94 94
     {
95
-        $patterns     = [
95
+        $patterns = [
96 96
             '/January/',
97 97
             '/February/',
98 98
             '/March/',
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
             _CAL_OCTOBER,
146 146
             _CAL_NOVEMBER,
147 147
             _CAL_DECEMBER,
148
-            substr(_CAL_JANUARY, 0, 3) . ' ',
149
-            substr(_CAL_FEBRUARY, 0, 3) . ' ',
150
-            substr(_CAL_MARCH, 0, 3) . ' ',
151
-            substr(_CAL_APRIL, 0, 3) . ' ',
152
-            substr(_CAL_MAY, 0, 3) . ' ',
153
-            substr(_CAL_JUNE, 0, 3) . ' ',
154
-            substr(_CAL_JULY, 0, 3) . ' ',
155
-            substr(_CAL_AUGUST, 0, 3) . ' ',
156
-            substr(_CAL_SEPTEMBER, 0, 3) . ' ',
157
-            substr(_CAL_OCTOBER, 0, 3) . ' ',
158
-            substr(_CAL_NOVEMBER, 0, 3) . ' ',
159
-            substr(_CAL_DECEMBER, 0, 3) . ' ',
148
+            substr(_CAL_JANUARY, 0, 3).' ',
149
+            substr(_CAL_FEBRUARY, 0, 3).' ',
150
+            substr(_CAL_MARCH, 0, 3).' ',
151
+            substr(_CAL_APRIL, 0, 3).' ',
152
+            substr(_CAL_MAY, 0, 3).' ',
153
+            substr(_CAL_JUNE, 0, 3).' ',
154
+            substr(_CAL_JULY, 0, 3).' ',
155
+            substr(_CAL_AUGUST, 0, 3).' ',
156
+            substr(_CAL_SEPTEMBER, 0, 3).' ',
157
+            substr(_CAL_OCTOBER, 0, 3).' ',
158
+            substr(_CAL_NOVEMBER, 0, 3).' ',
159
+            substr(_CAL_DECEMBER, 0, 3).' ',
160 160
             _CAL_SUNDAY,
161 161
             _CAL_MONDAY,
162 162
             _CAL_TUESDAY,
@@ -164,13 +164,13 @@  discard block
 block discarded – undo
164 164
             _CAL_THURSDAY,
165 165
             _CAL_FRIDAY,
166 166
             _CAL_SATURDAY,
167
-            substr(_CAL_SUNDAY, 0, 3) . ' ',
168
-            substr(_CAL_MONDAY, 0, 3) . ' ',
169
-            substr(_CAL_TUESDAY, 0, 3) . ' ',
170
-            substr(_CAL_WEDNESDAY, 0, 3) . ' ',
171
-            substr(_CAL_THURSDAY, 0, 3) . ' ',
172
-            substr(_CAL_FRIDAY, 0, 3) . ' ',
173
-            substr(_CAL_SATURDAY, 0, 3) . ' ',
167
+            substr(_CAL_SUNDAY, 0, 3).' ',
168
+            substr(_CAL_MONDAY, 0, 3).' ',
169
+            substr(_CAL_TUESDAY, 0, 3).' ',
170
+            substr(_CAL_WEDNESDAY, 0, 3).' ',
171
+            substr(_CAL_THURSDAY, 0, 3).' ',
172
+            substr(_CAL_FRIDAY, 0, 3).' ',
173
+            substr(_CAL_SATURDAY, 0, 3).' ',
174 174
         ];
175 175
 
176 176
         return preg_replace($patterns, $replacements, date($format, $timestamp));
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 array_shift($eventOptions);
213 213
                 $day = '';
214 214
                 foreach ($eventOptions as $option) {
215
-                    $day .= ' ' . $daysName[$option] . ', ';
215
+                    $day .= ' '.$daysName[$option].', ';
216 216
                 }
217 217
                 $ret = sprintf(_MD_EXTCAL_RR_WEEKLY, $day, $interval);
218 218
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 array_shift($eventOptions);
332 332
                 $month = '';
333 333
                 foreach ($eventOptions as $option) {
334
-                    $month .= ' ' . $monthName[$option] . ', ';
334
+                    $month .= ' '.$monthName[$option].', ';
335 335
                 }
336 336
                 $dayString = $day;
337 337
                 if (array_key_exists($day, $monthDays)) {
Please login to merge, or discard this patch.
class/Utility.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -463,8 +463,8 @@
 block discarded – undo
463 463
     /**************************************************************************/
464 464
     /**
465 465
      * @param $color
466
-     * @param $plancher
467
-     * @param $plafond
466
+     * @param integer $plancher
467
+     * @param integer $plafond
468 468
      *
469 469
      * @return string
470 470
      */
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,7 @@
 block discarded – undo
17 17
  **/
18 18
 require_once XOOPS_ROOT_PATH . '/class/uploader.php';
19 19
 
20
-use Xmf\Request;
21 20
 use XoopsModules\Extcal;
22
-use XoopsModules\Extcal\Common;
23 21
 
24 22
 /**
25 23
  * Class Utility
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         // Category selectbox
153 153
         //<option style="background-color:#00FFFF;">VARCHAR</option>
154 154
 
155
-         $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
155
+            $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
156 156
         $catsList   = $catHandler->getAllCat($xoopsUser);
157 157
 
158 158
         $t = [];
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
             $cat_color = $catList->getVar('cat_color');
163 163
             $checked   = in_array($cat_id, $cat) ? 'checked' : '';
164 164
             $cat       = ''
165
-                         . "<div style='float:left; margin-left:5px;'>"
166
-                         . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
167
-                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
168
-                         . " {$name}"
169
-                         . '</div>';
165
+                            . "<div style='float:left; margin-left:5px;'>"
166
+                            . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
167
+                            . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
168
+                            . " {$name}"
169
+                            . '</div>';
170 170
 
171 171
             $t[] = $cat;
172 172
         }
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * L'utilisation de ce formulaire d'adminitration suppose
16 16
  * que la classe correspondante de la table a été générées avec classGenerator
17 17
  **/
18
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
18
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
19 19
 
20 20
 use Xmf\Request;
21 21
 use XoopsModules\Extcal;
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
     public static function extcal_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) {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     {
125 125
         global $xoopsUser;
126 126
         // Category selectbox
127
-        $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
127
+        $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
128 128
 
129 129
         $catsList  = $catHandler->getAllCat($xoopsUser);
130 130
         $catSelect = new \XoopsFormSelect('', $name, $cat);
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
         // Category selectbox
153 153
         //<option style="background-color:#00FFFF;">VARCHAR</option>
154 154
 
155
-         $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
156
-        $catsList   = $catHandler->getAllCat($xoopsUser);
155
+         $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
156
+        $catsList = $catHandler->getAllCat($xoopsUser);
157 157
 
158 158
         $t = [];
159 159
         foreach ($catsList as $catList) {
@@ -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   +14 added lines, -14 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'] : '';
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
     }
109 109
 }
110 110
 
111
-$criteria =  new \CriteriaCompo();
112
-$criteria->add( new \Criteria('event_isrecur', 1));
111
+$criteria = new \CriteriaCompo();
112
+$criteria->add(new \Criteria('event_isrecur', 1));
113 113
 
114 114
 if ($cat > 0) {
115
-    $criteria->add( new \Criteria('cat_id', $cat));
115
+    $criteria->add(new \Criteria('cat_id', $cat));
116 116
 }
117 117
 
118 118
 //$criteria =  new \Criteria('event_isrecur', 1);
119 119
 
120 120
 $recurrents = $eventHandler->getAllEvents($criteria, false);
121 121
 //$catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
122
-$catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
122
+$catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
123 123
 
124 124
 //=========================================
125 125
 for ($h = 0, $count = count($recurrents); $h < $count; ++$h) {
@@ -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.
download_attachement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@
 block discarded – undo
2 2
 
3 3
 use XoopsModules\Extcal;
4 4
 
5
-include __DIR__ . '/../../mainfile.php';
6
-require_once __DIR__ . '/include/constantes.php';
5
+include __DIR__.'/../../mainfile.php';
6
+require_once __DIR__.'/include/constantes.php';
7 7
 
8 8
 if (!isset($_GET['file'])) {
9 9
     $fileId = 0;
10 10
 } else {
11
-    $fileId = (int)$_GET['file'];
11
+    $fileId = (int) $_GET['file'];
12 12
 }
13 13
 /** @var FileHandler $fileHandler */
14 14
 $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE);
15 15
 
16 16
 $file = $fileHandler->getFile($fileId);
17 17
 
18
-header('Content-Type: ' . $file->getVar('file_mimetype') . '');
19
-header('Content-Disposition: attachment; filename="' . $file->getVar('file_nicename') . '"');
18
+header('Content-Type: '.$file->getVar('file_mimetype').'');
19
+header('Content-Disposition: attachment; filename="'.$file->getVar('file_nicename').'"');
20 20
 
21
-readfile(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'));
21
+readfile(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'));
Please login to merge, or discard this patch.
post.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -19,20 +19,20 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-include __DIR__ . '/../../mainfile.php';
22
+include __DIR__.'/../../mainfile.php';
23 23
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl';
24 24
 
25
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
26 26
 //include __DIR__ . '/class/form/extcalform.php';
27 27
 //include __DIR__ . '/class/perm.php';
28 28
 
29
-require_once __DIR__ . '/class/Utility.php';
30
-require_once __DIR__ . '/include/constantes.php';
29
+require_once __DIR__.'/class/Utility.php';
30
+require_once __DIR__.'/include/constantes.php';
31 31
 
32 32
 $permHandler = Extcal\Perm::getHandler();
33 33
 $xoopsUser   = $xoopsUser ?: null;
34 34
 
35
-if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) {
35
+if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) {
36 36
     redirect_header('index.php', 3);
37 37
 }
38 38
 
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
41 41
 
42 42
 if (isset($_POST['form_preview'])) {
43
-    include XOOPS_ROOT_PATH . '/header.php';
43
+    include XOOPS_ROOT_PATH.'/header.php';
44 44
 
45 45
     // Title of the page
46 46
     $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
47 47
 
48 48
     $data = [
49 49
         'event_title'        => $_POST['event_title'],
50
-        'cat_id'             => (int)$_POST['cat_id'],
50
+        'cat_id'             => (int) $_POST['cat_id'],
51 51
         'event_desc'         => $_POST['event_desc'],
52
-        'event_nbmember'     => (int)$_POST['event_nbmember'],
52
+        'event_nbmember'     => (int) $_POST['event_nbmember'],
53 53
         'event_contact'      => $_POST['event_contact'],
54 54
         'event_url'          => $_POST['event_url'],
55 55
         'event_email'        => $_POST['event_email'],
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
         'event_start'        => $_POST['event_start'],
59 59
         'have_end'           => $_POST['have_end'],
60 60
         'event_end'          => $_POST['event_end'],
61
-        'dohtml'             => (int)$xoopsModuleConfig['allow_html'],
61
+        'dohtml'             => (int) $xoopsModuleConfig['allow_html'],
62 62
         'event_price'        => $_POST['event_price'],
63 63
         'event_organisateur' => $_POST['event_organisateur'],
64 64
         'event_icone'        => $_POST['event_icone'],
65 65
     ];
66 66
 
67 67
     if (isset($_POST['event_id'])) {
68
-        $data['event_id'] = (int)$_POST['event_id'];
68
+        $data['event_id'] = (int) $_POST['event_id'];
69 69
     }
70 70
 
71 71
     // Creating tempory event object to apply Object data filtering
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     //     // Assigning language data to the template
85 85
     //     $xoopsTpl->assign('lang', $lang);
86 86
 
87
-    $event['cat_id']   = (int)$_POST['cat_id'];
87
+    $event['cat_id']   = (int) $_POST['cat_id'];
88 88
     $event['have_end'] = $_POST['have_end'];
89 89
 
90 90
     // Display the submit form
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     $xoopsTpl->assign('preview', true);
94 94
     $xoopsTpl->assign('formBody', $formBody);
95 95
 
96
-    include XOOPS_ROOT_PATH . '/footer.php';
96
+    include XOOPS_ROOT_PATH.'/footer.php';
97 97
 } elseif (isset($_POST['form_submit'])) {
98 98
     if (!isset($_POST['rrule_weekly_interval'])) {
99 99
         $_POST['rrule_weekly_interval'] = 0;
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
     Extcal\Utility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
118 118
     ///////////////////////////////////////////////////////////////////////////////
119 119
 
120
-    require_once __DIR__ . '/class/perm.php';
120
+    require_once __DIR__.'/class/perm.php';
121 121
 
122 122
     $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE);
123 123
     $permHandler = Extcal\Perm::getHandler();
124
-    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']);
124
+    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']);
125 125
 
126 126
     $data = [
127 127
         'event_title'         => $_POST['event_title'],
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
     ];
148 148
 
149 149
     if (isset($_POST['event_id'])) {
150
-        $eventHandler->modifyEvent((int)$_POST['event_id'], $data);
151
-        $fileHandler->updateEventFile((int)$_POST['event_id']);
152
-        $fileHandler->createFile((int)$_POST['event_id']);
150
+        $eventHandler->modifyEvent((int) $_POST['event_id'], $data);
151
+        $fileHandler->updateEventFile((int) $_POST['event_id']);
152
+        $fileHandler->createFile((int) $_POST['event_id']);
153 153
 
154
-        redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
154
+        redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
155 155
     } else {
156 156
         $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
157 157
         $data['event_submitdate'] = time();
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
         $notificationHandler->triggerEvent('global', 0, $notifyEvent, ['EVENT_TITLE' => $_POST['event_title']]);
169 169
         if (1 == $approve) {
170 170
 //            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
171
-            $catHandler   = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
172
-            $cat        = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all');
173
-            $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [
171
+            $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT);
172
+            $cat = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all');
173
+            $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [
174 174
                 'EVENT_TITLE' => $_POST['event_title'],
175 175
                 'CAT_NAME'    => $cat->getVar('cat_name'),
176 176
             ]);
Please login to merge, or discard this patch.