Completed
Push — master ( a9decc...a21b67 )
by Michael
02:51
created
class/etablissement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 //Kraven 30
21 21
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
22 22
 
23
-require_once XOOPS_ROOT_PATH . '/kernel/object.php';
23
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
24 24
 
25 25
 //class ExtcalEvent extends XoopsObject
26 26
 //class extcal_etablissement extends XoopsObject
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT);
72 72
 
73
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
73
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
74 74
 
75 75
         $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
76 76
         $form->setExtra('enctype="multipart/form-data"');
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40));
90 90
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40));
91 91
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40));
92
-        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
92
+        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
93 93
 
94 94
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40));
95 95
         $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         //Logo
98 98
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
99 99
         if ($this->getVar('logo') != '') {
100
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''/><br><br>"));
100
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''/><br><br>"));
101 101
             $check_del_img = new XoopsFormCheckBox('', 'delimg');
102 102
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
103 103
             $file_tray->addElement($check_del_img);
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
         }
109 109
         $file_img->setExtra("size ='40'");
110 110
         $file_tray->addElement($file_img);
111
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500);
112
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
111
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500);
112
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
113 113
         $file_tray->addElement($file_label);
114 114
         $form->addElement($file_tray);
115 115
         $form->addElement(new XoopsFormHidden('file', $this->getVar('logo')));
Please login to merge, or discard this patch.
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('XOOPS root path not defined');
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/utility.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@
 block discarded – undo
151 151
             $cat_color = $catList->getVar('cat_color');
152 152
             $checked   = in_array($cat_id, $cat) ? 'checked' : '';
153 153
             $cat       = ''
154
-                         . "<div style='float:left; margin-left:5px;'>"
155
-                         . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
156
-                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
157
-                         . " {$name}"
158
-                         . '</div>';
154
+                            . "<div style='float:left; margin-left:5px;'>"
155
+                            . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
156
+                            . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"
157
+                            . " {$name}"
158
+                            . '</div>';
159 159
 
160 160
             $t[] = $cat;
161 161
         }
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 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, array(
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
         }
@@ -558,14 +558,14 @@  discard block
 block discarded – undo
558 558
     {
559 559
         $moduleDirName = basename(dirname(__DIR__));
560 560
         if (null === $module) {
561
-            $module        = XoopsModule::getByDirname($moduleDirName);
561
+            $module = XoopsModule::getByDirname($moduleDirName);
562 562
         }
563 563
         xoops_loadLanguage('admin', $moduleDirName);
564 564
         //check for minimum XOOPS version
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 things like x.x.x.0_RC2
583
+                if ((int) $v > 0) { // handles things like x.x.x.0_RC2
584 584
                     $success = false;
585 585
                     break;
586 586
                 }
Please login to merge, or discard this patch.
class/event.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2398,10 +2398,10 @@
 block discarded – undo
2398 2398
         $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2399 2399
 
2400 2400
         $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '
2401
-               . 'year(FROM_UNIXTIME(event_start)) AS year,'
2402
-               . 'month(FROM_UNIXTIME(event_start)) AS month,'
2403
-               . 'day(FROM_UNIXTIME(event_start)) AS day'
2404
-               . " FROM {$tEvent}, {$tCat}";
2401
+                . 'year(FROM_UNIXTIME(event_start)) AS year,'
2402
+                . 'month(FROM_UNIXTIME(event_start)) AS month,'
2403
+                . 'day(FROM_UNIXTIME(event_start)) AS day'
2404
+                . " FROM {$tEvent}, {$tCat}";
2405 2405
         //---------------------------------------------------
2406 2406
         $tw   = array();
2407 2407
         $tw[] = 'te.cat_id = tc.cat_id';
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 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('XOOPS root path not defined');
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']          = array(
69
+        $this->externalKey['cat_id'] = array(
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;
@@ -2394,8 +2394,8 @@  discard block
 block discarded – undo
2394 2394
         global $xoopsDB;
2395 2395
 
2396 2396
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2397
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2398
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2397
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2398
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2399 2399
 
2400 2400
         $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '
2401 2401
                . 'year(FROM_UNIXTIME(event_start)) AS year,'
@@ -2410,7 +2410,7 @@  discard block
 block discarded – undo
2410 2410
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2411 2411
         $inCat                = 'te.cat_id IN (0)';
2412 2412
         if (count($authorizedAccessCats) > 0) {
2413
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2413
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2414 2414
         }
2415 2415
         //echo $tw[count($tw)-1];
2416 2416
 
@@ -2446,12 +2446,12 @@  discard block
 block discarded – undo
2446 2446
                 'te.event_address',
2447 2447
                 'tc.cat_name',
2448 2448
             );
2449
-            $t       = array();
2449
+            $t = array();
2450 2450
             for ($i = 0, $count = count($queryarray); $i < $count; ++$i) {
2451 2451
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2452 2452
             }
2453 2453
 
2454
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2454
+            $flt = '('.implode(" {$andor} ", $t1).')';
2455 2455
 
2456 2456
             $t = array();
2457 2457
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2460,10 +2460,10 @@  discard block
 block discarded – undo
2460 2460
 
2461 2461
             $filtre = implode(' OR ', $t);
2462 2462
             $filtre = str_replace('#', '%', $filtre);
2463
-            $tw[]   = '(' . $filtre . ')';
2463
+            $tw[]   = '('.$filtre.')';
2464 2464
         }
2465 2465
 
2466
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2466
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2467 2467
         //------------------------------------------------------------
2468 2468
         if (count($orderBy) > 0) {
2469 2469
             $t = array();
@@ -2473,7 +2473,7 @@  discard block
 block discarded – undo
2473 2473
                 }
2474 2474
             }
2475 2475
             if (count($t) > 0) {
2476
-                $sql .= ' ORDER BY ' . implode(',', $t);
2476
+                $sql .= ' ORDER BY '.implode(',', $t);
2477 2477
             }
2478 2478
         }
2479 2479
 
@@ -2506,7 +2506,7 @@  discard block
 block discarded – undo
2506 2506
         $i = 0;
2507 2507
         while ($myrow = $xoopsDB->fetchArray($result)) {
2508 2508
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2509
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2509
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2510 2510
             $ret[$i]['title'] = $myrow['event_title'];
2511 2511
             $ret[$i]['time']  = $myrow['event_submitdate'];
2512 2512
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2546,23 +2546,23 @@  discard block
 block discarded – undo
2546 2546
         //        }
2547 2547
         $tEvent = $xoopsDB->prefix('extcal_event');
2548 2548
         $tCat   = $xoopsDB->prefix('extcal_cat');
2549
-        $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'";
2549
+        $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'";
2550 2550
 
2551 2551
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2552 2552
         $count                = count($authorizedAccessCats);
2553 2553
         if ($count > 0) {
2554
-            $in = '(' . $authorizedAccessCats[0];
2554
+            $in = '('.$authorizedAccessCats[0];
2555 2555
             array_shift($authorizedAccessCats);
2556 2556
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2557
-                $in .= ',' . $authorizedAccessCat;
2557
+                $in .= ','.$authorizedAccessCat;
2558 2558
             }
2559 2559
             $in .= ')';
2560 2560
         } else {
2561 2561
             $in = '(0)';
2562 2562
         }
2563
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2563
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2564 2564
         if ($userId != 0) {
2565
-            $sql .= " AND event_submitter = '" . $userId . "'";
2565
+            $sql .= " AND event_submitter = '".$userId."'";
2566 2566
         }
2567 2567
 
2568 2568
         //echoArray($queryarray,false);
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2583 2583
             }
2584 2584
 
2585
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2585
+            $flt = '('.implode(" {$andor} ", $t1).')';
2586 2586
 
2587 2587
             $t = array();
2588 2588
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2591,11 +2591,11 @@  discard block
 block discarded – undo
2591 2591
 
2592 2592
             $filtre = implode(' OR ', $t);
2593 2593
             $filtre = str_replace('#', '%', $filtre);
2594
-            $sql    .= " AND ($filtre)";
2594
+            $sql .= " AND ($filtre)";
2595 2595
         }
2596 2596
 
2597 2597
         if ($criteresPlus != '') {
2598
-            $sql .= ' AND ' . $criteresPlus;
2598
+            $sql .= ' AND '.$criteresPlus;
2599 2599
         }
2600 2600
         $sql .= ' ORDER BY event_id DESC';
2601 2601
 
@@ -2605,7 +2605,7 @@  discard block
 block discarded – undo
2605 2605
         if ($xoopsSearch) {
2606 2606
             while ($myrow = $xoopsDB->fetchArray($result)) {
2607 2607
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2608
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2608
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2609 2609
                 $ret[$i]['title'] = $myrow['event_title'];
2610 2610
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2611 2611
                 $ret[$i]['uid']   = $myrow['event_submitter'];
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('XOOPS root path not defined');
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/ExtcalPersistableObjectHandler.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         if (is_array($this->keyName)) {
101 101
             $criteria = new CriteriaCompo();
102 102
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
103
-                $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i]));
103
+                $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i]));
104 104
             }
105 105
         } else {
106
-            $criteria = new Criteria($this->keyName, (int)$id);
106
+            $criteria = new Criteria($this->keyName, (int) $id);
107 107
         }
108 108
         $criteria->setLimit(1);
109 109
         $objectArray = $this->getObjects($criteria, false, true);
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $ret   = array();
129 129
         $limit = $start = 0;
130
-        $sql   = 'SELECT * FROM ' . $this->table;
130
+        $sql   = 'SELECT * FROM '.$this->table;
131 131
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
132
-            $sql .= ' ' . $criteria->renderWhere();
132
+            $sql .= ' '.$criteria->renderWhere();
133 133
             if ($criteria->getSort() != '') {
134
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
134
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
135 135
             }
136 136
             $limit = $criteria->getLimit();
137 137
             $start = $criteria->getStart();
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     $ret[] = $obj;
167 167
                 } else {
168 168
                     $row  = array();
169
-                    $vars =& $obj->getVars();
169
+                    $vars = & $obj->getVars();
170 170
                     foreach (array_keys($vars) as $i) {
171 171
                         $row[$i] = $obj->getVar($i);
172 172
                     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                     $ret[$myrow[$this->keyName]] = $obj;
178 178
                 } else {
179 179
                     $row  = array();
180
-                    $vars =& $obj->getVars();
180
+                    $vars = & $obj->getVars();
181 181
                     foreach (array_keys($vars) as $i) {
182 182
                         $row[$i] = $obj->getVar($i);
183 183
                     }
@@ -210,15 +210,15 @@  discard block
 block discarded – undo
210 210
             $criteria->setSort($this->identifierName);
211 211
         }
212 212
 
213
-        $sql = 'SELECT ' . $this->keyName;
213
+        $sql = 'SELECT '.$this->keyName;
214 214
         if (!empty($this->identifierName)) {
215
-            $sql .= ', ' . $this->identifierName;
215
+            $sql .= ', '.$this->identifierName;
216 216
         }
217
-        $sql .= ' FROM ' . $this->table;
217
+        $sql .= ' FROM '.$this->table;
218 218
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
219
-            $sql .= ' ' . $criteria->renderWhere();
219
+            $sql .= ' '.$criteria->renderWhere();
220 220
             if ($criteria->getSort() != '') {
221
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
221
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
222 222
             }
223 223
             $limit = $criteria->getLimit();
224 224
             $start = $criteria->getStart();
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
252 252
             if ($criteria->groupby != '') {
253 253
                 $groupby = true;
254
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
254
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
255 255
             }
256 256
         }
257
-        $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table;
257
+        $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
258 258
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
259
-            $sql .= ' ' . $criteria->renderWhere();
259
+            $sql .= ' '.$criteria->renderWhere();
260 260
             if ($criteria->groupby != '') {
261 261
                 $sql .= $criteria->getGroupby();
262 262
             }
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
         if (is_array($this->keyName)) {
293 293
             $clause = array();
294 294
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
295
-                $clause[] = $this->keyName[$i] . ' = ' . $id[$i];
295
+                $clause[] = $this->keyName[$i].' = '.$id[$i];
296 296
             }
297 297
             $whereclause = implode(' AND ', $clause);
298 298
         } else {
299
-            $whereclause = $this->keyName . ' = ' . $id;
299
+            $whereclause = $this->keyName.' = '.$id;
300 300
         }
301
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
301
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
302 302
         if (false !== $force) {
303 303
             $result = $this->db->queryF($sql);
304 304
         } else {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             }
330 330
 
331 331
             if (!($obj instanceof $this->className && class_exists($this->className))) {
332
-                $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
332
+                $obj->setErrors(get_class($obj).' Differs from '.$this->className);
333 333
 
334 334
                 return false;
335 335
             }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         foreach ($obj->cleanVars as $k => $v) {
342 342
             if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
343
-                $cleanvars[$k] = (int)$v;
343
+                $cleanvars[$k] = (int) $v;
344 344
             } elseif (is_array($v)) {
345 345
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
346 346
             } else {
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
         if ($obj->isNew()) {
351 351
             if (!is_array($this->keyName)) {
352 352
                 if ($cleanvars[$this->keyName] < 1) {
353
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
353
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
354 354
                 }
355 355
             }
356
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
356
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')';
357 357
         } else {
358
-            $sql = 'UPDATE ' . $this->table . ' SET';
358
+            $sql = 'UPDATE '.$this->table.' SET';
359 359
             foreach ($cleanvars as $key => $value) {
360 360
                 if ((!is_array($this->keyName) && $key == $this->keyName)
361 361
                     || (is_array($this->keyName)
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                 if (isset($notfirst)) {
367 367
                     $sql .= ',';
368 368
                 }
369
-                $sql      .= ' ' . $key . ' = ' . $value;
369
+                $sql .= ' '.$key.' = '.$value;
370 370
                 $notfirst = true;
371 371
             }
372 372
             if (is_array($this->keyName)) {
@@ -375,12 +375,12 @@  discard block
 block discarded – undo
375 375
                     if ($i > 0) {
376 376
                         $whereclause .= ' AND ';
377 377
                     }
378
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
378
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
379 379
                 }
380 380
             } else {
381
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
381
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
382 382
             }
383
-            $sql .= ' WHERE ' . $whereclause;
383
+            $sql .= ' WHERE '.$whereclause;
384 384
         }
385 385
         if (false !== $force) {
386 386
             $result = $this->db->queryF($sql);
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
      */
410 410
     public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false)
411 411
     {
412
-        $setClause = $fieldname . ' = ';
412
+        $setClause = $fieldname.' = ';
413 413
         if (is_numeric($fieldvalue)) {
414 414
             $setClause .= $fieldvalue;
415 415
         } elseif (is_array($fieldvalue)) {
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
         } else {
418 418
             $setClause .= $this->db->quoteString($fieldvalue);
419 419
         }
420
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause;
420
+        $sql = 'UPDATE '.$this->table.' SET '.$setClause;
421 421
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
422
-            $sql .= ' ' . $criteria->renderWhere();
422
+            $sql .= ' '.$criteria->renderWhere();
423 423
         }
424 424
         if (false !== $force) {
425 425
             $result = $this->db->queryF($sql);
@@ -443,9 +443,9 @@  discard block
 block discarded – undo
443 443
      */
444 444
     public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
445 445
     {
446
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;
446
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
447 447
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
448
-            $sql .= ' ' . $criteria->renderWhere();
448
+            $sql .= ' '.$criteria->renderWhere();
449 449
         }
450 450
         if (false !== $force) {
451 451
             $result = $this->db->queryF($sql);
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
     public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false)
473 473
     {
474 474
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
475
-            $sql = 'DELETE FROM ' . $this->table;
476
-            $sql .= ' ' . $criteria->renderWhere();
475
+            $sql = 'DELETE FROM '.$this->table;
476
+            $sql .= ' '.$criteria->renderWhere();
477 477
             if (!$this->db->query($sql)) {
478 478
                 return false;
479 479
             }
@@ -607,8 +607,8 @@  discard block
 block discarded – undo
607 607
      */
608 608
     public function updateCounter($fieldname, $criteria, $op = '+')
609 609
     {
610
-        $sql    = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';
611
-        $sql    .= ' ' . $criteria->renderWhere();
610
+        $sql    = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
611
+        $sql .= ' '.$criteria->renderWhere();
612 612
         $result = $this->db->queryF($sql);
613 613
         if (!$result) {
614 614
             return false;
@@ -630,12 +630,12 @@  discard block
 block discarded – undo
630 630
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
631 631
             if ($criteria->groupby != '') {
632 632
                 $groupby = true;
633
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
633
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
634 634
             }
635 635
         }
636
-        $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;
636
+        $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
637 637
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
638
-            $sql .= ' ' . $criteria->renderWhere();
638
+            $sql .= ' '.$criteria->renderWhere();
639 639
             if ($criteria->groupby != '') {
640 640
                 $sql .= $criteria->getGroupby();
641 641
             }
@@ -671,12 +671,12 @@  discard block
 block discarded – undo
671 671
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
672 672
             if ($criteria->groupby != '') {
673 673
                 $groupby = true;
674
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
674
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
675 675
             }
676 676
         }
677
-        $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;
677
+        $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
678 678
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
679
-            $sql .= ' ' . $criteria->renderWhere();
679
+            $sql .= ' '.$criteria->renderWhere();
680 680
             if ($criteria->groupby != '') {
681 681
                 $sql .= $criteria->getGroupby();
682 682
             }
@@ -709,9 +709,9 @@  discard block
 block discarded – undo
709 709
     {
710 710
         $field = '';
711 711
 
712
-        $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;
712
+        $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
713 713
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
714
-            $sql .= ' ' . $criteria->renderWhere();
714
+            $sql .= ' '.$criteria->renderWhere();
715 715
         }
716 716
         $result = $this->db->query($sql);
717 717
         if (!$result) {
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('XOOPS root path not defined');
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.
blocks/category_events.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../include/constantes.php';
20
+require_once __DIR__.'/../include/constantes.php';
21 21
 
22 22
 /******************************************************/
23 23
 /* Ajour JJD - Evenements par categries               */
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 {
32 32
     global $xoopsUser, $extcalConfig;
33 33
 
34
-    require_once __DIR__ . '/../class/config.php';
34
+    require_once __DIR__.'/../class/config.php';
35 35
 
36 36
     // Retriving module config
37 37
     //     $extcalConfig = ExtcalConfig::getHandler();
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 
89 89
     $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view');
90 90
 
91
-    $form = _MB_EXTCAL_DISPLAY . "&nbsp;\n";
92
-    $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text">&nbsp;' . _MB_EXTCAL_EVENT . '<br>';
93
-    $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>';
91
+    $form = _MB_EXTCAL_DISPLAY."&nbsp;\n";
92
+    $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text">&nbsp;'._MB_EXTCAL_EVENT.'<br>';
93
+    $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>';
94 94
     array_shift($options);
95 95
     array_shift($options);
96
-    $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">';
96
+    $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">';
97 97
     if (array_search(0, $options) === false) {
98
-        $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>';
98
+        $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>';
99 99
     } else {
100
-        $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>';
100
+        $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>';
101 101
     }
102 102
     foreach ($cats as $cat) {
103 103
         if (array_search($cat->getVar('cat_id'), $options) === false) {
104
-            $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>';
104
+            $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>';
105 105
         } else {
106
-            $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>';
106
+            $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>';
107 107
         }
108 108
     }
109 109
     $form .= '</select>';
Please login to merge, or discard this patch.
blocks/random_events.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../include/constantes.php';
20
+require_once __DIR__.'/../include/constantes.php';
21 21
 
22 22
 /**
23 23
  * @param $options
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function bExtcalRandomShow($options)
28 28
 {
29
-    require_once __DIR__ . '/../class/config.php';
29
+    require_once __DIR__.'/../class/config.php';
30 30
 
31 31
     // Retriving module config
32 32
     $extcalConfig      = ExtcalConfig::getHandler();
@@ -64,22 +64,22 @@  discard block
 block discarded – undo
64 64
 
65 65
     $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view');
66 66
 
67
-    $form = _MB_EXTCAL_DISPLAY . "&nbsp;\n";
68
-    $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text">&nbsp;' . _MB_EXTCAL_EVENT . '<br>';
69
-    $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>';
67
+    $form = _MB_EXTCAL_DISPLAY."&nbsp;\n";
68
+    $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text">&nbsp;'._MB_EXTCAL_EVENT.'<br>';
69
+    $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>';
70 70
     array_shift($options);
71 71
     array_shift($options);
72
-    $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">';
72
+    $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">';
73 73
     if (array_search(0, $options) === false) {
74
-        $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>';
74
+        $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>';
75 75
     } else {
76
-        $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>';
76
+        $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>';
77 77
     }
78 78
     foreach ($cats as $cat) {
79 79
         if (array_search($cat->getVar('cat_id'), $options) === false) {
80
-            $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>';
80
+            $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>';
81 81
         } else {
82
-            $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>';
82
+            $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>';
83 83
         }
84 84
     }
85 85
     $form .= '</select>';
Please login to merge, or discard this patch.