Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/modules/system/class/fineavataruploadhandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     protected function storeUploadedFile($target, $mimeType, $uuid)
52 52
     {
53 53
         $pathParts = pathinfo($this->getName());
54
-        $avatarName = uniqid('savt') . '.' . strtolower($pathParts['extension']);
55
-        $avatarNicename = str_replace(array('_','-'), ' ', $pathParts['filename']);
56
-        $avatarPath = XOOPS_ROOT_PATH . '/uploads/avatars/' . $avatarName;
54
+        $avatarName = uniqid('savt').'.'.strtolower($pathParts['extension']);
55
+        $avatarNicename = str_replace(array('_', '-'), ' ', $pathParts['filename']);
56
+        $avatarPath = XOOPS_ROOT_PATH.'/uploads/avatars/'.$avatarName;
57 57
 
58 58
         if (false === move_uploaded_file($_FILES[$this->inputName]['tmp_name'], $avatarPath)) {
59 59
             return false;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $avt_handler = xoops_getHandler('avatar');
63 63
         $avatar = $avt_handler->create();
64 64
         
65
-        $avatar->setVar('avatar_file', 'avatars/' . $avatarName);
65
+        $avatar->setVar('avatar_file', 'avatars/'.$avatarName);
66 66
         $avatar->setVar('avatar_name', $avatarNicename);
67 67
         $avatar->setVar('avatar_mimetype', $mimeType);
68 68
         $avatar->setVar('avatar_created', time());
Please login to merge, or discard this patch.
htdocs/modules/system/class/userrank.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,16 +65,16 @@
 block discarded – undo
65 65
         $form->addElement(new XoopsFormText(_AM_SYSTEM_USERRANK_MAXPOST, 'rank_max', 10, 10, $this->getVar('rank_max')));
66 66
 
67 67
         $imgtray_img     = new XoopsFormElementTray(_AM_SYSTEM_USERRANK_IMAGE, '<br>');
68
-        $imgpath_img     = sprintf(_AM_SYSTEM_USERRANK_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/ranks/');
68
+        $imgpath_img     = sprintf(_AM_SYSTEM_USERRANK_IMAGE_PATH, XOOPS_UPLOAD_PATH.'/ranks/');
69 69
         $imageselect_img = new XoopsFormSelect($imgpath_img, 'rank_image', $blank_img);
70
-        $image_array_img = XoopsLists::getImgListAsArray(XOOPS_UPLOAD_PATH . '/ranks');
70
+        $image_array_img = XoopsLists::getImgListAsArray(XOOPS_UPLOAD_PATH.'/ranks');
71 71
         $imageselect_img->addOption("$blank_img", $blank_img);
72 72
         foreach ($image_array_img as $image_img) {
73 73
             $imageselect_img->addOption("$image_img", $image_img);
74 74
         }
75
-        $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"" . XOOPS_UPLOAD_URL . "\")'");
75
+        $imageselect_img->setExtra("onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"".XOOPS_UPLOAD_URL."\")'");
76 76
         $imgtray_img->addElement($imageselect_img, false);
77
-        $imgtray_img->addElement(new XoopsFormLabel('', "<br><img src='" . XOOPS_UPLOAD_URL . '/ranks/' . $blank_img . "' name='image_img' id='xo-ranks-img' alt='' />"));
77
+        $imgtray_img->addElement(new XoopsFormLabel('', "<br><img src='".XOOPS_UPLOAD_URL.'/ranks/'.$blank_img."' name='image_img' id='xo-ranks-img' alt='' />"));
78 78
 
79 79
         $fileseltray_img = new XoopsFormElementTray('<br>', '<br><br>');
80 80
         $fileseltray_img->addElement(new XoopsFormFile(_AM_SYSTEM_USERRANK_UPLOAD, 'rank_image', 500000), false);
Please login to merge, or discard this patch.
htdocs/modules/system/class/block.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
         // Side position
85 85
         $side_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'side', $this->getVar('side'));
86 86
         $side_select->addOptionArray(array(
87
-                                         0  => _AM_SYSTEM_BLOCKS_SBLEFT,
88
-                                         1  => _AM_SYSTEM_BLOCKS_SBRIGHT,
89
-                                         3  => _AM_SYSTEM_BLOCKS_CBLEFT,
90
-                                         4  => _AM_SYSTEM_BLOCKS_CBRIGHT,
91
-                                         5  => _AM_SYSTEM_BLOCKS_CBCENTER,
92
-                                         7  => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT,
93
-                                         8  => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT,
94
-                                         9  => _AM_SYSTEM_BLOCKS_CBBOTTOM,
95
-                                         10 => _AM_SYSTEM_BLOCKS_CBFOOTERLEFT,
96
-                                         11 => _AM_SYSTEM_BLOCKS_CBFOOTERRIGHT,
97
-                                         12 => _AM_SYSTEM_BLOCKS_CBFOOTERCENTER));
87
+                                            0  => _AM_SYSTEM_BLOCKS_SBLEFT,
88
+                                            1  => _AM_SYSTEM_BLOCKS_SBRIGHT,
89
+                                            3  => _AM_SYSTEM_BLOCKS_CBLEFT,
90
+                                            4  => _AM_SYSTEM_BLOCKS_CBRIGHT,
91
+                                            5  => _AM_SYSTEM_BLOCKS_CBCENTER,
92
+                                            7  => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT,
93
+                                            8  => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT,
94
+                                            9  => _AM_SYSTEM_BLOCKS_CBBOTTOM,
95
+                                            10 => _AM_SYSTEM_BLOCKS_CBFOOTERLEFT,
96
+                                            11 => _AM_SYSTEM_BLOCKS_CBFOOTERRIGHT,
97
+                                            12 => _AM_SYSTEM_BLOCKS_CBFOOTERCENTER));
98 98
 
99 99
         $form->addElement($side_select);
100 100
         // Order
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
             if (in_array($editor_configs['editor'], array('dhtmltextarea', 'textarea'))) {
129 129
                 $ctype_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'c_type', $this->getVar('c_type'));
130 130
                 $ctype_select->addOptionArray(array(
131
-                                                  'H' => _AM_SYSTEM_BLOCKS_HTML,
132
-                                                  'P' => _AM_SYSTEM_BLOCKS_PHP,
133
-                                                  'S' => _AM_SYSTEM_BLOCKS_AFWSMILE,
134
-                                                  'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE));
131
+                                                    'H' => _AM_SYSTEM_BLOCKS_HTML,
132
+                                                    'P' => _AM_SYSTEM_BLOCKS_PHP,
133
+                                                    'S' => _AM_SYSTEM_BLOCKS_AFWSMILE,
134
+                                                    'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE));
135 135
                 $form->addElement($ctype_select);
136 136
             } else {
137 137
                 $form->addElement(new XoopsFormHidden('c_type', 'H'));
@@ -158,17 +158,17 @@  discard block
 block discarded – undo
158 158
         }
159 159
         $cache_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $this->getVar('bcachetime'));
160 160
         $cache_select->addOptionArray(array(
161
-                                          '0'       => _NOCACHE,
162
-                                          '30'      => sprintf(_SECONDS, 30),
163
-                                          '60'      => _MINUTE,
164
-                                          '300'     => sprintf(_MINUTES, 5),
165
-                                          '1800'    => sprintf(_MINUTES, 30),
166
-                                          '3600'    => _HOUR,
167
-                                          '18000'   => sprintf(_HOURS, 5),
168
-                                          '86400'   => _DAY,
169
-                                          '259200'  => sprintf(_DAYS, 3),
170
-                                          '604800'  => _WEEK,
171
-                                          '2592000' => _MONTH));
161
+                                            '0'       => _NOCACHE,
162
+                                            '30'      => sprintf(_SECONDS, 30),
163
+                                            '60'      => _MINUTE,
164
+                                            '300'     => sprintf(_MINUTES, 5),
165
+                                            '1800'    => sprintf(_MINUTES, 30),
166
+                                            '3600'    => _HOUR,
167
+                                            '18000'   => sprintf(_HOURS, 5),
168
+                                            '86400'   => _DAY,
169
+                                            '259200'  => sprintf(_DAYS, 3),
170
+                                            '604800'  => _WEEK,
171
+                                            '2592000' => _MONTH));
172 172
         $form->addElement($cache_select);
173 173
         // Groups
174 174
         $form->addElement(new XoopsFormSelectGroup(_AM_SYSTEM_BLOCKS_GROUP, 'groups', true, $groups, 5, true));
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
17 17
 
18
-require_once XOOPS_ROOT_PATH . '/kernel/block.php';
18
+require_once XOOPS_ROOT_PATH.'/kernel/block.php';
19 19
 
20 20
 /**
21 21
  * System Block
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
                 $tplfile_handler = xoops_getHandler('tplfile');
142 142
                 $btemplate       = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $this->getVar('bid'));
143 143
                 if (count($btemplate) > 0) {
144
-                    $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>'));
144
+                    $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id='.$btemplate[0]->getVar('tpl_id').'">'._AM_SYSTEM_BLOCKS_EDITTPL.'</a>'));
145 145
                 } else {
146 146
                     $btemplate2 = $tplfile_handler->find('default', 'block', $this->getVar('bid'));
147 147
                     if (count($btemplate2) > 0) {
148
-                        $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplate2[0]->getVar('tpl_id') . '" rel="external">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>'));
148
+                        $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id='.$btemplate2[0]->getVar('tpl_id').'" rel="external">'._AM_SYSTEM_BLOCKS_EDITTPL.'</a>'));
149 149
                     }
150 150
                 }
151 151
             }
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
             if (!$edit_func) {
211 211
                 return false;
212 212
             }
213
-            if (file_exists($GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file')))) {
214
-                if (file_exists($file = $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/blocks.php'))) {
213
+            if (file_exists($GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file')))) {
214
+                if (file_exists($file = $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/language/'.$xoopsConfig['language'].'/blocks.php'))) {
215 215
                     include_once $file;
216
-                } elseif (file_exists($file = $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/language/english/blocks.php'))) {
216
+                } elseif (file_exists($file = $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/language/english/blocks.php'))) {
217 217
                     include_once $file;
218 218
                 }
219
-                include_once $GLOBALS['xoops']->path('modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'));
219
+                include_once $GLOBALS['xoops']->path('modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file'));
220 220
                 $options   = explode('|', $this->getVar('options'));
221 221
                 $edit_form = $edit_func($options);
222 222
                 if (!$edit_form) {
@@ -260,22 +260,22 @@  discard block
 block discarded – undo
260 260
                 // S : use text sanitizater (smilies enabled)
261 261
                 // T : use text sanitizater (smilies disabled)
262 262
                 if ($c_type === 'H') {
263
-                    return str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
263
+                    return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
264 264
                 } elseif ($c_type === 'P') {
265 265
                     ob_start();
266 266
                     echo eval($this->getVar('content', 'n'));
267 267
                     $content = ob_get_contents();
268 268
                     ob_end_clean();
269 269
 
270
-                    return str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
270
+                    return str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
271 271
                 } elseif ($c_type === 'S') {
272 272
                     $myts    = MyTextSanitizer::getInstance();
273
-                    $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
273
+                    $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
274 274
 
275 275
                     return $myts->displayTarea($content, 1, 1);
276 276
                 } else {
277 277
                     $myts    = MyTextSanitizer::getInstance();
278
-                    $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'n'));
278
+                    $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'n'));
279 279
 
280 280
                     return $myts->displayTarea($content, 1, 0);
281 281
                 }
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
     {
339 339
         $ret   = array();
340 340
         $limit = $start = 0;
341
-        $sql   = 'SELECT DISTINCT(b.bid), b.* FROM ' . $this->db->prefix('newblocks') . ' b LEFT JOIN ' . $this->db->prefix('block_module_link') . ' l ON b.bid=l.block_id';
341
+        $sql   = 'SELECT DISTINCT(b.bid), b.* FROM '.$this->db->prefix('newblocks').' b LEFT JOIN '.$this->db->prefix('block_module_link').' l ON b.bid=l.block_id';
342 342
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
343
-            $sql .= ' ' . $criteria->renderWhere();
343
+            $sql .= ' '.$criteria->renderWhere();
344 344
             $limit = $criteria->getLimit();
345 345
             $start = $criteria->getStart();
346 346
         }
@@ -404,20 +404,20 @@  discard block
 block discarded – undo
404 404
         if (!$asobject) {
405 405
             $sql = 'SELECT b.bid ';
406 406
         }
407
-        $sql .= 'FROM ' . $db->prefix('newblocks') . ' b LEFT JOIN ' . $db->prefix('group_permission') . " l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
407
+        $sql .= 'FROM '.$db->prefix('newblocks').' b LEFT JOIN '.$db->prefix('group_permission')." l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
408 408
         if (is_array($groupid)) {
409
-            $sql .= ' AND (l.gperm_groupid=' . $groupid[0] . '';
409
+            $sql .= ' AND (l.gperm_groupid='.$groupid[0].'';
410 410
             $size = count($groupid);
411 411
             if ($size > 1) {
412 412
                 for ($i = 1; $i < $size; ++$i) {
413
-                    $sql .= ' OR l.gperm_groupid=' . $groupid[$i] . '';
413
+                    $sql .= ' OR l.gperm_groupid='.$groupid[$i].'';
414 414
                 }
415 415
             }
416 416
             $sql .= ')';
417 417
         } else {
418
-            $sql .= ' AND l.gperm_groupid=' . $groupid . '';
418
+            $sql .= ' AND l.gperm_groupid='.$groupid.'';
419 419
         }
420
-        $sql .= ' AND b.isactive=' . $isactive;
420
+        $sql .= ' AND b.isactive='.$isactive;
421 421
         if (isset($side)) {
422 422
             // get both sides in sidebox? (some themes need this)
423 423
             if ($side === XOOPS_SIDEBLOCK_BOTH) {
@@ -427,9 +427,9 @@  discard block
 block discarded – undo
427 427
             } elseif ($side === XOOPS_FOOTERBLOCK_ALL) {
428 428
                 $side = '(b.side=10 OR b.side=11 OR b.side=12 )';
429 429
             } else {
430
-                $side = 'b.side=' . $side;
430
+                $side = 'b.side='.$side;
431 431
             }
432
-            $sql .= ' AND ' . $side;
432
+            $sql .= ' AND '.$side;
433 433
         }
434 434
         if (isset($visible)) {
435 435
             $sql .= " AND b.visible=$visible";
@@ -459,12 +459,12 @@  discard block
 block discarded – undo
459 459
     public function getBlockByPerm($groupid)
460 460
     {
461 461
         if (isset($groupid)) {
462
-            $sql = 'SELECT DISTINCT gperm_itemid FROM ' . $this->db->prefix('group_permission') . " WHERE gperm_name = 'block_read' AND gperm_modid = 1";
462
+            $sql = 'SELECT DISTINCT gperm_itemid FROM '.$this->db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
463 463
             if (is_array($groupid)) {
464
-                $sql .= ' AND gperm_groupid IN (' . implode(',', $groupid) . ')';
464
+                $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
465 465
             } else {
466 466
                 if ((int)$groupid > 0) {
467
-                    $sql .= ' AND gperm_groupid=' . (int)$groupid;
467
+                    $sql .= ' AND gperm_groupid='.(int)$groupid;
468 468
                 }
469 469
             }
470 470
             $result   = $this->db->query($sql);
@@ -498,12 +498,12 @@  discard block
 block discarded – undo
498 498
         $db       = $GLOBALS['xoopsDB'];
499 499
         $ret      = array();
500 500
         if (isset($groupid)) {
501
-            $sql = 'SELECT DISTINCT gperm_itemid FROM ' . $db->prefix('group_permission') . " WHERE gperm_name = 'block_read' AND gperm_modid = 1";
501
+            $sql = 'SELECT DISTINCT gperm_itemid FROM '.$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
502 502
             if (is_array($groupid)) {
503
-                $sql .= ' AND gperm_groupid IN (' . implode(',', $groupid) . ')';
503
+                $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
504 504
             } else {
505 505
                 if ((int)$groupid > 0) {
506
-                    $sql .= ' AND gperm_groupid=' . (int)$groupid;
506
+                    $sql .= ' AND gperm_groupid='.(int)$groupid;
507 507
                 }
508 508
             }
509 509
             $result   = $db->query($sql);
@@ -515,14 +515,14 @@  discard block
 block discarded – undo
515 515
                 return $blockids;
516 516
             }
517 517
         }
518
-        $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid';
519
-        $sql .= ' AND b.isactive=' . $isactive;
518
+        $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
519
+        $sql .= ' AND b.isactive='.$isactive;
520 520
         if (isset($visible)) {
521
-            $sql .= ' AND b.visible=' . (int)$visible;
521
+            $sql .= ' AND b.visible='.(int)$visible;
522 522
         }
523 523
         if (!isset($module_id)) {
524 524
         } elseif (!empty($module_id)) {
525
-            $sql .= ' AND m.module_id IN (0,' . (int)$module_id;
525
+            $sql .= ' AND m.module_id IN (0,'.(int)$module_id;
526 526
             if ($toponlyblock) {
527 527
                 $sql .= ',-1';
528 528
             }
@@ -535,13 +535,13 @@  discard block
 block discarded – undo
535 535
             }
536 536
         }
537 537
         if (!empty($blockids)) {
538
-            $sql .= ' AND b.bid IN (' . implode(',', $blockids) . ')';
538
+            $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
539 539
         }
540
-        $sql .= ' ORDER BY ' . $orderby;
540
+        $sql .= ' ORDER BY '.$orderby;
541 541
         $result = $db->query($sql);
542 542
         while (false !== ($myrow = $db->fetchArray($result))) {
543 543
             $block              = new XoopsBlock($myrow);
544
-            $ret[$myrow['bid']] =& $block;
544
+            $ret[$myrow['bid']] = & $block;
545 545
             unset($block);
546 546
         }
547 547
 
@@ -562,13 +562,13 @@  discard block
 block discarded – undo
562 562
         $db   = $GLOBALS['xoopsDB'];
563 563
         $ret  = array();
564 564
         $bids = array();
565
-        $sql  = 'SELECT DISTINCT(bid) from ' . $db->prefix('newblocks');
565
+        $sql  = 'SELECT DISTINCT(bid) from '.$db->prefix('newblocks');
566 566
         if ($result = $db->query($sql)) {
567 567
             while (false !== ($myrow = $db->fetchArray($result))) {
568 568
                 $bids[] = $myrow['bid'];
569 569
             }
570 570
         }
571
-        $sql     = 'SELECT DISTINCT(p.gperm_itemid) from ' . $db->prefix('group_permission') . ' p, ' . $db->prefix('groups') . " g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
571
+        $sql     = 'SELECT DISTINCT(p.gperm_itemid) from '.$db->prefix('group_permission').' p, '.$db->prefix('groups')." g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
572 572
         $grouped = array();
573 573
         if ($result = $db->query($sql)) {
574 574
             while (false !== ($myrow = $db->fetchArray($result))) {
@@ -577,14 +577,14 @@  discard block
 block discarded – undo
577 577
         }
578 578
         $non_grouped = array_diff($bids, $grouped);
579 579
         if (!empty($non_grouped)) {
580
-            $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid';
581
-            $sql .= ' AND b.isactive=' . (int)$isactive;
580
+            $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
581
+            $sql .= ' AND b.isactive='.(int)$isactive;
582 582
             if (isset($visible)) {
583
-                $sql .= ' AND b.visible=' . (int)$visible;
583
+                $sql .= ' AND b.visible='.(int)$visible;
584 584
             }
585 585
             if (!isset($module_id)) {
586 586
             } elseif (!empty($module_id)) {
587
-                $sql .= ' AND m.module_id IN (0,' . (int)$module_id;
587
+                $sql .= ' AND m.module_id IN (0,'.(int)$module_id;
588 588
                 if ($toponlyblock) {
589 589
                     $sql .= ',-1';
590 590
                 }
@@ -596,12 +596,12 @@  discard block
 block discarded – undo
596 596
                     $sql .= ' AND m.module_id=0';
597 597
                 }
598 598
             }
599
-            $sql .= ' AND b.bid IN (' . implode(',', $non_grouped) . ')';
600
-            $sql .= ' ORDER BY ' . $orderby;
599
+            $sql .= ' AND b.bid IN ('.implode(',', $non_grouped).')';
600
+            $sql .= ' ORDER BY '.$orderby;
601 601
             $result = $db->query($sql);
602 602
             while (false !== ($myrow = $db->fetchArray($result))) {
603 603
                 $block              = new XoopsBlock($myrow);
604
-                $ret[$myrow['bid']] =& $block;
604
+                $ret[$myrow['bid']] = & $block;
605 605
                 unset($block);
606 606
             }
607 607
         }
Please login to merge, or discard this patch.
htdocs/modules/system/class/breadcrumb.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,32 +80,32 @@
 block discarded – undo
80 80
                 }
81 81
             }
82 82
             // Call template
83
-            if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html')) {
84
-                $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html');
83
+            if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/'.$GLOBALS['xoopsConfig']['language'].'/help/'.$this->_directory.'.html')) {
84
+                $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH.'/modules/system/language/'.$GLOBALS['xoopsConfig']['language'].'/help/'.$this->_directory.'.html');
85 85
             } else {
86
-                if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/help/' . $this->_directory . '.html')) {
87
-                    $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH . '/modules/system/language/english/help/' . $this->_directory . '.html');
86
+                if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/english/help/'.$this->_directory.'.html')) {
87
+                    $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH.'/modules/system/language/english/help/'.$this->_directory.'.html');
88 88
                 } else {
89 89
                     $GLOBALS['xoopsTpl']->assign('load_error', 1);
90 90
                 }
91 91
             }
92 92
         } else {
93
-            $out = $menu = '<style type="text/css" media="screen">@import ' . XOOPS_URL . '/modules/system/css/menu.css;</style>';
93
+            $out = $menu = '<style type="text/css" media="screen">@import '.XOOPS_URL.'/modules/system/css/menu.css;</style>';
94 94
             $out .= '<ul id="xo-breadcrumb">';
95 95
             foreach ($this->_bread as $menu) {
96 96
                 if ($menu['home']) {
97
-                    $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '"><img src="images/home.png" alt="' . $menu['title'] . '" class="home" /></a></li>';
97
+                    $out .= '<li><a href="'.$menu['link'].'" title="'.$menu['title'].'"><img src="images/home.png" alt="'.$menu['title'].'" class="home" /></a></li>';
98 98
                 } else {
99 99
                     if ($menu['link'] != '') {
100
-                        $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '">' . $menu['title'] . '</a></li>';
100
+                        $out .= '<li><a href="'.$menu['link'].'" title="'.$menu['title'].'">'.$menu['title'].'</a></li>';
101 101
                     } else {
102
-                        $out .= '<li>' . $menu['title'] . '</li>';
102
+                        $out .= '<li>'.$menu['title'].'</li>';
103 103
                     }
104 104
                 }
105 105
             }
106 106
             $out .= '</ul>';
107 107
             if ($this->_tips) {
108
-                $out .= '<div class="tips">' . $this->_tips . '</div>';
108
+                $out .= '<div class="tips">'.$this->_tips.'</div>';
109 109
             }
110 110
             echo $out;
111 111
         }
Please login to merge, or discard this patch.
htdocs/modules/system/class/gui.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
 
71 71
         $adminThemeFactory = new xos_opal_AdminThemeFactory();
72 72
         $this->xoTheme     =& $adminThemeFactory->createInstance(array(
73
-                                                                     'folderName'      => $this->foldername,
74
-                                                                     'themesPath'      => 'modules/system/themes',
75
-                                                                     'contentTemplate' => @$GLOBALS['xoopsOption']['template_main']));
73
+                                                                        'folderName'      => $this->foldername,
74
+                                                                        'themesPath'      => 'modules/system/themes',
75
+                                                                        'contentTemplate' => @$GLOBALS['xoopsOption']['template_main']));
76 76
 
77 77
         $this->xoTheme->loadLocalization('admin');
78 78
         $this->template =& $this->xoTheme->template;
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -51,34 +51,34 @@  discard block
 block discarded – undo
51 51
         $xoopsLogger->startTime('XOOPS output init');
52 52
 
53 53
         if (!headers_sent()) {
54
-            header('Content-Type:text/html; charset=' . _CHARSET);
54
+            header('Content-Type:text/html; charset='._CHARSET);
55 55
             header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
56
-            header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
56
+            header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
57 57
             header('Cache-Control: no-store, no-cache, must-revalidate');
58 58
             header('Cache-Control: post-check=0, pre-check=0', false);
59 59
             header('Pragma: no-cache');
60 60
         }
61 61
 
62
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
63
-        require_once XOOPS_ROOT_PATH . '/class/theme.php';
62
+        require_once XOOPS_ROOT_PATH.'/class/template.php';
63
+        require_once XOOPS_ROOT_PATH.'/class/theme.php';
64 64
 
65 65
         if (@$GLOBALS['xoopsOption']['template_main']) {
66 66
             if (false === strpos($GLOBALS['xoopsOption']['template_main'], ':')) {
67
-                $GLOBALS['xoopsOption']['template_main'] = 'db:' . $GLOBALS['xoopsOption']['template_main'];
67
+                $GLOBALS['xoopsOption']['template_main'] = 'db:'.$GLOBALS['xoopsOption']['template_main'];
68 68
             }
69 69
         }
70 70
 
71 71
         $adminThemeFactory = new xos_opal_AdminThemeFactory();
72
-        $this->xoTheme     =& $adminThemeFactory->createInstance(array(
72
+        $this->xoTheme     = & $adminThemeFactory->createInstance(array(
73 73
                                                                      'folderName'      => $this->foldername,
74 74
                                                                      'themesPath'      => 'modules/system/themes',
75 75
                                                                      'contentTemplate' => @$GLOBALS['xoopsOption']['template_main']));
76 76
 
77 77
         $this->xoTheme->loadLocalization('admin');
78
-        $this->template =& $this->xoTheme->template;
78
+        $this->template = & $this->xoTheme->template;
79 79
 
80
-        $GLOBALS['xoTheme']  =& $this->xoTheme;
81
-        $GLOBALS['adminTpl'] =& $this->xoTheme->template;
80
+        $GLOBALS['xoTheme']  = & $this->xoTheme;
81
+        $GLOBALS['adminTpl'] = & $this->xoTheme->template;
82 82
 
83 83
         $xoopsLogger->stopTime('XOOPS output init');
84 84
         $xoopsLogger->startTime('Module display');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $xoopsModule->loadAdminMenu();
91 91
 
92 92
             foreach (array_keys($xoopsModule->adminmenu) as $item) {
93
-                $sys_menu[$item]['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->adminmenu[$item]['link'];
93
+                $sys_menu[$item]['link'] = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'.$xoopsModule->adminmenu[$item]['link'];
94 94
                 $GLOBALS['xoopsTpl']->append_by_ref('sys_menu', $sys_menu);
95 95
                 unset($sys_menu);
96 96
             }
@@ -98,21 +98,21 @@  discard block
 block discarded – undo
98 98
         // Module adminmenu
99 99
         if (isset($xoopsModule) && $xoopsModule->getVar('dirname') !== 'system') {
100 100
             if ($xoopsModule->getInfo('system_menu')) {
101
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/menu.css');
101
+                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/menu.css');
102 102
 
103 103
                 $xoopsModule->loadAdminMenu();
104 104
                 // Get menu tab handler
105 105
                 /* @var $menu_handler SystemMenuHandler */
106 106
                 $menu_handler = xoops_getModuleHandler('menu', 'system');
107 107
                 // Define top navigation
108
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $xoopsModule->getVar('mid', 'e'), _AM_SYSTEM_PREF);
109
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module=' . $xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE);
110
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&amp;op=list&amp;filter=1&amp;selgen=' . $xoopsModule->getVar('mid', 'e') . '&amp;selmod=-2&amp;selgrp=-1&amp;selvis=-1', _AM_SYSTEM_BLOCKS);
111
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=default&amp;moddir=' . $xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_TPLSETS);
112
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?module=' . $xoopsModule->getVar('mid', 'e') . '&amp;status=0&amp;limit=10&amp;fct=comments', _AM_SYSTEM_COMMENTS);
113
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&amp;op=uninstall&amp;module=' . $xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_UNINSTALL);
114
-
115
-                $menu_handler->addMenuTop(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'e') . '/', _AM_SYSTEM_GOTOMODULE);
108
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod='.$xoopsModule->getVar('mid', 'e'), _AM_SYSTEM_PREF);
109
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module='.$xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE);
110
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&amp;op=list&amp;filter=1&amp;selgen='.$xoopsModule->getVar('mid', 'e').'&amp;selmod=-2&amp;selgrp=-1&amp;selvis=-1', _AM_SYSTEM_BLOCKS);
111
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?fct=tplsets&amp;op=listtpl&amp;tplset=default&amp;moddir='.$xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_TPLSETS);
112
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?module='.$xoopsModule->getVar('mid', 'e').'&amp;status=0&amp;limit=10&amp;fct=comments', _AM_SYSTEM_COMMENTS);
113
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&amp;op=uninstall&amp;module='.$xoopsModule->getVar('dirname', 'e'), _AM_SYSTEM_UNINSTALL);
114
+
115
+                $menu_handler->addMenuTop(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'e').'/', _AM_SYSTEM_GOTOMODULE);
116 116
                 // Define main tab navigation
117 117
                 $i       = 0;
118 118
                 $current = $i;
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
                     ++$i;
125 125
                 }
126 126
                 if ($xoopsModule->getInfo('help')) {
127
-                    if (stripos($_SERVER['REQUEST_URI'], 'admin/' . $xoopsModule->getInfo('help')) !== false) {
127
+                    if (stripos($_SERVER['REQUEST_URI'], 'admin/'.$xoopsModule->getInfo('help')) !== false) {
128 128
                         $current = $i;
129 129
                     }
130
-                    $menu_handler->addMenuTabs('../system/help.php?mid=' . $xoopsModule->getVar('mid', 's') . '&amp;' . $xoopsModule->getInfo('help'), _AM_SYSTEM_HELP);
130
+                    $menu_handler->addMenuTabs('../system/help.php?mid='.$xoopsModule->getVar('mid', 's').'&amp;'.$xoopsModule->getInfo('help'), _AM_SYSTEM_HELP);
131 131
                 }
132 132
 
133 133
                 // Display navigation tabs
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $xoopsLogger->stopTime('Module display');
145 145
 
146 146
         if (!headers_sent()) {
147
-            header('Content-Type:text/html; charset=' . _CHARSET);
147
+            header('Content-Type:text/html; charset='._CHARSET);
148 148
             header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
149 149
             header('Cache-Control: private, no-cache');
150 150
             header('Pragma: no-cache');
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         if (isset($GLOBALS['xoopsOption']['template_main']) && $GLOBALS['xoopsOption']['template_main'] != $xoTheme->contentTemplate) {
159 159
             trigger_error("xoopsOption['template_main'] should be defined before call xoops_cp_header function", E_USER_WARNING);
160 160
             if (false === strpos($GLOBALS['xoopsOption']['template_main'], ':')) {
161
-                $xoTheme->contentTemplate = 'db:' . $GLOBALS['xoopsOption']['template_main'];
161
+                $xoTheme->contentTemplate = 'db:'.$GLOBALS['xoopsOption']['template_main'];
162 162
             } else {
163 163
                 $xoTheme->contentTemplate = $GLOBALS['xoopsOption']['template_main'];
164 164
             }
Please login to merge, or discard this patch.
htdocs/modules/system/class/cookie.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,10 +163,10 @@
 block discarded – undo
163 163
      * @param bool   $httponly
164 164
      */
165 165
     public static function set($key, $value, $expire = 0,            /* Default expire time (session, 1 week = 604800) */
166
-                               $path = '',             /* Default path */
167
-                               $domain = '',           /* Default domain */
168
-                               $secure = false,        /* Does this cookie need a secure HTTPS connection? */
169
-                               $httponly = true        /* Can non-HTTP services access this cookie (IE: javascript)? */
166
+                                $path = '',             /* Default path */
167
+                                $domain = '',           /* Default domain */
168
+                                $secure = false,        /* Does this cookie need a secure HTTPS connection? */
169
+                                $httponly = true        /* Can non-HTTP services access this cookie (IE: javascript)? */
170 170
     ) {
171 171
         // Make sure they aren't trying to set a reserved word
172 172
         if (!in_array($key, self::$_reserved)) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 list($k, $v) = each($key);
57 57
 
58 58
                 // Set string representation
59
-                $key = $k . '[' . $v . ']';
59
+                $key = $k.'['.$v.']';
60 60
 
61 61
                 // Set expiration time to -1hr (will cause browser deletion)
62 62
                 setcookie($key, false, time() - 3600);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             elseif (is_array($_COOKIE[$key])) {
68 68
                 foreach ($_COOKIE[$key] as $k => $v) {
69 69
                     // Set string representation
70
-                    $cookie = $key . '[' . $k . ']';
70
+                    $cookie = $key.'['.$k.']';
71 71
 
72 72
                     // Set expiration time to -1hr (will cause browser deletion)
73 73
                     setcookie($cookie, false, time() - 3600);
@@ -162,10 +162,10 @@  discard block
 block discarded – undo
162 162
      * @param bool   $secure
163 163
      * @param bool   $httponly
164 164
      */
165
-    public static function set($key, $value, $expire = 0,            /* Default expire time (session, 1 week = 604800) */
166
-                               $path = '',             /* Default path */
167
-                               $domain = '',           /* Default domain */
168
-                               $secure = false,        /* Does this cookie need a secure HTTPS connection? */
165
+    public static function set($key, $value, $expire = 0, /* Default expire time (session, 1 week = 604800) */
166
+                               $path = '', /* Default path */
167
+                               $domain = '', /* Default domain */
168
+                               $secure = false, /* Does this cookie need a secure HTTPS connection? */
169 169
                                $httponly = true        /* Can non-HTTP services access this cookie (IE: javascript)? */
170 170
     ) {
171 171
         // Make sure they aren't trying to set a reserved word
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 list($k, $v) = each($key);
199 199
 
200 200
                 // Set string representation
201
-                $key = $k . '[' . $v . ']';
201
+                $key = $k.'['.$v.']';
202 202
             }
203 203
         } // Converting from string to array
204 204
         elseif (!is_array($key)) {
Please login to merge, or discard this patch.
htdocs/modules/system/class/group.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
19 19
 
20
-include_once XOOPS_ROOT_PATH . '/kernel/group.php';
20
+include_once XOOPS_ROOT_PATH.'/kernel/group.php';
21 21
 
22 22
 /**
23 23
  * System Group
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
         xoops_load('XoopsFormLoader');
70 70
         xoops_load('XoopsLists');
71
-        include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
71
+        include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
72 72
 
73 73
         $title = $this->isNew() ? sprintf(_AM_SYSTEM_GROUPS_ADD) : sprintf(_AM_SYSTEM_GROUPS_EDIT);
74 74
         $form  = new XoopsThemeForm($title, 'groupform', $action, 'post', true);
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 
88 88
         $s_cat_checkbox          = new XoopsFormCheckBox('', 'system_catids', $s_cat_value);
89 89
         $s_cat_checkbox->columns = 6;
90
-        $admin_dir               = XOOPS_ROOT_PATH . '/modules/system/admin/';
90
+        $admin_dir               = XOOPS_ROOT_PATH.'/modules/system/admin/';
91 91
         $dirlist                 = XoopsLists::getDirListAsArray($admin_dir);
92 92
         foreach ($dirlist as $file) {
93
-            include XOOPS_ROOT_PATH . '/modules/system/admin/' . $file . '/xoops_version.php';
93
+            include XOOPS_ROOT_PATH.'/modules/system/admin/'.$file.'/xoops_version.php';
94 94
             if (!empty($modversion['category'])) {
95
-                if (xoops_getModuleOption('active_' . $file, 'system') == 1) {
95
+                if (xoops_getModuleOption('active_'.$file, 'system') == 1) {
96 96
                     $s_cat_checkbox->addOption($modversion['category'], $modversion['name']);
97 97
                 }
98 98
             }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $module_list[0] = _AM_SYSTEM_GROUPS_CUSTOMBLOCK;
142 142
         /* @var $block_handler XoopsBlockHandler */
143 143
         $block_handler = xoops_getHandler('block');
144
-        $blocks_obj    = $block_handler->getObjects(new Criteria('mid', "('" . implode("', '", array_keys($module_list)) . "')", 'IN'), true);
144
+        $blocks_obj    = $block_handler->getObjects(new Criteria('mid', "('".implode("', '", array_keys($module_list))."')", 'IN'), true);
145 145
 
146 146
         $blocks_module = array();
147 147
         foreach (array_keys($blocks_obj) as $bid) {
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
         foreach (array_keys($blocks_module) as $mid) {
160 160
             $new_blocks_array = array();
161 161
             foreach ($blocks_module[$mid] as $key => $value) {
162
-                $new_blocks_array[$key] = "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&amp;op=edit&amp;bid={$key}' title='ID: {$key}' rel='external'>{$value}</a>";
162
+                $new_blocks_array[$key] = "<a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&amp;op=edit&amp;bid={$key}' title='ID: {$key}' rel='external'>{$value}</a>";
163 163
             }
164
-            $r_block_checkbox          = new XoopsFormCheckBox('<strong>' . $module_list[$mid] . '</strong><br>', 'read_bids[]', $r_block_value);
164
+            $r_block_checkbox          = new XoopsFormCheckBox('<strong>'.$module_list[$mid].'</strong><br>', 'read_bids[]', $r_block_value);
165 165
             $r_block_checkbox->columns = 5;
166 166
             $r_block_checkbox->addOptionArray($new_blocks_array);
167 167
             $r_block_tray->addElement($r_block_checkbox);
Please login to merge, or discard this patch.
htdocs/modules/system/class/users.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
17 17
 
18
-include_once XOOPS_ROOT_PATH . '/kernel/user.php';
18
+include_once XOOPS_ROOT_PATH.'/kernel/user.php';
19 19
 
20 20
 /**
21 21
  * System Users
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
         $form->setExtra('enctype="multipart/form-data"');
53 53
         $form->addElement(new XoopsFormText(_IMAGENAME, 'avatar_name', 50, 255, $this->getVar('avatar_name', 'e')), true);
54 54
 
55
-        $maxpixel = '<div class="small basic italic">' . _US_MAXPIXEL . '&nbsp;:&nbsp;' . $xoopsConfigUser['avatar_width'] . ' x ' . $xoopsConfigUser['avatar_height'] . '</div>';
56
-        $maxsize  = '<div class="small basic italic">' . _US_MAXIMGSZ . '&nbsp;:&nbsp;' . $xoopsConfigUser['avatar_maxsize'] . '</div>';
55
+        $maxpixel = '<div class="small basic italic">'._US_MAXPIXEL.'&nbsp;:&nbsp;'.$xoopsConfigUser['avatar_width'].' x '.$xoopsConfigUser['avatar_height'].'</div>';
56
+        $maxsize  = '<div class="small basic italic">'._US_MAXIMGSZ.'&nbsp;:&nbsp;'.$xoopsConfigUser['avatar_maxsize'].'</div>';
57 57
 
58 58
         $uploadirectory_img = '';
59
-        $imgtray_img        = new XoopsFormElementTray(_IMAGEFILE . '<br><br>' . $maxpixel . $maxsize, '<br>');
59
+        $imgtray_img        = new XoopsFormElementTray(_IMAGEFILE.'<br><br>'.$maxpixel.$maxsize, '<br>');
60 60
         $imageselect_img    = new XoopsFormSelect(sprintf(_AM_SYSTEM_AVATAR_USE_FILE, XOOPS_UPLOAD_PATH), 'avatar_file', $blank_img);
61 61
         $image_array_img    = XoopsLists::getImgListAsArray(XOOPS_UPLOAD_PATH);
62 62
         $imageselect_img->addOption("$blank_img", $blank_img);
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
                 $imageselect_img->addOption("$image_img", $image_img);
67 67
             }
68 68
         }
69
-        $imageselect_img->setExtra("onchange='showImgSelected(\"image_img\", \"avatar_file\", \"" . $uploadirectory_img . "\", \"\", \"" . XOOPS_UPLOAD_URL . "\")'");
69
+        $imageselect_img->setExtra("onchange='showImgSelected(\"image_img\", \"avatar_file\", \"".$uploadirectory_img."\", \"\", \"".XOOPS_UPLOAD_URL."\")'");
70 70
         $imgtray_img->addElement($imageselect_img, false);
71
-        $imgtray_img->addElement(new XoopsFormLabel('', "<br><img src='" . XOOPS_UPLOAD_URL . '/' . $blank_img . "' name='image_img' id='image_img' alt='' />"));
71
+        $imgtray_img->addElement(new XoopsFormLabel('', "<br><img src='".XOOPS_UPLOAD_URL.'/'.$blank_img."' name='image_img' id='image_img' alt='' />"));
72 72
         $fileseltray_img = new XoopsFormElementTray('<br>', '<br><br>');
73 73
         $fileseltray_img->addElement(new XoopsFormFile(_AM_SYSTEM_AVATAR_UPLOAD, 'avatar_file', 500000), false);
74 74
         $imgtray_img->addElement($fileseltray_img);
Please login to merge, or discard this patch.
htdocs/modules/system/class/fineimuploadhandler.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 
57 57
         $pathParts = pathinfo($this->getName());
58 58
 
59
-        $imageName = uniqid('img') . '.' . strtolower($pathParts['extension']);
60
-        $imageNicename = str_replace(array('_','-'), ' ', $pathParts['filename']);
61
-        $imagePath = XOOPS_ROOT_PATH . '/uploads/images/' . $imageName;
59
+        $imageName = uniqid('img').'.'.strtolower($pathParts['extension']);
60
+        $imageNicename = str_replace(array('_', '-'), ' ', $pathParts['filename']);
61
+        $imagePath = XOOPS_ROOT_PATH.'/uploads/images/'.$imageName;
62 62
 
63 63
         $fbinary = null;
64 64
         if ($imgcat->getVar('imgcat_storetype') === 'db') {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $image = $imageHandler->create();
75 75
 
76 76
         $image->setVar('image_nicename', $imageNicename);
77
-        $image->setVar('image_mimetype',  $mimeType);
77
+        $image->setVar('image_mimetype', $mimeType);
78 78
         $image->setVar('image_created', time());
79 79
         $image->setVar('image_display', 1);
80 80
         $image->setVar('image_weight', 0);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         if ($imgcat->getVar('imgcat_storetype') === 'db') {
83 83
             $image->setVar('image_body', $fbinary, true);
84 84
         } else {
85
-            $image->setVar('image_name', 'images/' . $imageName);
85
+            $image->setVar('image_name', 'images/'.$imageName);
86 86
         }
87 87
         if (!$imageHandler->insert($image)) {
88 88
             return array(
Please login to merge, or discard this patch.