Completed
Branch master (c921ab)
by Michael
109:50 queued 98:29
created
include/oninstall.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 function xoops_module_pre_install_extcal(XoopsModule $module)
26 26
 {
27 27
     $moduleDirName = basename(dirname(__DIR__));
28
-    $className     = ucfirst($moduleDirName) . 'Utilities';
28
+    $className     = ucfirst($moduleDirName).'Utilities';
29 29
     if (!class_exists($className)) {
30 30
         xoops_load('utilities', $moduleDirName);
31 31
     }
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
         return false;
40 40
     }
41 41
 
42
-    $mod_tables =& $module->getInfo('tables');
42
+    $mod_tables = & $module->getInfo('tables');
43 43
     foreach ($mod_tables as $table) {
44
-        $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
44
+        $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';');
45 45
     }
46 46
 
47 47
     return true;
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
      */
71 71
 
72 72
     // Access right
73
-    $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId);
74
-    $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId);
75
-    $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
73
+    $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId);
74
+    $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId);
75
+    $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
76 76
 
77 77
     // Can submit
78
-    $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId);
78
+    $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId);
79 79
 
80 80
     // Auto approve
81
-    $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId);
81
+    $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId);
82 82
 
83 83
     //    $moduleDirName = $xoopsModule->getVar('dirname');
84
-    $configurator = include $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php');
84
+    $configurator = include $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php');
85 85
 
86
-    $classUtilities = ucfirst($moduleDirName) . 'Utilities';
86
+    $classUtilities = ucfirst($moduleDirName).'Utilities';
87 87
     if (!class_exists($classUtilities)) {
88 88
         xoops_load('utilities', $moduleDirName);
89 89
     }
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         }
96 96
     }
97 97
     if (count($configurator['copyFiles']) > 0) {
98
-        $file = __DIR__ . '/../assets/images/blank.png';
98
+        $file = __DIR__.'/../assets/images/blank.png';
99 99
         foreach (array_keys($configurator['copyFiles']) as $i) {
100
-            $dest = $configurator['copyFiles'][$i] . '/blank.png';
100
+            $dest = $configurator['copyFiles'][$i].'/blank.png';
101 101
             $classUtilities::copyFile($file, $dest);
102 102
         }
103 103
     }
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined');
4
-include_once __DIR__ . '/include/constantes.php';
5
-include_once __DIR__ . '/include/agenda_fnc.php';
6
-include_once __DIR__ . '/class/config.php';
4
+include_once __DIR__.'/include/constantes.php';
5
+include_once __DIR__.'/include/agenda_fnc.php';
6
+include_once __DIR__.'/class/config.php';
7 7
 //$loc_de = setlocale (LC_ALL, 'french');
8 8
 
9 9
 //echo "local :" .  setlocale(LC_TIME, $xoopsConfig['language'])."</ br>";
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 
79 79
 // Tables created by sql file (without prefix!)
80 80
 $modversion['tables'] = array(
81
-    $moduleDirName . '_' . 'cat',
82
-    $moduleDirName . '_' . 'event',
83
-    $moduleDirName . '_' . 'eventmember',
84
-    $moduleDirName . '_' . 'eventnotmember',
85
-    $moduleDirName . '_' . 'file',
86
-    $moduleDirName . '_' . 'etablissement'
81
+    $moduleDirName.'_'.'cat',
82
+    $moduleDirName.'_'.'event',
83
+    $moduleDirName.'_'.'eventmember',
84
+    $moduleDirName.'_'.'eventnotmember',
85
+    $moduleDirName.'_'.'file',
86
+    $moduleDirName.'_'.'etablissement'
87 87
 );
88 88
 
89 89
 // SQL
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 $modversion['config'][$i]['default']     = 5;
497 497
 
498 498
 ++$i;
499
-$modversion['config'][$i]['name']        = 'break' . $i;
499
+$modversion['config'][$i]['name']        = 'break'.$i;
500 500
 $modversion['config'][$i]['title']       = '_MI_EXTCAL_SHOW_OTHEROPTIONS';
501 501
 $modversion['config'][$i]['description'] = '';
502 502
 $modversion['config'][$i]['formtype']    = 'line_break';
Please login to merge, or discard this patch.
blocks/minical.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
     // Flag current day
145 145
     $selectedDays = array(
146 146
         new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))),
147
-                         date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
147
+                            date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
148 148
     );
149 149
 
150 150
     // Build calendar object
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 global $extcalConfig, $xoopsUser;
4
-include_once __DIR__ . '/../include/constantes.php';
5
-include_once __DIR__ . '/../class/utilities.php';
6
-include_once __DIR__ . '/../class/tableForm.php';
4
+include_once __DIR__.'/../include/constantes.php';
5
+include_once __DIR__.'/../class/utilities.php';
6
+include_once __DIR__.'/../class/tableForm.php';
7 7
 //---------------------------------------------------------------------------
8 8
 /**
9 9
  * @param $options
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 
17 17
     extcal_getDefautminicalOption($options);
18 18
 
19
-    include_once __DIR__ . '/../class/config.php';
19
+    include_once __DIR__.'/../class/config.php';
20 20
 
21
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php';
22
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php';
23
-    require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php';
21
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php';
22
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php';
23
+    require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php';
24 24
     //     require_once CALENDAR_ROOT . 'Month/Weeks.php';
25 25
     //     require_once CALENDAR_ROOT . 'Day.php';
26 26
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'cat'          => $tCatSelected,
107 107
             'externalKeys' => 'cat_id',
108 108
         );
109
-        $events   = $eventHandler->getEventsOnPeriode($criteres);
109
+        $events = $eventHandler->getEventsOnPeriode($criteres);
110 110
     } else {
111 111
         $events = array();
112 112
     }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 'number'     => $dayCalObj->thisDay(),
169 169
                 'isSelected' => $dayCalObj->isSelected(),
170 170
             );
171
-            $day                                = $dayCalObj->thisDay();
171
+            $day = $dayCalObj->thisDay();
172 172
             if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) {
173 173
                 $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true;
174 174
                 $tableRows[$rowId]['week'][$cellId]['color']      = $eventsArray[$day]['color'];
@@ -198,15 +198,15 @@  discard block
 block discarded – undo
198 198
     // Making navig data
199 199
     $navig = array(
200 200
         'page' => $extcalConfig['start_page'],
201
-        'uri'  => 'year=' . $monthCalObj->thisYear() . '&amp;month=' . $monthCalObj->thisMonth(),
201
+        'uri'  => 'year='.$monthCalObj->thisYear().'&amp;month='.$monthCalObj->thisMonth(),
202 202
         'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()),
203 203
     );
204 204
 
205 205
     $horloge             = array();
206 206
     $horloge['display']  = (trim($options[11]) != '');
207
-    $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11];
208
-    $horloge['width']    = $options[12] . 'px';
209
-    $horloge['height']   = $options[13] . 'px';
207
+    $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11];
208
+    $horloge['width']    = $options[12].'px';
209
+    $horloge['height']   = $options[13].'px';
210 210
 
211 211
     $ret = array(
212 212
         'imageParam'   => $imageParam,
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
  */
233 233
 function bExtcalMinicalEdit($options)
234 234
 {
235
-    include_once __DIR__ . '/../class/form/spin/formspin.php';
235
+    include_once __DIR__.'/../class/form/spin/formspin.php';
236 236
     global $xoopsUser;
237 237
 
238 238
     //  $t = print_r(get_defined_vars(),true);
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     $imageCatHandler = xoops_getHandler('imagecategory');
254 254
 
255 255
     //=====================================================================
256
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head');
256
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head');
257 257
 
258 258
     $k           = 0;
259 259
     $xfValue[$k] = new XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     $xfValue[$k] = new ExtcalFormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = '');
295 295
     $form->addElement($xfValue[$k], false);
296 296
     //=====================================================================
297
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head');
297
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head');
298 298
 
299 299
     $t = array(
300 300
         -1 => _MB_EXTCAL_PREVIEW,
@@ -333,9 +333,9 @@  discard block
 block discarded – undo
333 333
     $form->addElement($xfValue[$k], false);
334 334
 
335 335
     //=====================================================================
336
-    $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head');
336
+    $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head');
337 337
     //---------------------------------------------------------------------
338
-    $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES);
338
+    $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES);
339 339
     $t = array_merge(array(' ' => _NONE), $t);
340 340
 
341 341
     $k           = 11;
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
         // $src   = $doc->createElement('src');
419 419
         $src   = clone $tempSrc;
420 420
         $src   = $photo->appendChild($src);
421
-        $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name'));
421
+        $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name'));
422 422
         $src->appendChild($value);
423 423
     }
424 424
 
425 425
     // get completed xml document
426
-    $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml');
426
+    $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml');
427 427
 }
428 428
 
429 429
 /**************************************************************************/
Please login to merge, or discard this patch.
versions/extcal_2_21.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
         // Create who's not going table to fix bug. If the table exist, the query will faile
43 43
         $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_eventnotmember')
44
-               . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
44
+                . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
45 45
         $xoopsDB->query($sql);
46 46
     }
47 47
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,17 +30,17 @@
 block discarded – undo
30 30
         global $xoopsDB;
31 31
 
32 32
         // Create eXtcal upload directory if don't exist
33
-        $dir = XOOPS_ROOT_PATH . '/uploads/extcal';
33
+        $dir = XOOPS_ROOT_PATH.'/uploads/extcal';
34 34
         if (!is_dir($dir)) {
35 35
             mkdir($dir);
36 36
 
37 37
             // Copy index.html files on uploads folders
38
-            $indexFile = __DIR__ . '/index.html';
39
-            copy($indexFile, XOOPS_ROOT_PATH . '/uploads/extcal/index.html');
38
+            $indexFile = __DIR__.'/index.html';
39
+            copy($indexFile, XOOPS_ROOT_PATH.'/uploads/extcal/index.html');
40 40
         }
41 41
 
42 42
         // Create who's not going table to fix bug. If the table exist, the query will faile
43
-        $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_eventnotmember')
43
+        $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_eventnotmember')
44 44
                . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
45 45
         $xoopsDB->query($sql);
46 46
     }
Please login to merge, or discard this patch.
versions/extcal_2_15.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
         $xoopsDB->query($sql);
49 49
 
50 50
         $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_event')
51
-               . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
51
+                . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
52 52
         $xoopsDB->query($sql);
53 53
 
54 54
         $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_file')
55
-               . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
55
+                . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
56 56
         $xoopsDB->query($sql);
57 57
     }
58 58
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,26 +32,26 @@
 block discarded – undo
32 32
         //$xoopsDB = Database::getInstance();
33 33
         $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
34 34
 
35
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
35
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
36 36
         $xoopsDB->query($sql);
37 37
 
38
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;';
38
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;';
39 39
         $xoopsDB->query($sql);
40 40
 
41
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ';
41
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ';
42 42
         $xoopsDB->query($sql);
43 43
 
44
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;';
44
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;';
45 45
         $xoopsDB->query($sql);
46 46
 
47
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;';
47
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;';
48 48
         $xoopsDB->query($sql);
49 49
 
50
-        $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_event')
50
+        $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_event')
51 51
                . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
52 52
         $xoopsDB->query($sql);
53 53
 
54
-        $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_file')
54
+        $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_file')
55 55
                . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
56 56
         $xoopsDB->query($sql);
57 57
     }
Please login to merge, or discard this patch.
class/utilities.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
             $cat_color = $catList->getVar('cat_color');
151 151
             $checked   = in_array($cat_id, $cat) ? 'checked' : '';
152 152
             $cat       = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
153
-                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>';
153
+                            . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>';
154 154
 
155 155
             $t[] = $cat;
156 156
         }
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 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
-include_once XOOPS_ROOT_PATH . '/class/uploader.php';
18
+include_once XOOPS_ROOT_PATH.'/class/uploader.php';
19 19
 
20 20
 /**
21 21
  * Class ExtcalUtilities.
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
     public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2)
49 49
     {
50 50
         ///////////////////////////////////////////////////////////////////////////////
51
-        $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/';
52
-        $uploadurl_event = XOOPS_URL . '/uploads/extcal/';
51
+        $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/';
52
+        $uploadurl_event = XOOPS_URL.'/uploads/extcal/';
53 53
         //$picture = '';
54 54
         for ($j = 1; $j < 3; ++$j) {
55
-            $delimg = @$REQUEST['delimg_' . $j . ''];
56
-            $delimg = isset($delimg) ? (int)$delimg : 0;
55
+            $delimg = @$REQUEST['delimg_'.$j.''];
56
+            $delimg = isset($delimg) ? (int) $delimg : 0;
57 57
             if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) {
58 58
                 $upload = new XoopsMediaUploader($uploaddir_event, array(
59 59
                     'image/gif',
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
                             $event_picture2 = $upload->getSavedFileName();
77 77
                         }
78 78
                     }
79
-                } elseif (!empty($REQUEST['file' . $j])) {
79
+                } elseif (!empty($REQUEST['file'.$j])) {
80 80
                     if ($j == 1) {
81
-                        $event_picture1 = $REQUEST['file' . $j];
81
+                        $event_picture1 = $REQUEST['file'.$j];
82 82
                     } elseif ($j == 2) {
83
-                        $event_picture2 = $REQUEST['file' . $j];
83
+                        $event_picture2 = $REQUEST['file'.$j];
84 84
                     }
85 85
                 }
86 86
             } else {
87
-                $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j];
87
+                $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j];
88 88
                 if ($j == 1) {
89 89
                     $event_picture1 = '';
90 90
                 } elseif ($j == 2) {
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
             $name      = $catList->getVar('cat_name');
150 150
             $cat_color = $catList->getVar('cat_color');
151 151
             $checked   = in_array($cat_id, $cat) ? 'checked' : '';
152
-            $cat       = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
153
-                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>';
152
+            $cat       = ''."<div style='float:left; margin-left:5px;'>"."<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>"
153
+                         . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"." {$name}".'</div>';
154 154
 
155 155
             $t[] = $cat;
156 156
         }
@@ -176,17 +176,17 @@  discard block
 block discarded – undo
176 176
             $select->addOption('', '');
177 177
         }
178 178
 
179
-        $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
180
-        $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
179
+        $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC);
180
+        $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC);
181 181
 
182
-        $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
183
-        $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
182
+        $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC);
183
+        $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC);
184 184
 
185
-        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
186
-        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
185
+        $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC);
186
+        $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC);
187 187
 
188
-        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC);
189
-        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC);
188
+        $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC);
189
+        $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC);
190 190
 
191 191
         return $select;
192 192
     }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     public static function echoDateArray($period)
301 301
     {
302 302
         foreach ($period as $dt) {
303
-            echo $dt->format("l Y-m-d H:i:s\n") . '<br>';
303
+            echo $dt->format("l Y-m-d H:i:s\n").'<br>';
304 304
         }
305 305
     }
306 306
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
 
318 318
         $txt = print_r($t, true);
319
-        echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>";
319
+        echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>";
320 320
     }
321 321
 
322 322
     /*****************************************************************/
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         if ($msg != '') {
330 330
             echo "<hr>{$msg}<hr>";
331 331
         }
332
-        echo $line . '<br>';
332
+        echo $line.'<br>';
333 333
     }
334 334
 
335 335
     /*****************************************************************/
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             echo "<hr>{$msg}<hr>";
357 357
         }
358 358
 
359
-        echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>';
359
+        echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>';
360 360
     }
361 361
 
362 362
     /*****************************************************************/
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
      */
471 471
     public static function getLighterColor($color, $plancher, $plafond)
472 472
     {
473
-        include_once __DIR__ . '/colorTools.php';
473
+        include_once __DIR__.'/colorTools.php';
474 474
 
475 475
         //$ct = new ColorTools();
476 476
         //return $ct->eclaircir($color,$plancher,$plafond);
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                 if (!mkdir($folder) && !is_dir($folder)) {
493 493
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
494 494
                 } else {
495
-                    file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
495
+                    file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
496 496
                 }
497 497
             }
498 498
         } catch (Exception $e) {
@@ -530,10 +530,10 @@  discard block
 block discarded – undo
530 530
         //    @mkdir($dst);
531 531
         while (false !== ($file = readdir($dir))) {
532 532
             if (($file !== '.') && ($file !== '..')) {
533
-                if (is_dir($src . '/' . $file)) {
534
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
533
+                if (is_dir($src.'/'.$file)) {
534
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
535 535
                 } else {
536
-                    copy($src . '/' . $file, $dst . '/' . $file);
536
+                    copy($src.'/'.$file, $dst.'/'.$file);
537 537
                 }
538 538
             }
539 539
         }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
         //check for minimum XOOPS version
555 555
         $currentVer  = substr(XOOPS_VERSION, 6); // get the numeric part of string
556 556
         $currArray   = explode('.', $currentVer);
557
-        $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
557
+        $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
558 558
         $reqArray    = explode('.', $requiredVer);
559 559
         $success     = true;
560 560
         foreach ($reqArray as $k => $v) {
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
                     break;
569 569
                 }
570 570
             } else {
571
-                if ((int)$v > 0) { // handles things like x.x.x.0_RC2
571
+                if ((int) $v > 0) { // handles things like x.x.x.0_RC2
572 572
                     $success = false;
573 573
                     break;
574 574
                 }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         // check for minimum PHP version
597 597
         $success = true;
598 598
         $verNum  = phpversion();
599
-        $reqVer  =& $module->getInfo('min_php');
599
+        $reqVer  = & $module->getInfo('min_php');
600 600
         if (false !== $reqVer && '' !== $reqVer) {
601 601
             if (version_compare($verNum, $reqVer, '<')) {
602 602
                 $module->setErrors(sprintf(_AM_TAG_ERROR_BAD_PHP, $reqVer, $verNum));
Please login to merge, or discard this patch.
class/event.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@  discard block
 block discarded – undo
2 2
 
3 3
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
4 4
 
5
-include_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
6
-include_once __DIR__ . '/perm.php';
7
-include_once __DIR__ . '/time.php';
8
-include_once __DIR__ . '/config.php';
9
-include_once __DIR__ . '/extDateTime.php';
10
-include_once __DIR__ . '/utilities.php';
11
-include_once __DIR__ . '/../include/constantes.php';
5
+include_once __DIR__.'/ExtcalPersistableObjectHandler.php';
6
+include_once __DIR__.'/perm.php';
7
+include_once __DIR__.'/time.php';
8
+include_once __DIR__.'/config.php';
9
+include_once __DIR__.'/extDateTime.php';
10
+include_once __DIR__.'/utilities.php';
11
+include_once __DIR__.'/../include/constantes.php';
12 12
 
13 13
 /**
14 14
  * Class ExtcalEvent.
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false);
50 50
         $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false);
51 51
 
52
-        $this->externalKey['cat_id']          = array(
52
+        $this->externalKey['cat_id'] = array(
53 53
             'className'      => 'cat',
54 54
             'getMethodeName' => 'getCat',
55 55
             'keyName'        => 'cat',
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         $eventArray = array();
383 383
 
384 384
         while (list($k, $v) = each($events)) {
385
-            $ordre[] = (int)$v['event_start'];
385
+            $ordre[] = (int) $v['event_start'];
386 386
             $this->formatEventDate($v, $extcalConfig['event_date_week']);
387 387
             //$v['cat']['cat_light_color'] = $v['cat']['cat_color'];
388 388
             $v['cat']['cat_light_color'] = ExtcalUtilities::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX);
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 
584 584
         reset($period);
585 585
         foreach ($period as $dt) {
586
-            echo $dt->format("l d-m-Y H:i:s\n") . '<br>';
586
+            echo $dt->format("l d-m-Y H:i:s\n").'<br>';
587 587
         }
588 588
     }
589 589
 
@@ -909,10 +909,10 @@  discard block
 block discarded – undo
909 909
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
910 910
         $count                = count($authorizedAccessCats);
911 911
         if ($count > 0) {
912
-            $in = '(' . $authorizedAccessCats[0];
912
+            $in = '('.$authorizedAccessCats[0];
913 913
             array_shift($authorizedAccessCats);
914 914
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
915
-                $in .= ',' . $authorizedAccessCat;
915
+                $in .= ','.$authorizedAccessCat;
916 916
             }
917 917
             $in .= ')';
918 918
             $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -932,10 +932,10 @@  discard block
 block discarded – undo
932 932
         }
933 933
         if (is_array($cats)) {
934 934
             if (array_search(0, $cats) === false) {
935
-                $in = '(' . current($cats);
935
+                $in = '('.current($cats);
936 936
                 array_shift($cats);
937 937
                 foreach ($cats as $cat) {
938
-                    $in .= ',' . $cat;
938
+                    $in .= ','.$cat;
939 939
                 }
940 940
                 $in .= ')';
941 941
                 $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
         $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
959 959
 
960 960
         /***************************************************/
961
-        include_once __DIR__ . '/etablissement.php';
961
+        include_once __DIR__.'/etablissement.php';
962 962
         if ($siteSide === 'admin') {
963 963
             $action = 'event.php?op=enreg';
964 964
             $cats   = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all');
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
             if ($mode === 'clone') {
977 977
                 $data['event_id'] = 0;
978 978
                 $event->setVar('event_id', 0);
979
-                $newTitle = $event->getVar('event_title') . ' (' . _AM_EXTCAL_CLONE_OF . $data['event_id'] . ')';
979
+                $newTitle = $event->getVar('event_title').' ('._AM_EXTCAL_CLONE_OF.$data['event_id'].')';
980 980
                 $event->setVar('event_title', $newTitle);
981 981
             }
982 982
 
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
         $form->addElement($catSelect, true);
1161 1161
         //-----------------------------------------------------------
1162 1162
 
1163
-        $file_path = __DIR__ . '/../assets/css/images';
1163
+        $file_path = __DIR__.'/../assets/css/images';
1164 1164
         $tf        = XoopsLists::getImgListAsArray($file_path);
1165 1165
         array_unshift($tf, _MD_EXTCAL_NONE);
1166 1166
         $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, '');
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
         if (count($files) > 0) {
1266 1266
             $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep');
1267 1267
             foreach ($files as $file) {
1268
-                $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size'];
1268
+                $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size'];
1269 1269
                 $eventFiles->addOption($file['file_id'], $name);
1270 1270
             }
1271 1271
             $fileElmtTray->addElement($eventFiles);
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
         //Picture1
1282 1282
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), '');
1283 1283
         if (!empty($event_picture1)) {
1284
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''/><br><br>"));
1284
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''/><br><br>"));
1285 1285
             $check_del_img = new XoopsFormCheckBox('', 'delimg_1');
1286 1286
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1287 1287
             $file_tray->addElement($check_del_img);
@@ -1292,8 +1292,8 @@  discard block
 block discarded – undo
1292 1292
         }
1293 1293
         $file_img->setExtra("size ='40'");
1294 1294
         $file_tray->addElement($file_img);
1295
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1296
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1295
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1296
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1297 1297
         $file_tray->addElement($file_label);
1298 1298
         $form->addElement($file_tray);
1299 1299
         $form->addElement(new XoopsFormHidden('file1', $event_picture1));
@@ -1301,7 +1301,7 @@  discard block
 block discarded – undo
1301 1301
         //Picture2
1302 1302
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
1303 1303
         if (!empty($event_picture2)) {
1304
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''/><br><br>"));
1304
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''/><br><br>"));
1305 1305
             $check_del_img = new XoopsFormCheckBox('', 'delimg_2');
1306 1306
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1307 1307
             $file_tray->addElement($check_del_img);
@@ -1312,8 +1312,8 @@  discard block
 block discarded – undo
1312 1312
         }
1313 1313
         $file_img->setExtra("size ='40'");
1314 1314
         $file_tray->addElement($file_img);
1315
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1316
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1315
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1316
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1317 1317
         $file_tray->addElement($file_label);
1318 1318
         $form->addElement($file_tray);
1319 1319
         $form->addElement(new XoopsFormHidden('file2', $event_picture2));
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
                 $recurRules = 'weekly|';
1381 1381
                 $recurRules .= $parm['rrule_weekly_interval'];
1382 1382
                 foreach ($parm['rrule_weekly_bydays'] as $day) {
1383
-                    $recurRules .= '|' . $day;
1383
+                    $recurRules .= '|'.$day;
1384 1384
                 }
1385 1385
 
1386 1386
                 break;
@@ -1390,11 +1390,11 @@  discard block
 block discarded – undo
1390 1390
                     $parm['rrule_monthly_interval'] = 0;
1391 1391
                 }
1392 1392
                 $recurRules = 'monthly|';
1393
-                $recurRules .= $parm['rrule_monthly_interval'] . '|';
1393
+                $recurRules .= $parm['rrule_monthly_interval'].'|';
1394 1394
                 if ($parm['rrule_monthly_byday'] != '') {
1395 1395
                     $recurRules .= $parm['rrule_monthly_byday'];
1396 1396
                 } else {
1397
-                    $recurRules .= 'MD' . $parm['rrule_bymonthday'];
1397
+                    $recurRules .= 'MD'.$parm['rrule_bymonthday'];
1398 1398
                 }
1399 1399
 
1400 1400
                 break;
@@ -1428,9 +1428,9 @@  discard block
 block discarded – undo
1428 1428
 
1429 1429
                 $recurRules = 'yearly|';
1430 1430
                 $recurRules .= $parm['rrule_yearly_interval'];
1431
-                $recurRules .= '|' . $parm['rrule_yearly_byday'];
1431
+                $recurRules .= '|'.$parm['rrule_yearly_byday'];
1432 1432
                 foreach ($parm['rrule_yearly_bymonths'] as $month) {
1433
-                    $recurRules .= '|' . $month;
1433
+                    $recurRules .= '|'.$month;
1434 1434
                 }
1435 1435
 
1436 1436
                 break;
@@ -2363,10 +2363,10 @@  discard block
 block discarded – undo
2363 2363
         global $xoopsDB;
2364 2364
 
2365 2365
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2366
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2367
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2366
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2367
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2368 2368
 
2369
-        $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}";
2369
+        $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}";
2370 2370
         //---------------------------------------------------
2371 2371
         $tw   = array();
2372 2372
         $tw[] = 'te.cat_id = tc.cat_id';
@@ -2375,7 +2375,7 @@  discard block
 block discarded – undo
2375 2375
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2376 2376
         $inCat                = 'te.cat_id IN (0)';
2377 2377
         if (count($authorizedAccessCats) > 0) {
2378
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2378
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2379 2379
         }
2380 2380
         //echo $tw[count($tw)-1];
2381 2381
 
@@ -2411,12 +2411,12 @@  discard block
 block discarded – undo
2411 2411
                 'te.event_address',
2412 2412
                 'tc.cat_name',
2413 2413
             );
2414
-            $t       = array();
2414
+            $t = array();
2415 2415
             for ($i = 0, $count = count($queryarray); $i < $count; ++$i) {
2416 2416
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2417 2417
             }
2418 2418
 
2419
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2419
+            $flt = '('.implode(" {$andor} ", $t1).')';
2420 2420
 
2421 2421
             $t = array();
2422 2422
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2425,10 +2425,10 @@  discard block
 block discarded – undo
2425 2425
 
2426 2426
             $filtre = implode(' OR ', $t);
2427 2427
             $filtre = str_replace('#', '%', $filtre);
2428
-            $tw[]   = '(' . $filtre . ')';
2428
+            $tw[]   = '('.$filtre.')';
2429 2429
         }
2430 2430
 
2431
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2431
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2432 2432
         //------------------------------------------------------------
2433 2433
         if (count($orderBy) > 0) {
2434 2434
             $t = array();
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
                 }
2439 2439
             }
2440 2440
             if (count($t) > 0) {
2441
-                $sql .= ' ORDER BY ' . implode(',', $t);
2441
+                $sql .= ' ORDER BY '.implode(',', $t);
2442 2442
             }
2443 2443
         }
2444 2444
 
@@ -2471,7 +2471,7 @@  discard block
 block discarded – undo
2471 2471
         $i = 0;
2472 2472
         while ($myrow = $xoopsDB->fetchArray($result)) {
2473 2473
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2474
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2474
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2475 2475
             $ret[$i]['title'] = $myrow['event_title'];
2476 2476
             $ret[$i]['time']  = $myrow['event_submitdate'];
2477 2477
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2511,23 +2511,23 @@  discard block
 block discarded – undo
2511 2511
         //        }
2512 2512
         $tEvent = $xoopsDB->prefix('extcal_event');
2513 2513
         $tCat   = $xoopsDB->prefix('extcal_cat');
2514
-        $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'";
2514
+        $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'";
2515 2515
 
2516 2516
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2517 2517
         $count                = count($authorizedAccessCats);
2518 2518
         if ($count > 0) {
2519
-            $in = '(' . $authorizedAccessCats[0];
2519
+            $in = '('.$authorizedAccessCats[0];
2520 2520
             array_shift($authorizedAccessCats);
2521 2521
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2522
-                $in .= ',' . $authorizedAccessCat;
2522
+                $in .= ','.$authorizedAccessCat;
2523 2523
             }
2524 2524
             $in .= ')';
2525 2525
         } else {
2526 2526
             $in = '(0)';
2527 2527
         }
2528
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2528
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2529 2529
         if ($userId != 0) {
2530
-            $sql .= " AND event_submitter = '" . $userId . "'";
2530
+            $sql .= " AND event_submitter = '".$userId."'";
2531 2531
         }
2532 2532
 
2533 2533
         //echoArray($queryarray,false);
@@ -2547,7 +2547,7 @@  discard block
 block discarded – undo
2547 2547
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2548 2548
             }
2549 2549
 
2550
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2550
+            $flt = '('.implode(" {$andor} ", $t1).')';
2551 2551
 
2552 2552
             $t = array();
2553 2553
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2560,7 +2560,7 @@  discard block
 block discarded – undo
2560 2560
         }
2561 2561
 
2562 2562
         if ($criteresPlus != '') {
2563
-            $sql .= ' AND ' . $criteresPlus;
2563
+            $sql .= ' AND '.$criteresPlus;
2564 2564
         }
2565 2565
         $sql .= ' ORDER BY event_id DESC';
2566 2566
 
@@ -2570,7 +2570,7 @@  discard block
 block discarded – undo
2570 2570
         if ($xoopsSearch) {
2571 2571
             while ($myrow = $xoopsDB->fetchArray($result)) {
2572 2572
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2573
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2573
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2574 2574
                 $ret[$i]['title'] = $myrow['event_title'];
2575 2575
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2576 2576
                 $ret[$i]['uid']   = $myrow['event_submitter'];
Please login to merge, or discard this patch.
class/pcltrace.lib.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         if (!isset($g_pcl_trace_name)) {
171 171
             $g_pcl_trace_name = $p_name;
172 172
         } else {
173
-            $g_pcl_trace_name .= ',' . $p_name;
173
+            $g_pcl_trace_name .= ','.$p_name;
174 174
         }
175 175
 
176 176
         // ----- Update the function entry
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
             echo '<tr>';
399 399
             echo '<td><table width=100% border=0 cellspacing=0 cellpadding=0><tr>';
400 400
             $n = ($g_pcl_trace_entries[$i]['index'] + 1) * 10;
401
-            echo '<td width=' . $n . '><table width=100% border=0 cellspacing=0 cellpadding=0><tr>';
401
+            echo '<td width='.$n.'><table width=100% border=0 cellspacing=0 cellpadding=0><tr>';
402 402
 
403 403
             for ($j = 0; $j <= $g_pcl_trace_entries[$i]['index']; ++$j) {
404 404
                 if ($j == $g_pcl_trace_entries[$i]['index']) {
@@ -415,25 +415,25 @@  discard block
 block discarded – undo
415 415
             echo '<td width=2></td>';
416 416
             switch ($g_pcl_trace_entries[$i]['type']) {
417 417
                 case 1:
418
-                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '(' . $g_pcl_trace_entries[$i]['param'] . ')</span></td>';
418
+                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'('.$g_pcl_trace_entries[$i]['param'].')</span></td>';
419 419
                     break;
420 420
                 case 2:
421
-                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '()=' . $g_pcl_trace_entries[$i]['param'] . '</span></td>';
421
+                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'()='.$g_pcl_trace_entries[$i]['param'].'</span></td>';
422 422
                     break;
423 423
                 case 3:
424 424
                 case 4:
425 425
                     echo '<td><table width=100% border=0 cellspacing=0 cellpadding=0><td width=20></td><td>';
426
-                    echo "<span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['message'] . '</span>';
426
+                    echo "<span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['message'].'</span>';
427 427
                     echo '</td></table></td>';
428 428
                     break;
429 429
                 default:
430
-                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>" . $g_pcl_trace_entries[$i]['name'] . '(' . $g_pcl_trace_entries[$i]['param'] . ')</span></td>';
430
+                    echo "<td><span style='font-size: x-small; font-family: $v_font; '>".$g_pcl_trace_entries[$i]['name'].'('.$g_pcl_trace_entries[$i]['param'].')</span></td>';
431 431
             }
432 432
             echo '</tr></table></td>';
433 433
             echo '<td width=5></td>';
434
-            echo "<td><font size=1 face=$v_font>" . basename($g_pcl_trace_entries[$i]['file']) . '</font></td>';
434
+            echo "<td><font size=1 face=$v_font>".basename($g_pcl_trace_entries[$i]['file']).'</font></td>';
435 435
             echo '<td width=5></td>';
436
-            echo "<td><font size=1 face=$v_font>" . $g_pcl_trace_entries[$i]['line'] . '</font></td>';
436
+            echo "<td><font size=1 face=$v_font>".$g_pcl_trace_entries[$i]['line'].'</font></td>';
437 437
             echo '</tr>';
438 438
         }
439 439
 
@@ -477,12 +477,12 @@  discard block
 block discarded – undo
477 477
                 echo '---';
478 478
             }
479 479
             if ($p_entry['type'] == 1) {
480
-                echo '<b>' . $p_entry['name'] . '</b>(' . $p_entry['param'] . ') : ' . $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>';
480
+                echo '<b>'.$p_entry['name'].'</b>('.$p_entry['param'].') : '.$p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>';
481 481
             } else {
482 482
                 if ($p_entry[type] == 2) {
483
-                    echo '<b>' . $p_entry['name'] . '</b>()=' . $p_entry['param'] . ' : ' . $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>';
483
+                    echo '<b>'.$p_entry['name'].'</b>()='.$p_entry['param'].' : '.$p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>';
484 484
                 } else {
485
-                    echo $p_entry['message'] . ' [' . $p_entry['file'] . ', ' . $p_entry['line'] . ']<br>';
485
+                    echo $p_entry['message'].' ['.$p_entry['file'].', '.$p_entry['line'].']<br>';
486 486
                 }
487 487
             }
488 488
         }
Please login to merge, or discard this patch.
class/ExtcalPersistableObjectHandler.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
         if (is_array($this->keyName)) {
84 84
             $criteria = new CriteriaCompo();
85 85
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
86
-                $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i]));
86
+                $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i]));
87 87
             }
88 88
         } else {
89
-            $criteria = new Criteria($this->keyName, (int)$id);
89
+            $criteria = new Criteria($this->keyName, (int) $id);
90 90
         }
91 91
         $criteria->setLimit(1);
92 92
         $objectArray = &$this->getObjects($criteria, false, true);
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $ret   = array();
112 112
         $limit = $start = 0;
113
-        $sql   = 'SELECT * FROM ' . $this->table;
113
+        $sql   = 'SELECT * FROM '.$this->table;
114 114
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
115
-            $sql .= ' ' . $criteria->renderWhere();
115
+            $sql .= ' '.$criteria->renderWhere();
116 116
             if ($criteria->getSort() != '') {
117
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
117
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
118 118
             }
119 119
             $limit = $criteria->getLimit();
120 120
             $start = $criteria->getStart();
@@ -193,15 +193,15 @@  discard block
 block discarded – undo
193 193
             $criteria->setSort($this->identifierName);
194 194
         }
195 195
 
196
-        $sql = 'SELECT ' . $this->keyName;
196
+        $sql = 'SELECT '.$this->keyName;
197 197
         if (!empty($this->identifierName)) {
198
-            $sql .= ', ' . $this->identifierName;
198
+            $sql .= ', '.$this->identifierName;
199 199
         }
200
-        $sql .= ' FROM ' . $this->table;
200
+        $sql .= ' FROM '.$this->table;
201 201
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
202
-            $sql .= ' ' . $criteria->renderWhere();
202
+            $sql .= ' '.$criteria->renderWhere();
203 203
             if ($criteria->getSort() != '') {
204
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
204
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
205 205
             }
206 206
             $limit = $criteria->getLimit();
207 207
             $start = $criteria->getStart();
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
235 235
             if ($criteria->groupby != '') {
236 236
                 $groupby = true;
237
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
237
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
238 238
             }
239 239
         }
240
-        $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table;
240
+        $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
241 241
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
242
-            $sql .= ' ' . $criteria->renderWhere();
242
+            $sql .= ' '.$criteria->renderWhere();
243 243
             if ($criteria->groupby != '') {
244 244
                 $sql .= $criteria->getGroupby();
245 245
             }
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
         if (is_array($this->keyName)) {
276 276
             $clause = array();
277 277
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
278
-                $clause[] = $this->keyName[$i] . ' = ' . $id[$i];
278
+                $clause[] = $this->keyName[$i].' = '.$id[$i];
279 279
             }
280 280
             $whereclause = implode(' AND ', $clause);
281 281
         } else {
282
-            $whereclause = $this->keyName . ' = ' . $id;
282
+            $whereclause = $this->keyName.' = '.$id;
283 283
         }
284
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
284
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
285 285
         if (false !== $force) {
286 286
             $result = $this->db->queryF($sql);
287 287
         } else {
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             }
313 313
 
314 314
             if (!($obj instanceof $this->className && class_exists($this->className))) {
315
-                $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
315
+                $obj->setErrors(get_class($obj).' Differs from '.$this->className);
316 316
 
317 317
                 return false;
318 318
             }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
         foreach ($obj->cleanVars as $k => $v) {
325 325
             if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
326
-                $cleanvars[$k] = (int)$v;
326
+                $cleanvars[$k] = (int) $v;
327 327
             } elseif (is_array($v)) {
328 328
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
329 329
             } else {
@@ -333,12 +333,12 @@  discard block
 block discarded – undo
333 333
         if ($obj->isNew()) {
334 334
             if (!is_array($this->keyName)) {
335 335
                 if ($cleanvars[$this->keyName] < 1) {
336
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
336
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
337 337
                 }
338 338
             }
339
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
339
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')';
340 340
         } else {
341
-            $sql = 'UPDATE ' . $this->table . ' SET';
341
+            $sql = 'UPDATE '.$this->table.' SET';
342 342
             foreach ($cleanvars as $key => $value) {
343 343
                 if ((!is_array($this->keyName) && $key == $this->keyName)
344 344
                     || (is_array($this->keyName)
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 if (isset($notfirst)) {
350 350
                     $sql .= ',';
351 351
                 }
352
-                $sql .= ' ' . $key . ' = ' . $value;
352
+                $sql .= ' '.$key.' = '.$value;
353 353
                 $notfirst = true;
354 354
             }
355 355
             if (is_array($this->keyName)) {
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
                     if ($i > 0) {
359 359
                         $whereclause .= ' AND ';
360 360
                     }
361
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
361
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
362 362
                 }
363 363
             } else {
364
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
364
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
365 365
             }
366
-            $sql .= ' WHERE ' . $whereclause;
366
+            $sql .= ' WHERE '.$whereclause;
367 367
         }
368 368
         if (false != $force) {
369 369
             $result = $this->db->queryF($sql);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
      */
393 393
     public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false)
394 394
     {
395
-        $setClause = $fieldname . ' = ';
395
+        $setClause = $fieldname.' = ';
396 396
         if (is_numeric($fieldvalue)) {
397 397
             $setClause .= $fieldvalue;
398 398
         } elseif (is_array($fieldvalue)) {
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
         } else {
401 401
             $setClause .= $this->db->quoteString($fieldvalue);
402 402
         }
403
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause;
403
+        $sql = 'UPDATE '.$this->table.' SET '.$setClause;
404 404
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
405
-            $sql .= ' ' . $criteria->renderWhere();
405
+            $sql .= ' '.$criteria->renderWhere();
406 406
         }
407 407
         if (false != $force) {
408 408
             $result = $this->db->queryF($sql);
@@ -426,9 +426,9 @@  discard block
 block discarded – undo
426 426
      */
427 427
     public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
428 428
     {
429
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;
429
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
430 430
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
431
-            $sql .= ' ' . $criteria->renderWhere();
431
+            $sql .= ' '.$criteria->renderWhere();
432 432
         }
433 433
         if (false != $force) {
434 434
             $result = $this->db->queryF($sql);
@@ -455,8 +455,8 @@  discard block
 block discarded – undo
455 455
     public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false)
456 456
     {
457 457
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
458
-            $sql = 'DELETE FROM ' . $this->table;
459
-            $sql .= ' ' . $criteria->renderWhere();
458
+            $sql = 'DELETE FROM '.$this->table;
459
+            $sql .= ' '.$criteria->renderWhere();
460 460
             if (!$this->db->query($sql)) {
461 461
                 return false;
462 462
             }
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
      */
591 591
     public function updateCounter($fieldname, $criteria, $op = '+')
592 592
     {
593
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';
594
-        $sql .= ' ' . $criteria->renderWhere();
593
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
594
+        $sql .= ' '.$criteria->renderWhere();
595 595
         $result = $this->db->queryF($sql);
596 596
         if (!$result) {
597 597
             return false;
@@ -613,12 +613,12 @@  discard block
 block discarded – undo
613 613
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
614 614
             if ($criteria->groupby != '') {
615 615
                 $groupby = true;
616
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
616
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
617 617
             }
618 618
         }
619
-        $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;
619
+        $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
620 620
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
621
-            $sql .= ' ' . $criteria->renderWhere();
621
+            $sql .= ' '.$criteria->renderWhere();
622 622
             if ($criteria->groupby != '') {
623 623
                 $sql .= $criteria->getGroupby();
624 624
             }
@@ -654,12 +654,12 @@  discard block
 block discarded – undo
654 654
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
655 655
             if ($criteria->groupby != '') {
656 656
                 $groupby = true;
657
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
657
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
658 658
             }
659 659
         }
660
-        $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;
660
+        $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
661 661
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
662
-            $sql .= ' ' . $criteria->renderWhere();
662
+            $sql .= ' '.$criteria->renderWhere();
663 663
             if ($criteria->groupby != '') {
664 664
                 $sql .= $criteria->getGroupby();
665 665
             }
@@ -692,9 +692,9 @@  discard block
 block discarded – undo
692 692
     {
693 693
         $field = '';
694 694
 
695
-        $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;
695
+        $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
696 696
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
697
-            $sql .= ' ' . $criteria->renderWhere();
697
+            $sql .= ' '.$criteria->renderWhere();
698 698
         }
699 699
         $result = $this->db->query($sql);
700 700
         if (!$result) {
Please login to merge, or discard this patch.