Completed
Push — master ( ec1681...68c045 )
by Michael
02:41
created
class/eventmember.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23 23
 
24 24
 /**
25 25
  * Class ExtcalEventmember.
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         $eventMember   = $this->getObjects(new Criteria('event_id', $eventId));
86 86
         $count         = count($eventMember);
87 87
         if ($count > 0) {
88
-            $in = '(' . $eventMember[0]->getVar('uid');
88
+            $in = '('.$eventMember[0]->getVar('uid');
89 89
             array_shift($eventMember);
90 90
             foreach ($eventMember as $member) {
91
-                $in .= ',' . $member->getVar('uid');
91
+                $in .= ','.$member->getVar('uid');
92 92
             }
93
-            $in       .= ')';
93
+            $in .= ')';
94 94
             $criteria = new Criteria('uid', $in, 'IN');
95 95
         } else {
96 96
             $criteria = new Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/colorTools.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,9 +170,9 @@
 block discarded – undo
170 170
         $tHex = ['', '', '', ''];
171 171
 
172 172
         $tHex[0] = $aColors[0];
173
-        $tHex[1] = substr('00' . dechex($aColors[1]), -2);
174
-        $tHex[2] = substr('00' . dechex($aColors[2]), -2);
175
-        $tHex[3] = substr('00' . dechex($aColors[3]), -2);
173
+        $tHex[1] = substr('00'.dechex($aColors[1]), -2);
174
+        $tHex[2] = substr('00'.dechex($aColors[2]), -2);
175
+        $tHex[3] = substr('00'.dechex($aColors[3]), -2);
176 176
 
177 177
         $colorHexa = implode('', $tHex);
178 178
 
Please login to merge, or discard this patch.
class/event.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/perm.php';
24
-require_once __DIR__ . '/time.php';
25
-require_once __DIR__ . '/config.php';
26
-require_once __DIR__ . '/extDateTime.php';
27
-require_once __DIR__ . '/utility.php';
28
-require_once __DIR__ . '/../include/constantes.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/perm.php';
24
+require_once __DIR__.'/time.php';
25
+require_once __DIR__.'/config.php';
26
+require_once __DIR__.'/extDateTime.php';
27
+require_once __DIR__.'/utility.php';
28
+require_once __DIR__.'/../include/constantes.php';
29 29
 
30 30
 /**
31 31
  * Class ExtcalEvent.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false);
67 67
         $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false);
68 68
 
69
-        $this->externalKey['cat_id']          = [
69
+        $this->externalKey['cat_id'] = [
70 70
             'className'      => 'cat',
71 71
             'getMethodeName' => 'getCat',
72 72
             'keyName'        => 'cat',
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
         //        while (list($k, $v) = each($events)) {
404 404
         foreach ($events as $k => $t) {
405
-            $ordre[] = (int)$v['event_start'];
405
+            $ordre[] = (int) $v['event_start'];
406 406
             $this->formatEventDate($v, $extcalConfig['event_date_week']);
407 407
             //$v['cat']['cat_light_color'] = $v['cat']['cat_color'];
408 408
             $v['cat']['cat_light_color'] = ExtcalUtility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX);
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 
607 607
         reset($period);
608 608
         foreach ($period as $dt) {
609
-            echo $dt->format("l d-m-Y H:i:s\n") . '<br>';
609
+            echo $dt->format("l d-m-Y H:i:s\n").'<br>';
610 610
         }
611 611
     }
612 612
 
@@ -939,10 +939,10 @@  discard block
 block discarded – undo
939 939
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
940 940
         $count                = count($authorizedAccessCats);
941 941
         if ($count > 0) {
942
-            $in = '(' . $authorizedAccessCats[0];
942
+            $in = '('.$authorizedAccessCats[0];
943 943
             array_shift($authorizedAccessCats);
944 944
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
945
-                $in .= ',' . $authorizedAccessCat;
945
+                $in .= ','.$authorizedAccessCat;
946 946
             }
947 947
             $in .= ')';
948 948
             $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -962,10 +962,10 @@  discard block
 block discarded – undo
962 962
         }
963 963
         if (is_array($cats)) {
964 964
             if (array_search(0, $cats) === false) {
965
-                $in = '(' . current($cats);
965
+                $in = '('.current($cats);
966 966
                 array_shift($cats);
967 967
                 foreach ($cats as $cat) {
968
-                    $in .= ',' . $cat;
968
+                    $in .= ','.$cat;
969 969
                 }
970 970
                 $in .= ')';
971 971
                 $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
         $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
989 989
 
990 990
         /***************************************************/
991
-        require_once __DIR__ . '/etablissement.php';
991
+        require_once __DIR__.'/etablissement.php';
992 992
         if ($siteSide === 'admin') {
993 993
             $action = 'event.php?op=enreg';
994 994
             $cats   = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all');
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
             if ($mode === 'clone') {
1007 1007
                 $data['event_id'] = 0;
1008 1008
                 $event->setVar('event_id', 0);
1009
-                $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')';
1009
+                $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')';
1010 1010
                 $event->setVar('event_title', $newTitle);
1011 1011
             }
1012 1012
 
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
         $form->addElement($catSelect, true);
1191 1191
         //-----------------------------------------------------------
1192 1192
 
1193
-        $file_path = __DIR__ . '/../assets/css/images';
1193
+        $file_path = __DIR__.'/../assets/css/images';
1194 1194
         $tf        = XoopsLists::getImgListAsArray($file_path);
1195 1195
         array_unshift($tf, _MD_EXTCAL_NONE);
1196 1196
         $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, '');
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
         if (count($files) > 0) {
1296 1296
             $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep');
1297 1297
             foreach ($files as $file) {
1298
-                $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size'];
1298
+                $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size'];
1299 1299
                 $eventFiles->addOption($file['file_id'], $name);
1300 1300
             }
1301 1301
             $fileElmtTray->addElement($eventFiles);
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
         //Picture1
1312 1312
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), '');
1313 1313
         if (!empty($event_picture1)) {
1314
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>"));
1314
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>"));
1315 1315
             $check_del_img = new XoopsFormCheckBox('', 'delimg_1');
1316 1316
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1317 1317
             $file_tray->addElement($check_del_img);
@@ -1322,8 +1322,8 @@  discard block
 block discarded – undo
1322 1322
         }
1323 1323
         $file_img->setExtra("size ='40'");
1324 1324
         $file_tray->addElement($file_img);
1325
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1326
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1325
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1326
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1327 1327
         $file_tray->addElement($file_label);
1328 1328
         $form->addElement($file_tray);
1329 1329
         $form->addElement(new XoopsFormHidden('file1', $event_picture1));
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
         //Picture2
1332 1332
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
1333 1333
         if (!empty($event_picture2)) {
1334
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>"));
1334
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>"));
1335 1335
             $check_del_img = new XoopsFormCheckBox('', 'delimg_2');
1336 1336
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1337 1337
             $file_tray->addElement($check_del_img);
@@ -1342,8 +1342,8 @@  discard block
 block discarded – undo
1342 1342
         }
1343 1343
         $file_img->setExtra("size ='40'");
1344 1344
         $file_tray->addElement($file_img);
1345
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1346
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1345
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1346
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1347 1347
         $file_tray->addElement($file_label);
1348 1348
         $form->addElement($file_tray);
1349 1349
         $form->addElement(new XoopsFormHidden('file2', $event_picture2));
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
                 $recurRules = 'weekly|';
1411 1411
                 $recurRules .= $parm['rrule_weekly_interval'];
1412 1412
                 foreach ($parm['rrule_weekly_bydays'] as $day) {
1413
-                    $recurRules .= '|' . $day;
1413
+                    $recurRules .= '|'.$day;
1414 1414
                 }
1415 1415
 
1416 1416
                 break;
@@ -1420,11 +1420,11 @@  discard block
 block discarded – undo
1420 1420
                     $parm['rrule_monthly_interval'] = 0;
1421 1421
                 }
1422 1422
                 $recurRules = 'monthly|';
1423
-                $recurRules .= $parm['rrule_monthly_interval'] . '|';
1423
+                $recurRules .= $parm['rrule_monthly_interval'].'|';
1424 1424
                 if ($parm['rrule_monthly_byday'] != '') {
1425 1425
                     $recurRules .= $parm['rrule_monthly_byday'];
1426 1426
                 } else {
1427
-                    $recurRules .= 'MD' . $parm['rrule_bymonthday'];
1427
+                    $recurRules .= 'MD'.$parm['rrule_bymonthday'];
1428 1428
                 }
1429 1429
 
1430 1430
                 break;
@@ -1458,9 +1458,9 @@  discard block
 block discarded – undo
1458 1458
 
1459 1459
                 $recurRules = 'yearly|';
1460 1460
                 $recurRules .= $parm['rrule_yearly_interval'];
1461
-                $recurRules .= '|' . $parm['rrule_yearly_byday'];
1461
+                $recurRules .= '|'.$parm['rrule_yearly_byday'];
1462 1462
                 foreach ($parm['rrule_yearly_bymonths'] as $month) {
1463
-                    $recurRules .= '|' . $month;
1463
+                    $recurRules .= '|'.$month;
1464 1464
                 }
1465 1465
 
1466 1466
                 break;
@@ -2390,10 +2390,10 @@  discard block
 block discarded – undo
2390 2390
         global $xoopsDB;
2391 2391
 
2392 2392
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2393
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2394
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2393
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2394
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2395 2395
 
2396
-        $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}";
2396
+        $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}";
2397 2397
         //---------------------------------------------------
2398 2398
         $tw   = [];
2399 2399
         $tw[] = 'te.cat_id = tc.cat_id';
@@ -2402,7 +2402,7 @@  discard block
 block discarded – undo
2402 2402
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2403 2403
         $inCat                = 'te.cat_id IN (0)';
2404 2404
         if (count($authorizedAccessCats) > 0) {
2405
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2405
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2406 2406
         }
2407 2407
         //echo $tw[count($tw)-1];
2408 2408
 
@@ -2438,12 +2438,12 @@  discard block
 block discarded – undo
2438 2438
                 'te.event_address',
2439 2439
                 'tc.cat_name',
2440 2440
             ];
2441
-            $t       = [];
2441
+            $t = [];
2442 2442
             for ($i = 0, $count = count($queryarray); $i < $count; ++$i) {
2443 2443
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2444 2444
             }
2445 2445
 
2446
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2446
+            $flt = '('.implode(" {$andor} ", $t1).')';
2447 2447
 
2448 2448
             $t = [];
2449 2449
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2452,10 +2452,10 @@  discard block
 block discarded – undo
2452 2452
 
2453 2453
             $filtre = implode(' OR ', $t);
2454 2454
             $filtre = str_replace('#', '%', $filtre);
2455
-            $tw[]   = '(' . $filtre . ')';
2455
+            $tw[]   = '('.$filtre.')';
2456 2456
         }
2457 2457
 
2458
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2458
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2459 2459
         //------------------------------------------------------------
2460 2460
         if (count($orderBy) > 0) {
2461 2461
             $t = [];
@@ -2465,7 +2465,7 @@  discard block
 block discarded – undo
2465 2465
                 }
2466 2466
             }
2467 2467
             if (count($t) > 0) {
2468
-                $sql .= ' ORDER BY ' . implode(',', $t);
2468
+                $sql .= ' ORDER BY '.implode(',', $t);
2469 2469
             }
2470 2470
         }
2471 2471
 
@@ -2498,7 +2498,7 @@  discard block
 block discarded – undo
2498 2498
         $i = 0;
2499 2499
         while ($myrow = $xoopsDB->fetchArray($result)) {
2500 2500
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2501
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2501
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2502 2502
             $ret[$i]['title'] = $myrow['event_title'];
2503 2503
             $ret[$i]['time']  = $myrow['event_submitdate'];
2504 2504
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2538,23 +2538,23 @@  discard block
 block discarded – undo
2538 2538
         //        }
2539 2539
         $tEvent = $xoopsDB->prefix('extcal_event');
2540 2540
         $tCat   = $xoopsDB->prefix('extcal_cat');
2541
-        $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'";
2541
+        $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'";
2542 2542
 
2543 2543
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2544 2544
         $count                = count($authorizedAccessCats);
2545 2545
         if ($count > 0) {
2546
-            $in = '(' . $authorizedAccessCats[0];
2546
+            $in = '('.$authorizedAccessCats[0];
2547 2547
             array_shift($authorizedAccessCats);
2548 2548
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2549
-                $in .= ',' . $authorizedAccessCat;
2549
+                $in .= ','.$authorizedAccessCat;
2550 2550
             }
2551 2551
             $in .= ')';
2552 2552
         } else {
2553 2553
             $in = '(0)';
2554 2554
         }
2555
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2555
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2556 2556
         if ($userId != 0) {
2557
-            $sql .= " AND event_submitter = '" . $userId . "'";
2557
+            $sql .= " AND event_submitter = '".$userId."'";
2558 2558
         }
2559 2559
 
2560 2560
         //echoArray($queryarray,false);
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2575 2575
             }
2576 2576
 
2577
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2577
+            $flt = '('.implode(" {$andor} ", $t1).')';
2578 2578
 
2579 2579
             $t = [];
2580 2580
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2583,11 +2583,11 @@  discard block
 block discarded – undo
2583 2583
 
2584 2584
             $filtre = implode(' OR ', $t);
2585 2585
             $filtre = str_replace('#', '%', $filtre);
2586
-            $sql    .= " AND ($filtre)";
2586
+            $sql .= " AND ($filtre)";
2587 2587
         }
2588 2588
 
2589 2589
         if ($criteresPlus != '') {
2590
-            $sql .= ' AND ' . $criteresPlus;
2590
+            $sql .= ' AND '.$criteresPlus;
2591 2591
         }
2592 2592
         $sql .= ' ORDER BY event_id DESC';
2593 2593
 
@@ -2597,7 +2597,7 @@  discard block
 block discarded – undo
2597 2597
         if ($xoopsSearch) {
2598 2598
             while ($myrow = $xoopsDB->fetchArray($result)) {
2599 2599
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2600
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2600
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2601 2601
                 $ret[$i]['title'] = $myrow['event_title'];
2602 2602
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2603 2603
                 $ret[$i]['uid']   = $myrow['event_submitter'];
Please login to merge, or discard this patch.
class/time.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
4 4
 
5
-require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php';
5
+require_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php';
6 6
 
7 7
 $moduleDirName = basename(dirname(__DIR__));
8 8
 xoops_loadLanguage('main', $moduleDirName);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function getFormatedDate($format, $timestamp)
92 92
     {
93
-        $patterns     = [
93
+        $patterns = [
94 94
             '/January/',
95 95
             '/February/',
96 96
             '/March/',
@@ -143,18 +143,18 @@  discard block
 block discarded – undo
143 143
             _CAL_OCTOBER,
144 144
             _CAL_NOVEMBER,
145 145
             _CAL_DECEMBER,
146
-            substr(_CAL_JANUARY, 0, 3) . ' ',
147
-            substr(_CAL_FEBRUARY, 0, 3) . ' ',
148
-            substr(_CAL_MARCH, 0, 3) . ' ',
149
-            substr(_CAL_APRIL, 0, 3) . ' ',
150
-            substr(_CAL_MAY, 0, 3) . ' ',
151
-            substr(_CAL_JUNE, 0, 3) . ' ',
152
-            substr(_CAL_JULY, 0, 3) . ' ',
153
-            substr(_CAL_AUGUST, 0, 3) . ' ',
154
-            substr(_CAL_SEPTEMBER, 0, 3) . ' ',
155
-            substr(_CAL_OCTOBER, 0, 3) . ' ',
156
-            substr(_CAL_NOVEMBER, 0, 3) . ' ',
157
-            substr(_CAL_DECEMBER, 0, 3) . ' ',
146
+            substr(_CAL_JANUARY, 0, 3).' ',
147
+            substr(_CAL_FEBRUARY, 0, 3).' ',
148
+            substr(_CAL_MARCH, 0, 3).' ',
149
+            substr(_CAL_APRIL, 0, 3).' ',
150
+            substr(_CAL_MAY, 0, 3).' ',
151
+            substr(_CAL_JUNE, 0, 3).' ',
152
+            substr(_CAL_JULY, 0, 3).' ',
153
+            substr(_CAL_AUGUST, 0, 3).' ',
154
+            substr(_CAL_SEPTEMBER, 0, 3).' ',
155
+            substr(_CAL_OCTOBER, 0, 3).' ',
156
+            substr(_CAL_NOVEMBER, 0, 3).' ',
157
+            substr(_CAL_DECEMBER, 0, 3).' ',
158 158
             _CAL_SUNDAY,
159 159
             _CAL_MONDAY,
160 160
             _CAL_TUESDAY,
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
             _CAL_THURSDAY,
163 163
             _CAL_FRIDAY,
164 164
             _CAL_SATURDAY,
165
-            substr(_CAL_SUNDAY, 0, 3) . ' ',
166
-            substr(_CAL_MONDAY, 0, 3) . ' ',
167
-            substr(_CAL_TUESDAY, 0, 3) . ' ',
168
-            substr(_CAL_WEDNESDAY, 0, 3) . ' ',
169
-            substr(_CAL_THURSDAY, 0, 3) . ' ',
170
-            substr(_CAL_FRIDAY, 0, 3) . ' ',
171
-            substr(_CAL_SATURDAY, 0, 3) . ' ',
165
+            substr(_CAL_SUNDAY, 0, 3).' ',
166
+            substr(_CAL_MONDAY, 0, 3).' ',
167
+            substr(_CAL_TUESDAY, 0, 3).' ',
168
+            substr(_CAL_WEDNESDAY, 0, 3).' ',
169
+            substr(_CAL_THURSDAY, 0, 3).' ',
170
+            substr(_CAL_FRIDAY, 0, 3).' ',
171
+            substr(_CAL_SATURDAY, 0, 3).' ',
172 172
         ];
173 173
 
174 174
         return preg_replace($patterns, $replacements, date($format, $timestamp));
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 array_shift($eventOptions);
211 211
                 $day = '';
212 212
                 foreach ($eventOptions as $option) {
213
-                    $day .= ' ' . $daysName[$option] . ', ';
213
+                    $day .= ' '.$daysName[$option].', ';
214 214
                 }
215 215
                 $ret = sprintf(_MD_EXTCAL_RR_WEEKLY, $day, $interval);
216 216
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                 array_shift($eventOptions);
330 330
                 $month = '';
331 331
                 foreach ($eventOptions as $option) {
332
-                    $month .= ' ' . $monthName[$option] . ', ';
332
+                    $month .= ' '.$monthName[$option].', ';
333 333
                 }
334 334
                 $dayString = $day;
335 335
                 if (array_key_exists($day, $monthDays)) {
Please login to merge, or discard this patch.
class/file.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
24 24
 
25 25
 /**
26 26
  * Class ExtcalFile.
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
         $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
69 69
 
70 70
         $allowedMimeType = [];
71
-        $mimeType        = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php';
71
+        $mimeType        = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php';
72 72
         foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) {
73 73
             $allowedMimeType[] = $mimeType[$fileExt];
74 74
         }
75 75
 
76
-        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728);
77
-        $uploader->setPrefix($userId . '-' . $eventId . '_');
76
+        $uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728);
77
+        $uploader->setPrefix($userId.'-'.$eventId.'_');
78 78
         if ($uploader->fetchMedia('event_file')) {
79 79
             if (!$uploader->upload()) {
80 80
                 return false;
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
         if (isset($_POST['filetokeep'])) {
136 136
             if (is_array($_POST['filetokeep'])) {
137 137
                 $count = count($_POST['filetokeep']);
138
-                $in    = '(' . $_POST['filetokeep'][0];
138
+                $in    = '('.$_POST['filetokeep'][0];
139 139
                 array_shift($_POST['filetokeep']);
140 140
                 foreach ($_POST['filetokeep'] as $elmt) {
141
-                    $in .= ',' . $elmt;
141
+                    $in .= ','.$elmt;
142 142
                 }
143 143
                 $in .= ')';
144 144
             } else {
145
-                $in = '(' . $_POST['filetokeep'] . ')';
145
+                $in = '('.$_POST['filetokeep'].')';
146 146
             }
147 147
             $criteria->add(new Criteria('file_id', $in, 'NOT IN'));
148 148
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     public function formatFileSize(&$file)
180 180
     {
181 181
         if ($file['file_size'] > 1000) {
182
-            $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb';
182
+            $file['formated_file_size'] = round($file['file_size'] / 1000).'kb';
183 183
         } else {
184 184
             $file['formated_file_size'] = '1kb';
185 185
         }
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function _deleteFile(&$file)
192 192
     {
193
-        if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) {
194
-            unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'));
193
+        if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) {
194
+            unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'));
195 195
         }
196 196
     }
197 197
 }
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 ($j == 1) {
82
-                        $event_picture1 = $REQUEST['file' . $j];
82
+                        $event_picture1 = $REQUEST['file'.$j];
83 83
                     } elseif ($j == 2) {
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 ($j == 1) {
90 90
                     $event_picture1 = '';
91 91
                 } elseif ($j == 2) {
@@ -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.
class/eventnotmember.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23 23
 
24 24
 /**
25 25
  * Class ExtcalEventNotMember.
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         $eventNotMember = $this->getObjects(new Criteria('event_id', $eventId));
86 86
         $count          = count($eventNotMember);
87 87
         if ($count > 0) {
88
-            $in = '(' . $eventNotMember[0]->getVar('uid');
88
+            $in = '('.$eventNotMember[0]->getVar('uid');
89 89
             array_shift($eventNotMember);
90 90
             foreach ($eventNotMember as $member) {
91
-                $in .= ',' . $member->getVar('uid');
91
+                $in .= ','.$member->getVar('uid');
92 92
             }
93
-            $in       .= ')';
93
+            $in .= ')';
94 94
             $criteria = new Criteria('uid', $in, 'IN');
95 95
         } else {
96 96
             $criteria = new Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/cat.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/perm.php';
24
-require_once __DIR__ . '/time.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/perm.php';
24
+require_once __DIR__.'/time.php';
25 25
 
26 26
 /**
27 27
  * Class ExtcalCat.
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
204 204
         $count                = count($authorizedAccessCats);
205 205
         if ($count > 0) {
206
-            $in = '(' . $authorizedAccessCats[0];
206
+            $in = '('.$authorizedAccessCats[0];
207 207
             array_shift($authorizedAccessCats);
208 208
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
209
-                $in .= ',' . $authorizedAccessCat;
209
+                $in .= ','.$authorizedAccessCat;
210 210
             }
211 211
             $in .= ')';
212 212
             $criteria->add(new Criteria('cat_id', $in, 'IN'));
Please login to merge, or discard this patch.
class/pear/Calendar/Hour.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 /**
50 50
  * Load Calendar base class.
51 51
  */
52
-require_once CALENDAR_ROOT . 'Calendar.php';
52
+require_once CALENDAR_ROOT.'Calendar.php';
53 53
 
54 54
 /**
55 55
  * Represents an Hour and builds Minutes
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function build($sDates = [])
96 96
     {
97
-        require_once CALENDAR_ROOT . 'Minute.php';
97
+        require_once CALENDAR_ROOT.'Minute.php';
98 98
         $mIH = $this->cE->getMinutesInHour($this->year, $this->month, $this->day, $this->hour);
99 99
         for ($i = 0; $i < $mIH; ++$i) {
100 100
             $this->children[$i] = new Calendar_Minute($this->year, $this->month, $this->day, $this->hour, $i);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             if ($this->year == $sDate->thisYear() && $this->month == $sDate->thisMonth()
119 119
                 && $this->day == $sDate->thisDay()
120 120
                 && $this->hour == $sDate->thisHour()) {
121
-                $key = (int)$sDate->thisMinute();
121
+                $key = (int) $sDate->thisMinute();
122 122
                 if (isset($this->children[$key])) {
123 123
                     $sDate->setSelected();
124 124
                     $this->children[$key] = $sDate;
Please login to merge, or discard this patch.