Completed
Push — master ( 26b490...31307f )
by Michael
03:13
created
class/pear/Calendar/docs/examples/13.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     list($usec, $sec) = explode(' ', microtime());
11 11
 
12
-    return (float)$usec + (float)$sec;
12
+    return (float) $usec + (float) $sec;
13 13
 }
14 14
 
15 15
 // Switch to PEAR::Date engine
@@ -43,27 +43,27 @@  discard block
 block discarded – undo
43 43
         $_GET['view'] = 'calendar_year';
44 44
         // no break
45 45
     case 'calendar_year':
46
-        require_once CALENDAR_ROOT . 'Year.php';
46
+        require_once CALENDAR_ROOT.'Year.php';
47 47
         $c = new Calendar_Year($_GET['y']);
48 48
         break;
49 49
     case 'calendar_month':
50
-        require_once CALENDAR_ROOT . 'Month.php';
50
+        require_once CALENDAR_ROOT.'Month.php';
51 51
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
52 52
         break;
53 53
     case 'calendar_day':
54
-        require_once CALENDAR_ROOT . 'Day.php';
54
+        require_once CALENDAR_ROOT.'Day.php';
55 55
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
56 56
         break;
57 57
     case 'calendar_hour':
58
-        require_once CALENDAR_ROOT . 'Hour.php';
58
+        require_once CALENDAR_ROOT.'Hour.php';
59 59
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
60 60
         break;
61 61
     case 'calendar_minute':
62
-        require_once CALENDAR_ROOT . 'Minute.php';
62
+        require_once CALENDAR_ROOT.'Minute.php';
63 63
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
64 64
         break;
65 65
     case 'calendar_second':
66
-        require_once CALENDAR_ROOT . 'Second.php';
66
+        require_once CALENDAR_ROOT.'Second.php';
67 67
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
68 68
         break;
69 69
 }
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 $date = new Date($c->getTimestamp());
73 73
 
74 74
 echo '<h1>Using PEAR::Date engine</h1>';
75
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
76
-echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >';
75
+echo 'Viewing: '.@$_GET['view'].'<br>';
76
+echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >';
77 77
 
78 78
 $i = 1;
79 79
 echo '<h1>First Iteration</h1>';
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
 $c->build();
84 84
 while ($e = $c->fetch()) {
85 85
     $class  = strtolower(get_class($e));
86
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
87
-    $method = 'this' . str_replace('calendar_', '', $class);
88
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
86
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
87
+    $method = 'this'.str_replace('calendar_', '', $class);
88
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
89 89
     if (0 == ($i % 10)) {
90 90
         echo '<br>';
91 91
     }
92 92
     ++$i;
93 93
 }
94
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
94
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
95 95
 
96 96
 $i = 1;
97 97
 echo '<h1>Second Iteration</h1>';
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
 $start = getmicrotime();
101 101
 while ($e = $c->fetch()) {
102 102
     $class  = strtolower(get_class($e));
103
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
104
-    $method = 'this' . str_replace('calendar_', '', $class);
105
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
103
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
104
+    $method = 'this'.str_replace('calendar_', '', $class);
105
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
106 106
     if (0 == ($i % 10)) {
107 107
         echo '<br>';
108 108
     }
109 109
     ++$i;
110 110
 }
111
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
111
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/8.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $basePath = explode('/', $_SERVER['SCRIPT_NAME']);
16 16
 array_pop($basePath);
17 17
 $basePath = implode('/', $basePath);
18
-$url      = 'http://' . $_SERVER['SERVER_NAME'] . $basePath . '/7.php?wsdl';
18
+$url      = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl';
19 19
 
20 20
 if (!isset($_GET['y'])) {
21 21
     $_GET['y'] = date('Y');
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 
27 27
 $wsdl = new SOAP_WSDL($url);
28 28
 
29
-echo '<pre>' . $wsdl->generateProxyCode() . '</pre>';
29
+echo '<pre>'.$wsdl->generateProxyCode().'</pre>';
30 30
 
31 31
 $calendarClient = $wsdl->getProxy();
32 32
 
33
-$month = $calendarClient->getMonth((int)$_GET['y'], (int)$_GET['m']);
33
+$month = $calendarClient->getMonth((int) $_GET['y'], (int) $_GET['m']);
34 34
 
35 35
 if (PEAR::isError($month)) {
36 36
     die($month->toString());
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if (1 === $day->isEmpty) {
63 63
             echo '<td></td>';
64 64
         } else {
65
-            echo '<td>' . $day->day . '</td>';
65
+            echo '<td>'.$day->day.'</td>';
66 66
         }
67 67
         if (1 === $day->isLast) {
68 68
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/1.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     list($usec, $sec) = explode(' ', microtime());
10 10
 
11
-    return (float)$usec + (float)$sec;
11
+    return (float) $usec + (float) $sec;
12 12
 }
13 13
 
14 14
 if (!@include 'Calendar/Calendar.php') {
@@ -39,33 +39,33 @@  discard block
 block discarded – undo
39 39
         $_GET['view'] = 'calendar_year';
40 40
         // no break
41 41
     case 'calendar_year':
42
-        require_once CALENDAR_ROOT . 'Year.php';
42
+        require_once CALENDAR_ROOT.'Year.php';
43 43
         $c = new Calendar_Year($_GET['y']);
44 44
         break;
45 45
     case 'calendar_month':
46
-        require_once CALENDAR_ROOT . 'Month.php';
46
+        require_once CALENDAR_ROOT.'Month.php';
47 47
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
48 48
         break;
49 49
     case 'calendar_day':
50
-        require_once CALENDAR_ROOT . 'Day.php';
50
+        require_once CALENDAR_ROOT.'Day.php';
51 51
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
52 52
         break;
53 53
     case 'calendar_hour':
54
-        require_once CALENDAR_ROOT . 'Hour.php';
54
+        require_once CALENDAR_ROOT.'Hour.php';
55 55
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
56 56
         break;
57 57
     case 'calendar_minute':
58
-        require_once CALENDAR_ROOT . 'Minute.php';
58
+        require_once CALENDAR_ROOT.'Minute.php';
59 59
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
60 60
         break;
61 61
     case 'calendar_second':
62
-        require_once CALENDAR_ROOT . 'Second.php';
62
+        require_once CALENDAR_ROOT.'Second.php';
63 63
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
64 64
         break;
65 65
 }
66 66
 
67
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
68
-echo 'The time is now: ' . date('Y M d H:i:s', $c->getTimestamp()) . '<br >';
67
+echo 'Viewing: '.@$_GET['view'].'<br>';
68
+echo 'The time is now: '.date('Y M d H:i:s', $c->getTimestamp()).'<br >';
69 69
 
70 70
 $i = 1;
71 71
 echo '<h1>First Iteration</h1>';
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
 $c->build();
76 76
 while ($e = $c->fetch()) {
77 77
     $class  = strtolower(get_class($e));
78
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
79
-    $method = 'this' . str_replace('calendar_', '', $class);
80
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
78
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
79
+    $method = 'this'.str_replace('calendar_', '', $class);
80
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
81 81
     if (0 == ($i % 10)) {
82 82
         echo '<br>';
83 83
     }
84 84
     ++$i;
85 85
 }
86
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
86
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
87 87
 
88 88
 $i = 1;
89 89
 echo '<h1>Second Iteration</h1>';
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 $start = getmicrotime();
93 93
 while ($e = $c->fetch()) {
94 94
     $class  = strtolower(get_class($e));
95
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
96
-    $method = 'this' . str_replace('calendar_', '', $class);
97
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
95
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
96
+    $method = 'this'.str_replace('calendar_', '', $class);
97
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
98 98
     if (0 == ($i % 10)) {
99 99
         echo '<br>';
100 100
     }
101 101
     ++$i;
102 102
 }
103
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
103
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
Please login to merge, or discard this patch.
class/pear/Calendar/Calendar.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
100
-                require_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php';
100
+                require_once CALENDAR_ROOT.'Engine'.'/'.CALENDAR_ENGINE.'.php';
101 101
             }
102 102
             $engine = new $class();
103 103
         }
@@ -209,13 +209,13 @@  discard block
 block discarded – undo
209 209
         if (!isset($cE)) {
210 210
             $cE = Calendar_Engine_Factory::getEngine();
211 211
         }
212
-        $this->cE     =& $cE;
213
-        $this->year   = (int)$y;
214
-        $this->month  = (int)$m;
215
-        $this->day    = (int)$d;
216
-        $this->hour   = (int)$h;
217
-        $this->minute = (int)$i;
218
-        $this->second = (int)$s;
212
+        $this->cE     = & $cE;
213
+        $this->year   = (int) $y;
214
+        $this->month  = (int) $m;
215
+        $this->day    = (int) $d;
216
+        $this->hour   = (int) $h;
217
+        $this->minute = (int) $i;
218
+        $this->second = (int) $s;
219 219
     }
220 220
 
221 221
     /**
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 return $this->toArray($stamp);
332 332
                 break;
333 333
             case 'object':
334
-                require_once CALENDAR_ROOT . 'Factory.php';
334
+                require_once CALENDAR_ROOT.'Factory.php';
335 335
 
336 336
                 return Calendar_Factory::createByTimestamp($returnType, $stamp);
337 337
                 break;
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
      */
354 354
     public function build($sDates = [])
355 355
     {
356
-        require_once __DIR__ . '/PEAR.php';
356
+        require_once __DIR__.'/PEAR.php';
357 357
         PEAR::raiseError('Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::build()');
358 358
 
359 359
         return false;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
      */
370 370
     public function setSelection($sDates)
371 371
     {
372
-        require_once __DIR__ . '/PEAR.php';
372
+        require_once __DIR__.'/PEAR.php';
373 373
         PEAR::raiseError('Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::setSelection()');
374 374
 
375 375
         return false;
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public function &getValidator()
437 437
     {
438 438
         if (!isset($this->validator)) {
439
-            require_once CALENDAR_ROOT . 'Validator.php';
439
+            require_once CALENDAR_ROOT.'Validator.php';
440 440
             $this->validator = new Calendar_Validator($this);
441 441
         }
442 442
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     {
471 471
         if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) {
472 472
             if ((CALENDAR_FIRST_DAY_OF_WEEK != $firstDay) && !is_null($firstDay)) {
473
-                $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' . ' The $firstDay parameter will be ignored.';
473
+                $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'.' The $firstDay parameter will be ignored.';
474 474
                 trigger_error($msg, E_USER_WARNING);
475 475
             }
476 476
 
Please login to merge, or discard this patch.
class/utility.php 1 patch
Spacing   +28 added lines, -28 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
 /**
21 21
  * Class ExtcalUtility.
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
     public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2)
50 50
     {
51 51
         ///////////////////////////////////////////////////////////////////////////////
52
-        $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/';
53
-        $uploadurl_event = XOOPS_URL . '/uploads/extcal/';
52
+        $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/';
53
+        $uploadurl_event = XOOPS_URL.'/uploads/extcal/';
54 54
         //$picture = '';
55 55
         for ($j = 1; $j < 3; ++$j) {
56
-            $delimg = @$REQUEST['delimg_' . $j . ''];
57
-            $delimg = isset($delimg) ? (int)$delimg : 0;
56
+            $delimg = @$REQUEST['delimg_'.$j.''];
57
+            $delimg = isset($delimg) ? (int) $delimg : 0;
58 58
             if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) {
59 59
                 $upload = new XoopsMediaUploader($uploaddir_event, [
60 60
                     'image/gif',
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
                             $event_picture2 = $upload->getSavedFileName();
78 78
                         }
79 79
                     }
80
-                } elseif (!empty($REQUEST['file' . $j])) {
80
+                } elseif (!empty($REQUEST['file'.$j])) {
81 81
                     if (1 == $j) {
82
-                        $event_picture1 = $REQUEST['file' . $j];
82
+                        $event_picture1 = $REQUEST['file'.$j];
83 83
                     } elseif (2 == $j) {
84
-                        $event_picture2 = $REQUEST['file' . $j];
84
+                        $event_picture2 = $REQUEST['file'.$j];
85 85
                     }
86 86
                 }
87 87
             } else {
88
-                $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j];
88
+                $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j];
89 89
                 if (1 == $j) {
90 90
                     $event_picture1 = '';
91 91
                 } elseif (2 == $j) {
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
             $select->addOption('', '');
182 182
         }
183 183
 
184
-        $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
185
-        $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
184
+        $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC);
185
+        $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC);
186 186
 
187
-        $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
188
-        $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
187
+        $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC);
188
+        $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC);
189 189
 
190
-        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
191
-        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
190
+        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC);
191
+        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC);
192 192
 
193
-        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
194
-        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
193
+        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC);
194
+        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC);
195 195
 
196 196
         return $select;
197 197
     }
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     public static function echoDateArray($period)
306 306
     {
307 307
         foreach ($period as $dt) {
308
-            echo $dt->format("l Y-m-d H:i:s\n") . '<br>';
308
+            echo $dt->format("l Y-m-d H:i:s\n").'<br>';
309 309
         }
310 310
     }
311 311
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         }
322 322
 
323 323
         $txt = print_r($t, true);
324
-        echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>";
324
+        echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>";
325 325
     }
326 326
 
327 327
     /*****************************************************************/
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         if ('' != $msg) {
335 335
             echo "<hr>{$msg}<hr>";
336 336
         }
337
-        echo $line . '<br>';
337
+        echo $line.'<br>';
338 338
     }
339 339
 
340 340
     /*****************************************************************/
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
             echo "<hr>{$msg}<hr>";
362 362
         }
363 363
 
364
-        echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>';
364
+        echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>';
365 365
     }
366 366
 
367 367
     /*****************************************************************/
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
      */
476 476
     public static function getLighterColor($color, $plancher, $plafond)
477 477
     {
478
-        require_once __DIR__ . '/colorTools.php';
478
+        require_once __DIR__.'/colorTools.php';
479 479
 
480 480
         //$ct = new ColorTools();
481 481
         //return $ct->eclaircir($color,$plancher,$plafond);
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
                 if (!mkdir($folder) && !is_dir($folder)) {
498 498
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
499 499
                 } else {
500
-                    file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
500
+                    file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
501 501
                 }
502 502
             }
503 503
         } catch (Exception $e) {
@@ -535,10 +535,10 @@  discard block
 block discarded – undo
535 535
         //    @mkdir($dst);
536 536
         while (false !== ($file = readdir($dir))) {
537 537
             if (('.' !== $file) && ('..' !== $file)) {
538
-                if (is_dir($src . '/' . $file)) {
539
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
538
+                if (is_dir($src.'/'.$file)) {
539
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
540 540
                 } else {
541
-                    copy($src . '/' . $file, $dst . '/' . $file);
541
+                    copy($src.'/'.$file, $dst.'/'.$file);
542 542
                 }
543 543
             }
544 544
         }
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
566 566
         $currArray  = explode('.', $currentVer);
567 567
         if (null === $requiredVer) {
568
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
568
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
569 569
         }
570 570
         $reqArray = explode('.', $requiredVer);
571 571
         $success  = true;
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
                     break;
581 581
                 }
582 582
             } else {
583
-                if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
583
+                if ((int) $v > 0) { // handles versions like x.x.x.0_RC2
584 584
                     $success = false;
585 585
                     break;
586 586
                 }
Please login to merge, or discard this patch.
event_notmember.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
3
+include __DIR__.'/../../mainfile.php';
4 4
 
5
-require_once __DIR__ . '/include/constantes.php';
6
-require_once __DIR__ . '/include/mail_fnc.php';
7
-require_once __DIR__ . '/class/utility.php';
5
+require_once __DIR__.'/include/constantes.php';
6
+require_once __DIR__.'/include/mail_fnc.php';
7
+require_once __DIR__.'/class/utility.php';
8 8
 
9 9
 /*
10 10
 ext_echoArray($_POST);
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
 $member_uid = $xoopsUser->getVar('uid');
22 22
 
23 23
 if (!$GLOBALS['xoopsSecurity']->check()) {
24
-    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
24
+    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
25 25
 }
26 26
 
27 27
 if ($xoopsUser && $xoopsModuleConfig['whosnot_going']) {
28 28
     // If param are right
29
-    if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
29
+    if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
30 30
         $eventHandler          = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
31 31
         $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE);
32 32
 
33 33
         // If the user have to be added
34 34
         if ('add' === $_POST['mode']) {
35
-            $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser);
35
+            $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser);
36 36
             $eventNotMemberHandler->createEventNotMember([
37
-                                                             'event_id' => (int)$_POST['event'],
37
+                                                             'event_id' => (int) $_POST['event'],
38 38
                                                              'uid'      => $xoopsUser->getVar('uid'),
39 39
                                                          ]);
40 40
             sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
             // If the user have to be remove
44 44
         } else {
45 45
             if ('remove' === $_POST['mode']) {
46
-                $eventNotMemberHandler->deleteEventNotMember([(int)$_POST['event'], $xoopsUser->getVar('uid')]);
46
+                $eventNotMemberHandler->deleteEventNotMember([(int) $_POST['event'], $xoopsUser->getVar('uid')]);
47 47
                 sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_4, _MD_EXTCAL_MSG_4);
48 48
                 $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_REMOVED_TO_EVENT;
49 49
             }
50 50
         }
51
-        redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false);
51
+        redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false);
52 52
     } else {
53 53
         redirect_header('index.php', 3, _NOPERM, false);
54 54
     }
Please login to merge, or discard this patch.
admin/upgrade.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
     $step = $_POST['step'];
6 6
 }
7 7
 
8
-require_once __DIR__ . '/../../../include/cp_header.php';
9
-include __DIR__ . '/function.php';
8
+require_once __DIR__.'/../../../include/cp_header.php';
9
+include __DIR__.'/function.php';
10 10
 
11 11
 // Change this variable if you use a cloned version of eXtGallery
12 12
 $localModuleDir = 'extcal';
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 $downloadServer = 'http://downloads.sourceforge.net/zoullou/';
17 17
 
18 18
 $lastVersion       = @file_get_contents($versionFile);
19
-$lastVersionString = substr($lastVersion, 0, 1) . '.' . substr($lastVersion, 1, 1) . '.' . substr($lastVersion, 2, 1);
20
-$moduleFileName    = $moduleName . '-' . $lastVersionString . '.tar.gz';
21
-$langFileName      = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz';
19
+$lastVersionString = substr($lastVersion, 0, 1).'.'.substr($lastVersion, 1, 1).'.'.substr($lastVersion, 2, 1);
20
+$moduleFileName    = $moduleName.'-'.$lastVersionString.'.tar.gz';
21
+$langFileName      = $moduleName.'-lang-'.$lastVersionString.'_'.$xoopsConfig['language'].'.tar.gz';
22 22
 
23 23
 switch ($step) {
24 24
     case 'download':
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
             break;
31 31
         }
32 32
 
33
-        if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) {
33
+        if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) {
34 34
             printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName);
35 35
             xoops_cp_footer();
36 36
             break;
37 37
         }
38
-        $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+');
38
+        $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+');
39 39
 
40 40
         // Downlad module archive
41 41
         if ($handle) {
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
         // English file are included on module package
51 51
         if ('english' !== $xoopsConfig['language']) {
52
-            if (!$handle = @fopen($downloadServer . $langFileName, 'r')) {
52
+            if (!$handle = @fopen($downloadServer.$langFileName, 'r')) {
53 53
                 printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName);
54 54
             } else {
55
-                $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+');
55
+                $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+');
56 56
                 // Download language archive
57 57
                 if ($handle) {
58 58
                     while (!feof($handle)) {
@@ -75,35 +75,35 @@  discard block
 block discarded – undo
75 75
         xoops_cp_header();
76 76
         adminMenu();
77 77
 
78
-        if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) {
78
+        if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) {
79 79
             echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT;
80 80
             xoops_cp_footer();
81 81
 
82 82
             break;
83 83
         }
84 84
 
85
-        $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class';
86
-        include __DIR__ . '/../class/pcltar.lib.php';
85
+        $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class';
86
+        include __DIR__.'/../class/pcltar.lib.php';
87 87
 
88 88
         //TrOn(5);
89 89
 
90 90
         // Extract module files
91
-        PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
91
+        PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/');
92 92
         // Delete downloaded module's files
93
-        unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName);
93
+        unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName);
94 94
 
95
-        if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) {
95
+        if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) {
96 96
             // Extract language files
97
-            PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
97
+            PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/');
98 98
             // Delete downloaded module's files
99
-            unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName);
99
+            unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName);
100 100
         }
101 101
 
102 102
         // Delete template_c file
103
-        if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) {
103
+        if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) {
104 104
             while (false !== ($file = readdir($handle))) {
105 105
                 if ('.' !== $file && '..' !== $file && 'index.html' !== $file) {
106
-                    unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file);
106
+                    unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file);
107 107
                 }
108 108
             }
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         }
112 112
         //TrDisplay();
113 113
 
114
-        xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE);
114
+        xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE);
115 115
 
116 116
         xoops_cp_footer();
117 117
 
Please login to merge, or discard this patch.
admin/etablissement.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // Include xoops admin header
21
-require_once __DIR__ . '/../../../include/cp_header.php';
22
-require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/../../../kernel/module.php';
24
-require_once __DIR__ . '/../../../class/xoopsformloader.php';
25
-require_once __DIR__ . '/../../../class/tree.php';
26
-require_once __DIR__ . '/../../../class/xoopslists.php';
27
-require_once __DIR__ . '/../../../class/pagenav.php';
28
-require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php';
29
-require_once __DIR__ . '/../../../class/uploader.php';
30
-require_once __DIR__ . '/../class/etablissement.php';
31
-require_once __DIR__ . '/../include/constantes.php';
32
-
33
-require_once __DIR__ . '/admin_header.php';
21
+require_once __DIR__.'/../../../include/cp_header.php';
22
+require_once __DIR__.'/../class/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/../../../kernel/module.php';
24
+require_once __DIR__.'/../../../class/xoopsformloader.php';
25
+require_once __DIR__.'/../../../class/tree.php';
26
+require_once __DIR__.'/../../../class/xoopslists.php';
27
+require_once __DIR__.'/../../../class/pagenav.php';
28
+require_once __DIR__.'/../../../class/xoopsform/grouppermform.php';
29
+require_once __DIR__.'/../../../class/uploader.php';
30
+require_once __DIR__.'/../class/etablissement.php';
31
+require_once __DIR__.'/../include/constantes.php';
32
+
33
+require_once __DIR__.'/admin_header.php';
34 34
 
35 35
 //include_once("functions.php");
36 36
 //include_once("../include/functions.php");
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 if ($xoopsUser) {
39 39
     $xoopsModule = XoopsModule::getByDirname('extcal');
40 40
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
41
-        redirect_header(XOOPS_URL . '/', 3, _NOPERM);
41
+        redirect_header(XOOPS_URL.'/', 3, _NOPERM);
42 42
     }
43 43
 } else {
44
-    redirect_header(XOOPS_URL . '/', 3, _NOPERM);
44
+    redirect_header(XOOPS_URL.'/', 3, _NOPERM);
45 45
 }
46 46
 
47 47
 // Include language file
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $etablissement_arr = $etablissementHandler->getObjects($criteria);
99 99
         $numrows           = $etablissementHandler->getCount($criteria);
100 100
         if ($numrows > $limit) {
101
-            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit);
101
+            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit);
102 102
             $pagenav = $pagenav->renderNav(4);
103 103
         } else {
104 104
             $pagenav = '';
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         if ($numrows > 0) {
108 108
             echo '<table width="100%" cellspacing="1" class="outer">';
109 109
             echo '<tr>';
110
-            echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>';
111
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>';
112
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>';
113
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>';
114
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>';
110
+            echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>';
111
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>';
112
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>';
113
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>';
114
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>';
115 115
             echo '</tr>';
116 116
             $class = 'odd';
117 117
             foreach (array_keys($etablissement_arr) as $i) {
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
                 $etablissement_adresse   = $etablissement_arr[$i]->getVar('adresse');
122 122
                 $etablissement_city      = $etablissement_arr[$i]->getVar('ville');
123 123
                 $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe');
124
-                echo '<tr class="' . $class . '">';
125
-                echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>';
124
+                echo '<tr class="'.$class.'">';
125
+                echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>';
126 126
 
127
-                echo '<td align="center"><b>' . $etablissement_adresse . '</td>';
128
-                echo '<td align="center"><b>' . $etablissement_city . '</td>';
129
-                echo '<td align="center"><b>' . $etablissement_telephone . '</td>';
127
+                echo '<td align="center"><b>'.$etablissement_adresse.'</td>';
128
+                echo '<td align="center"><b>'.$etablissement_city.'</td>';
129
+                echo '<td align="center"><b>'.$etablissement_telephone.'</td>';
130 130
                 echo '<td align="center" width="15%">';
131
-                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> ';
132
-                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> ';
131
+                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> ';
132
+                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> ';
133 133
                 echo '</td>';
134 134
             }
135 135
             echo '</table><br>';
136
-            echo '<br><div align=right>' . $pagenav . '</div><br>';
136
+            echo '<br><div align=right>'.$pagenav.'</div><br>';
137 137
         } else {
138
-            echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>';
138
+            echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>';
139 139
         }
140 140
 
141 141
         // Affichage du formulaire
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                               'ok'               => 1,
159 159
                               'etablissement_id' => $_REQUEST['etablissement_id'],
160 160
                               'op'               => 'delete_etablissement',
161
-                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
161
+                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>');
162 162
         }
163 163
         break;
164 164
 
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
         $obj->setVar('map', $_REQUEST['map']);
201 201
 
202 202
         //Logo
203
-        $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/';
204
-        $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/';
203
+        $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/';
204
+        $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/';
205 205
 
206 206
         $delimg = @$_REQUEST['delimg'];
207
-        $delimg = isset($delimg) ? (int)$delimg : 0;
207
+        $delimg = isset($delimg) ? (int) $delimg : 0;
208 208
         if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) {
209 209
             $upload = new XoopsMediaUploader($uploaddir_etablissement, [
210 210
                 'image/gif',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             }
228 228
         } else {
229 229
             $logo              = '';
230
-            $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file'];
230
+            $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file'];
231 231
             if (is_file($url_etablissement)) {
232 232
                 chmod($url_etablissement, 0777);
233 233
                 unlink($url_etablissement);
@@ -247,4 +247,4 @@  discard block
 block discarded – undo
247 247
         break;
248 248
 }
249 249
 
250
-require_once __DIR__ . '/admin_footer.php';
250
+require_once __DIR__.'/admin_footer.php';
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.