Completed
Push — master ( 55a138...ee7aee )
by Michael
05:41
created
class/Common/FilesManagement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
34 34
                 }
35 35
 
36
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
36
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
37 37
             }
38 38
         }
39 39
         catch (\Exception $e) {
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
         if (!mkdir($dst) && !is_dir($dst)) {
63 63
             while (false !== ($file = readdir($dir))) {
64 64
                 if (('.' !== $file) && ('..' !== $file)) {
65
-                    if (is_dir($src . '/' . $file)) {
66
-                        self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
65
+                    if (is_dir($src.'/'.$file)) {
66
+                        self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
67 67
                     } else {
68
-                        copy($src . '/' . $file, $dst . '/' . $file);
68
+                        copy($src.'/'.$file, $dst.'/'.$file);
69 69
                     }
70 70
                 }
71 71
             }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 self::rrmdir($fObj->getPathname());
161 161
             }
162 162
         }
163
-        $iterator = null;   // clear iterator Obj to close file/directory
163
+        $iterator = null; // clear iterator Obj to close file/directory
164 164
         return rmdir($src); // remove the directory & return results
165 165
     }
166 166
 
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
         $iterator = new \DirectoryIterator($src);
194 194
         foreach ($iterator as $fObj) {
195 195
             if ($fObj->isFile()) {
196
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
196
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
197 197
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
198 198
                 // Try recursively on directory
199
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
199
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
200 200
                 //                rmdir($fObj->getPath()); // now delete the directory
201 201
             }
202 202
         }
203
-        $iterator = null;   // clear iterator Obj to close file/directory
203
+        $iterator = null; // clear iterator Obj to close file/directory
204 204
         return rmdir($src); // remove the directory & return results
205 205
     }
206 206
 
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
         $iterator = new \DirectoryIterator($src);
237 237
         foreach ($iterator as $fObj) {
238 238
             if ($fObj->isFile()) {
239
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
239
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
240 240
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
241
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
241
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
242 242
             }
243 243
         }
244 244
         return true;
Please login to merge, or discard this patch.
class/Common/Breadcrumb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         require_once $GLOBALS['xoops']->path('class/template.php');
71 71
         $breadcrumbTpl = new \XoopsTpl();
72 72
         $breadcrumbTpl->assign('breadcrumb', $this->bread);
73
-        $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl');
73
+        $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl');
74 74
         unset($breadcrumbTpl);
75 75
 
76 76
         return $html;
Please login to merge, or discard this patch.
class/Form/FormDateTime.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function __construct($form, $startTS = 0, $endTS = 0)
18 18
     {
19
-        $startTS       = (int)$startTS;
19
+        $startTS       = (int) $startTS;
20 20
         $startTS       = ($startTS > 0) ? $startTS : time();
21 21
         $startDatetime = getdate($startTS);
22 22
 
23
-        $endTS       = (int)$endTS;
23
+        $endTS       = (int) $endTS;
24 24
         $endTS       = ($endTS > 0) ? $endTS : time();
25 25
         $endDatetime = getdate($endTS);
26 26
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         for ($i = 0; $i < 24; ++$i) {
29 29
             for ($j = 0; $j < _EXTCAL_TS_MINUTE; $j += 15) {
30 30
                 $key             = ($i * _EXTCAL_TS_HOUR) + ($j * _EXTCAL_TS_MINUTE);
31
-                $timearray[$key] = (0 != $j) ? $i . ':' . $j : $i . ':0' . $j;
31
+                $timearray[$key] = (0 != $j) ? $i.':'.$j : $i.':0'.$j;
32 32
             }
33 33
         }
34 34
         ksort($timearray);
Please login to merge, or discard this patch.
class/EventHandler.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
25 25
 
26
-require_once __DIR__ . '/../include/constantes.php';
26
+require_once __DIR__.'/../include/constantes.php';
27 27
 
28 28
 /**
29 29
  * Class EventHandler.
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
         //        while (list($k, $v) = each($events)) {
339 339
         foreach ($events as $k => $v) {
340
-            $ordre[] = (int)$v['event_start'];
340
+            $ordre[] = (int) $v['event_start'];
341 341
             $this->formatEventDate($v, $extcalConfig['event_date_week']);
342 342
             //$v['cat']['cat_light_color'] = $v['cat']['cat_color'];
343 343
             $v['cat']['cat_light_color'] = Extcal\Utility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX);
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 
543 543
         reset($period);
544 544
         foreach ($period as $dt) {
545
-            echo $dt->format("l d-m-Y H:i:s\n") . '<br>';
545
+            echo $dt->format("l d-m-Y H:i:s\n").'<br>';
546 546
         }
547 547
     }
548 548
 
@@ -875,10 +875,10 @@  discard block
 block discarded – undo
875 875
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
876 876
         $count                = count($authorizedAccessCats);
877 877
         if ($count > 0) {
878
-            $in = '(' . $authorizedAccessCats[0];
878
+            $in = '('.$authorizedAccessCats[0];
879 879
             array_shift($authorizedAccessCats);
880 880
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
881
-                $in .= ',' . $authorizedAccessCat;
881
+                $in .= ','.$authorizedAccessCat;
882 882
             }
883 883
             $in .= ')';
884 884
             $criteria->add(new \Criteria('cat_id', $in, 'IN'));
@@ -898,10 +898,10 @@  discard block
 block discarded – undo
898 898
         }
899 899
         if (is_array($cats)) {
900 900
             if (false === array_search(0, $cats)) {
901
-                $in = '(' . current($cats);
901
+                $in = '('.current($cats);
902 902
                 array_shift($cats);
903 903
                 foreach ($cats as $cat) {
904
-                    $in .= ',' . $cat;
904
+                    $in .= ','.$cat;
905 905
                 }
906 906
                 $in .= ')';
907 907
                 $criteria->add(new \Criteria('cat_id', $in, 'IN'));
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
             if ('clone' === $mode) {
943 943
                 $data['event_id'] = 0;
944 944
                 $event->setVar('event_id', 0);
945
-                $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')';
945
+                $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')';
946 946
                 $event->setVar('event_title', $newTitle);
947 947
             }
948 948
 
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
         $form->addElement($catSelect, true);
1127 1127
         //-----------------------------------------------------------
1128 1128
 
1129
-        $file_path = __DIR__ . '/../assets/css/images';
1129
+        $file_path = __DIR__.'/../assets/css/images';
1130 1130
         $tf        = \XoopsLists::getImgListAsArray($file_path);
1131 1131
         array_unshift($tf, _MD_EXTCAL_NONE);
1132 1132
         $xfIcones = new \XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, '');
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
         if (count($files) > 0) {
1232 1232
             $eventFiles = new Extcal\Form\FormFileCheckBox('', 'filetokeep');
1233 1233
             foreach ($files as $file) {
1234
-                $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size'];
1234
+                $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size'];
1235 1235
                 $eventFiles->addOption($file['file_id'], $name);
1236 1236
             }
1237 1237
             $fileElmtTray->addElement($eventFiles);
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
         //Picture1
1248 1248
         $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), '');
1249 1249
         if (!empty($event_picture1)) {
1250
-            $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>"));
1250
+            $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>"));
1251 1251
             $check_del_img = new \XoopsFormCheckBox('', 'delimg_1');
1252 1252
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1253 1253
             $file_tray->addElement($check_del_img);
@@ -1258,8 +1258,8 @@  discard block
 block discarded – undo
1258 1258
         }
1259 1259
         $file_img->setExtra("size ='40'");
1260 1260
         $file_tray->addElement($file_img);
1261
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1262
-        $file_label = new \XoopsFormLabel('', '<br>' . $msg);
1261
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1262
+        $file_label = new \XoopsFormLabel('', '<br>'.$msg);
1263 1263
         $file_tray->addElement($file_label);
1264 1264
         $form->addElement($file_tray);
1265 1265
         $form->addElement(new \XoopsFormHidden('file1', $event_picture1));
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
         //Picture2
1268 1268
         $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
1269 1269
         if (!empty($event_picture2)) {
1270
-            $file_tray->addElement(new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>"));
1270
+            $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>"));
1271 1271
             $check_del_img = new \XoopsFormCheckBox('', 'delimg_2');
1272 1272
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1273 1273
             $file_tray->addElement($check_del_img);
@@ -1278,8 +1278,8 @@  discard block
 block discarded – undo
1278 1278
         }
1279 1279
         $file_img->setExtra("size ='40'");
1280 1280
         $file_tray->addElement($file_img);
1281
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1282
-        $file_label = new \XoopsFormLabel('', '<br>' . $msg);
1281
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1282
+        $file_label = new \XoopsFormLabel('', '<br>'.$msg);
1283 1283
         $file_tray->addElement($file_label);
1284 1284
         $form->addElement($file_tray);
1285 1285
         $form->addElement(new \XoopsFormHidden('file2', $event_picture2));
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
                 $recurRules = 'weekly|';
1347 1347
                 $recurRules .= $parm['rrule_weekly_interval'];
1348 1348
                 foreach ($parm['rrule_weekly_bydays'] as $day) {
1349
-                    $recurRules .= '|' . $day;
1349
+                    $recurRules .= '|'.$day;
1350 1350
                 }
1351 1351
 
1352 1352
                 break;
@@ -1356,11 +1356,11 @@  discard block
 block discarded – undo
1356 1356
                     $parm['rrule_monthly_interval'] = 0;
1357 1357
                 }
1358 1358
                 $recurRules = 'monthly|';
1359
-                $recurRules .= $parm['rrule_monthly_interval'] . '|';
1359
+                $recurRules .= $parm['rrule_monthly_interval'].'|';
1360 1360
                 if ('' != $parm['rrule_monthly_byday']) {
1361 1361
                     $recurRules .= $parm['rrule_monthly_byday'];
1362 1362
                 } else {
1363
-                    $recurRules .= 'MD' . $parm['rrule_bymonthday'];
1363
+                    $recurRules .= 'MD'.$parm['rrule_bymonthday'];
1364 1364
                 }
1365 1365
 
1366 1366
                 break;
@@ -1394,9 +1394,9 @@  discard block
 block discarded – undo
1394 1394
 
1395 1395
                 $recurRules = 'yearly|';
1396 1396
                 $recurRules .= $parm['rrule_yearly_interval'];
1397
-                $recurRules .= '|' . $parm['rrule_yearly_byday'];
1397
+                $recurRules .= '|'.$parm['rrule_yearly_byday'];
1398 1398
                 foreach ($parm['rrule_yearly_bymonths'] as $month) {
1399
-                    $recurRules .= '|' . $month;
1399
+                    $recurRules .= '|'.$month;
1400 1400
                 }
1401 1401
 
1402 1402
                 break;
@@ -2326,10 +2326,10 @@  discard block
 block discarded – undo
2326 2326
         global $xoopsDB;
2327 2327
 
2328 2328
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2329
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2330
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2329
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2330
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2331 2331
 
2332
-        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}";
2332
+        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}";
2333 2333
         //---------------------------------------------------
2334 2334
         $tw   = [];
2335 2335
         $tw[] = 'te.cat_id = tc.cat_id';
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2339 2339
         $inCat                = 'te.cat_id IN (0)';
2340 2340
         if (count($authorizedAccessCats) > 0) {
2341
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2341
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2342 2342
         }
2343 2343
         //echo $tw[count($tw)-1];
2344 2344
 
@@ -2374,12 +2374,12 @@  discard block
 block discarded – undo
2374 2374
                 'te.event_address',
2375 2375
                 'tc.cat_name',
2376 2376
             ];
2377
-            $t       = [];
2377
+            $t = [];
2378 2378
             foreach ($queryarray as $i => $iValue) {
2379 2379
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2380 2380
             }
2381 2381
 
2382
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2382
+            $flt = '('.implode(" {$andor} ", $t1).')';
2383 2383
 
2384 2384
             $t = [];
2385 2385
             foreach ($tFields as $h => $hValue) {
@@ -2388,10 +2388,10 @@  discard block
 block discarded – undo
2388 2388
 
2389 2389
             $filtre = implode(' OR ', $t);
2390 2390
             $filtre = str_replace('#', '%', $filtre);
2391
-            $tw[]   = '(' . $filtre . ')';
2391
+            $tw[]   = '('.$filtre.')';
2392 2392
         }
2393 2393
 
2394
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2394
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2395 2395
         //------------------------------------------------------------
2396 2396
         if (count($orderBy) > 0) {
2397 2397
             $t = [];
@@ -2401,7 +2401,7 @@  discard block
 block discarded – undo
2401 2401
                 }
2402 2402
             }
2403 2403
             if (count($t) > 0) {
2404
-                $sql .= ' ORDER BY ' . implode(',', $t);
2404
+                $sql .= ' ORDER BY '.implode(',', $t);
2405 2405
             }
2406 2406
         }
2407 2407
 
@@ -2434,7 +2434,7 @@  discard block
 block discarded – undo
2434 2434
         $i = 0;
2435 2435
         while ($myrow = $xoopsDB->fetchArray($result)) {
2436 2436
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2437
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2437
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2438 2438
             $ret[$i]['title'] = $myrow['event_title'];
2439 2439
             $ret[$i]['time']  = $myrow['event_submitdate'];
2440 2440
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2474,23 +2474,23 @@  discard block
 block discarded – undo
2474 2474
         //        }
2475 2475
         $tEvent = $xoopsDB->prefix('extcal_event');
2476 2476
         $tCat   = $xoopsDB->prefix('extcal_cat');
2477
-        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2477
+        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2478 2478
 
2479 2479
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2480 2480
         $count                = count($authorizedAccessCats);
2481 2481
         if ($count > 0) {
2482
-            $in = '(' . $authorizedAccessCats[0];
2482
+            $in = '('.$authorizedAccessCats[0];
2483 2483
             array_shift($authorizedAccessCats);
2484 2484
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2485
-                $in .= ',' . $authorizedAccessCat;
2485
+                $in .= ','.$authorizedAccessCat;
2486 2486
             }
2487 2487
             $in .= ')';
2488 2488
         } else {
2489 2489
             $in = '(0)';
2490 2490
         }
2491
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2491
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2492 2492
         if (0 != $userId) {
2493
-            $sql .= " AND event_submitter = '" . $userId . "'";
2493
+            $sql .= " AND event_submitter = '".$userId."'";
2494 2494
         }
2495 2495
 
2496 2496
         //echoArray($queryarray,false);
@@ -2510,7 +2510,7 @@  discard block
 block discarded – undo
2510 2510
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2511 2511
             }
2512 2512
 
2513
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2513
+            $flt = '('.implode(" {$andor} ", $t1).')';
2514 2514
 
2515 2515
             $t = [];
2516 2516
             foreach ($tFields as $h => $hValue) {
@@ -2519,11 +2519,11 @@  discard block
 block discarded – undo
2519 2519
 
2520 2520
             $filtre = implode(' OR ', $t);
2521 2521
             $filtre = str_replace('#', '%', $filtre);
2522
-            $sql    .= " AND ($filtre)";
2522
+            $sql .= " AND ($filtre)";
2523 2523
         }
2524 2524
 
2525 2525
         if ('' != $criteresPlus) {
2526
-            $sql .= ' AND ' . $criteresPlus;
2526
+            $sql .= ' AND '.$criteresPlus;
2527 2527
         }
2528 2528
         $sql .= ' ORDER BY event_id DESC';
2529 2529
 
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
         if ($xoopsSearch) {
2534 2534
             while ($myrow = $xoopsDB->fetchArray($result)) {
2535 2535
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2536
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2536
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2537 2537
                 $ret[$i]['title'] = $myrow['event_title'];
2538 2538
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2539 2539
                 $ret[$i]['uid']   = $myrow['event_submitter'];
Please login to merge, or discard this patch.
class/EventNotMemberHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,12 +72,12 @@
 block discarded – undo
72 72
         $eventNotMember = $this->getObjects(new \Criteria('event_id', $eventId));
73 73
         $count          = count($eventNotMember);
74 74
         if ($count > 0) {
75
-            $in = '(' . $eventNotMember[0]->getVar('uid');
75
+            $in = '('.$eventNotMember[0]->getVar('uid');
76 76
             array_shift($eventNotMember);
77 77
             foreach ($eventNotMember as $member) {
78
-                $in .= ',' . $member->getVar('uid');
78
+                $in .= ','.$member->getVar('uid');
79 79
             }
80
-            $in       .= ')';
80
+            $in .= ')';
81 81
             $criteria = new \Criteria('uid', $in, 'IN');
82 82
         } else {
83 83
             $criteria = new \Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/ExtcalPersistableObjectHandler.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         if (is_array($this->keyName)) {
105 105
             $criteria = new \CriteriaCompo();
106 106
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
107
-                $criteria->add(new \Criteria($this->keyName[$i], (int)$id[$i]));
107
+                $criteria->add(new \Criteria($this->keyName[$i], (int) $id[$i]));
108 108
             }
109 109
         } else {
110
-            $criteria = new \Criteria($this->keyName, (int)$id);
110
+            $criteria = new \Criteria($this->keyName, (int) $id);
111 111
         }
112 112
         $criteria->setLimit(1);
113 113
         $objectArray = $this->getObjects($criteria, false, true);
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $ret   = [];
133 133
         $limit = $start = 0;
134
-        $sql   = 'SELECT * FROM ' . $this->table;
134
+        $sql   = 'SELECT * FROM '.$this->table;
135 135
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
136
-            $sql .= ' ' . $criteria->renderWhere();
136
+            $sql .= ' '.$criteria->renderWhere();
137 137
             if ('' != $criteria->getSort()) {
138
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
138
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
139 139
             }
140 140
             $limit = $criteria->getLimit();
141 141
             $start = $criteria->getStart();
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     $ret[] = $obj;
171 171
                 } else {
172 172
                     $row  = [];
173
-                    $vars =& $obj->getVars();
173
+                    $vars = & $obj->getVars();
174 174
                     foreach (array_keys($vars) as $i) {
175 175
                         $row[$i] = $obj->getVar($i);
176 176
                     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                     $ret[$myrow[$this->keyName]] = $obj;
182 182
                 } else {
183 183
                     $row  = [];
184
-                    $vars =& $obj->getVars();
184
+                    $vars = & $obj->getVars();
185 185
                     foreach (array_keys($vars) as $i) {
186 186
                         $row[$i] = $obj->getVar($i);
187 187
                     }
@@ -214,15 +214,15 @@  discard block
 block discarded – undo
214 214
             $criteria->setSort($this->identifierName);
215 215
         }
216 216
 
217
-        $sql = 'SELECT ' . $this->keyName;
217
+        $sql = 'SELECT '.$this->keyName;
218 218
         if (!empty($this->identifierName)) {
219
-            $sql .= ', ' . $this->identifierName;
219
+            $sql .= ', '.$this->identifierName;
220 220
         }
221
-        $sql .= ' FROM ' . $this->table;
221
+        $sql .= ' FROM '.$this->table;
222 222
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
223
-            $sql .= ' ' . $criteria->renderWhere();
223
+            $sql .= ' '.$criteria->renderWhere();
224 224
             if ('' != $criteria->getSort()) {
225
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
225
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
226 226
             }
227 227
             $limit = $criteria->getLimit();
228 228
             $start = $criteria->getStart();
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
256 256
             if ('' != $criteria->groupby) {
257 257
                 $groupby = true;
258
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
258
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
259 259
             }
260 260
         }
261
-        $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table;
261
+        $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
262 262
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
263
-            $sql .= ' ' . $criteria->renderWhere();
263
+            $sql .= ' '.$criteria->renderWhere();
264 264
             if ('' != $criteria->groupby) {
265 265
                 $sql .= $criteria->getGroupby();
266 266
             }
@@ -296,13 +296,13 @@  discard block
 block discarded – undo
296 296
         if (is_array($this->keyName)) {
297 297
             $clause = [];
298 298
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
299
-                $clause[] = $this->keyName[$i] . ' = ' . $id[$i];
299
+                $clause[] = $this->keyName[$i].' = '.$id[$i];
300 300
             }
301 301
             $whereclause = implode(' AND ', $clause);
302 302
         } else {
303
-            $whereclause = $this->keyName . ' = ' . $id;
303
+            $whereclause = $this->keyName.' = '.$id;
304 304
         }
305
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
305
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
306 306
         if (false !== $force) {
307 307
             $result = $this->db->queryF($sql);
308 308
         } else {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             }
334 334
 
335 335
             if (!($obj instanceof $this->className && class_exists($this->className))) {
336
-                $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
336
+                $obj->setErrors(get_class($obj).' Differs from '.$this->className);
337 337
 
338 338
                 return false;
339 339
             }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         foreach ($obj->cleanVars as $k => $v) {
346 346
             if (XOBJ_DTYPE_INT == $obj->vars[$k]['data_type']) {
347
-                $cleanvars[$k] = (int)$v;
347
+                $cleanvars[$k] = (int) $v;
348 348
             } elseif (is_array($v)) {
349 349
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
350 350
             } else {
@@ -354,12 +354,12 @@  discard block
 block discarded – undo
354 354
         if ($obj->isNew()) {
355 355
             if (!is_array($this->keyName)) {
356 356
                 if ($cleanvars[$this->keyName] < 1) {
357
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
357
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
358 358
                 }
359 359
             }
360
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
360
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')';
361 361
         } else {
362
-            $sql = 'UPDATE ' . $this->table . ' SET';
362
+            $sql = 'UPDATE '.$this->table.' SET';
363 363
             foreach ($cleanvars as $key => $value) {
364 364
                 if ((!is_array($this->keyName) && $key == $this->keyName)
365 365
                     || (is_array($this->keyName)
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                 if (isset($notfirst)) {
370 370
                     $sql .= ',';
371 371
                 }
372
-                $sql      .= ' ' . $key . ' = ' . $value;
372
+                $sql .= ' '.$key.' = '.$value;
373 373
                 $notfirst = true;
374 374
             }
375 375
             if (is_array($this->keyName)) {
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
                     if ($i > 0) {
379 379
                         $whereclause .= ' AND ';
380 380
                     }
381
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
381
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
382 382
                 }
383 383
             } else {
384
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
384
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
385 385
             }
386
-            $sql .= ' WHERE ' . $whereclause;
386
+            $sql .= ' WHERE '.$whereclause;
387 387
         }
388 388
         if (false !== $force) {
389 389
             $result = $this->db->queryF($sql);
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      */
413 413
     public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false)
414 414
     {
415
-        $setClause = $fieldname . ' = ';
415
+        $setClause = $fieldname.' = ';
416 416
         if (is_numeric($fieldvalue)) {
417 417
             $setClause .= $fieldvalue;
418 418
         } elseif (is_array($fieldvalue)) {
@@ -420,9 +420,9 @@  discard block
 block discarded – undo
420 420
         } else {
421 421
             $setClause .= $this->db->quoteString($fieldvalue);
422 422
         }
423
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause;
423
+        $sql = 'UPDATE '.$this->table.' SET '.$setClause;
424 424
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
425
-            $sql .= ' ' . $criteria->renderWhere();
425
+            $sql .= ' '.$criteria->renderWhere();
426 426
         }
427 427
         if (false !== $force) {
428 428
             $result = $this->db->queryF($sql);
@@ -446,9 +446,9 @@  discard block
 block discarded – undo
446 446
      */
447 447
     public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
448 448
     {
449
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;
449
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
450 450
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
451
-            $sql .= ' ' . $criteria->renderWhere();
451
+            $sql .= ' '.$criteria->renderWhere();
452 452
         }
453 453
         if (false !== $force) {
454 454
             $result = $this->db->queryF($sql);
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
     public function deleteAll(\CriteriaElement $criteria = null, $force = true, $asObject = false)
476 476
     {
477 477
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
478
-            $sql = 'DELETE FROM ' . $this->table;
479
-            $sql .= ' ' . $criteria->renderWhere();
478
+            $sql = 'DELETE FROM '.$this->table;
479
+            $sql .= ' '.$criteria->renderWhere();
480 480
             if (!$this->db->query($sql)) {
481 481
                 return false;
482 482
             }
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
      */
611 611
     public function updateCounter($fieldname, $criteria, $op = '+')
612 612
     {
613
-        $sql    = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';
614
-        $sql    .= ' ' . $criteria->renderWhere();
613
+        $sql    = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
614
+        $sql .= ' '.$criteria->renderWhere();
615 615
         $result = $this->db->queryF($sql);
616 616
         if (!$result) {
617 617
             return false;
@@ -633,12 +633,12 @@  discard block
 block discarded – undo
633 633
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
634 634
             if ('' != $criteria->groupby) {
635 635
                 $groupby = true;
636
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
636
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
637 637
             }
638 638
         }
639
-        $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;
639
+        $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
640 640
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
641
-            $sql .= ' ' . $criteria->renderWhere();
641
+            $sql .= ' '.$criteria->renderWhere();
642 642
             if ('' != $criteria->groupby) {
643 643
                 $sql .= $criteria->getGroupby();
644 644
             }
@@ -674,12 +674,12 @@  discard block
 block discarded – undo
674 674
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
675 675
             if ('' != $criteria->groupby) {
676 676
                 $groupby = true;
677
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
677
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
678 678
             }
679 679
         }
680
-        $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;
680
+        $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
681 681
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
682
-            $sql .= ' ' . $criteria->renderWhere();
682
+            $sql .= ' '.$criteria->renderWhere();
683 683
             if ('' != $criteria->groupby) {
684 684
                 $sql .= $criteria->getGroupby();
685 685
             }
@@ -712,9 +712,9 @@  discard block
 block discarded – undo
712 712
     {
713 713
         $field = '';
714 714
 
715
-        $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;
715
+        $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
716 716
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
717
-            $sql .= ' ' . $criteria->renderWhere();
717
+            $sql .= ' '.$criteria->renderWhere();
718 718
         }
719 719
         $result = $this->db->query($sql);
720 720
         if (!$result) {
Please login to merge, or discard this patch.
class/FileHandler.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
22 22
 
23 23
 // // require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
24
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
24
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
25 25
 
26 26
 /**
27 27
  * Class FileHandler.
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
         $userId = $GLOBALS['xoopsUser'] ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
47 47
 
48 48
         $allowedMimeType = [];
49
-        $mimeType        = include XOOPS_ROOT_PATH . '/include/mimetypes.inc.php';
49
+        $mimeType        = include XOOPS_ROOT_PATH.'/include/mimetypes.inc.php';
50 50
         foreach ($GLOBALS['xoopsModuleConfig']['allowed_file_extention'] as $fileExt) {
51 51
             $allowedMimeType[] = $mimeType[$fileExt];
52 52
         }
53 53
 
54
-        $uploader = new \XoopsMediaUploader(XOOPS_ROOT_PATH . '/uploads/extcal', $allowedMimeType, 3145728);
55
-        $uploader->setPrefix($userId . '-' . $eventId . '_');
54
+        $uploader = new \XoopsMediaUploader(XOOPS_ROOT_PATH.'/uploads/extcal', $allowedMimeType, 3145728);
55
+        $uploader->setPrefix($userId.'-'.$eventId.'_');
56 56
         if ($uploader->fetchMedia('event_file')) {
57 57
             if (!$uploader->upload()) {
58 58
                 return false;
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
         if (isset($_POST['filetokeep'])) {
114 114
             if (is_array($_POST['filetokeep'])) {
115 115
                 $count = count($_POST['filetokeep']);
116
-                $in    = '(' . $_POST['filetokeep'][0];
116
+                $in    = '('.$_POST['filetokeep'][0];
117 117
                 array_shift($_POST['filetokeep']);
118 118
                 foreach ($_POST['filetokeep'] as $elmt) {
119
-                    $in .= ',' . $elmt;
119
+                    $in .= ','.$elmt;
120 120
                 }
121 121
                 $in .= ')';
122 122
             } else {
123
-                $in = '(' . $_POST['filetokeep'] . ')';
123
+                $in = '('.$_POST['filetokeep'].')';
124 124
             }
125 125
             $criteria->add(new \Criteria('file_id', $in, 'NOT IN'));
126 126
         }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public function formatFileSize(&$file)
158 158
     {
159 159
         if ($file['file_size'] > 1000) {
160
-            $file['formated_file_size'] = round($file['file_size'] / 1000) . 'kb';
160
+            $file['formated_file_size'] = round($file['file_size'] / 1000).'kb';
161 161
         } else {
162 162
             $file['formated_file_size'] = '1kb';
163 163
         }
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function _deleteFile(&$file)
170 170
     {
171
-        if (file_exists(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'))) {
172
-            unlink(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name'));
171
+        if (file_exists(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'))) {
172
+            unlink(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name'));
173 173
         }
174 174
     }
175 175
 }
Please login to merge, or discard this patch.
class/EventmemberHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,12 +71,12 @@
 block discarded – undo
71 71
         $eventMember   = $this->getObjects(new \Criteria('event_id', $eventId));
72 72
         $count         = count($eventMember);
73 73
         if ($count > 0) {
74
-            $in = '(' . $eventMember[0]->getVar('uid');
74
+            $in = '('.$eventMember[0]->getVar('uid');
75 75
             array_shift($eventMember);
76 76
             foreach ($eventMember as $member) {
77
-                $in .= ',' . $member->getVar('uid');
77
+                $in .= ','.$member->getVar('uid');
78 78
             }
79
-            $in       .= ')';
79
+            $in .= ')';
80 80
             $criteria = new \Criteria('uid', $in, 'IN');
81 81
         } else {
82 82
             $criteria = new \Criteria('uid', '(0)', 'IN');
Please login to merge, or discard this patch.
class/CategoryHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,10 +186,10 @@
 block discarded – undo
186 186
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
187 187
         $count                = count($authorizedAccessCats);
188 188
         if ($count > 0) {
189
-            $in = '(' . $authorizedAccessCats[0];
189
+            $in = '('.$authorizedAccessCats[0];
190 190
             array_shift($authorizedAccessCats);
191 191
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
192
-                $in .= ',' . $authorizedAccessCat;
192
+                $in .= ','.$authorizedAccessCat;
193 193
             }
194 194
             $in .= ')';
195 195
             $criteria->add(new \Criteria('cat_id', $in, 'IN'));
Please login to merge, or discard this patch.