Completed
Push — master ( c5aa4f...a09810 )
by Michael
02:13
created
class/adsense.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * @param  string $key
94 94
      * @param  string $format
95
-     * @return mixed
95
+     * @return string
96 96
      */
97 97
     public function getVar($key, $format = 's')
98 98
     {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     }
158 158
 
159 159
     /**
160
-     * @return mixed|string
160
+     * @return string
161 161
      */
162 162
     public function generateTag()
163 163
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31 31
 
32
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
32
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
33 33
 
34 34
 /**
35 35
  * Class SmartobjectAdsense
@@ -111,23 +111,23 @@  discard block
 block discarded – undo
111 111
     {
112 112
         global $smartobjectAdsenseHandler;
113 113
         if ($this->getVar('style', 'n') !== '') {
114
-            $ret = '<div style="' . $this->getVar('style', 'n') . '">';
114
+            $ret = '<div style="'.$this->getVar('style', 'n').'">';
115 115
         } else {
116 116
             $ret = '<div>';
117 117
         }
118 118
 
119 119
         $ret .= '<script type="text/javascript"><!--
120
-google_ad_client = "' . $this->getVar('client_id', 'n') . '";
121
-google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'] . ';
122
-google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'] . ';
123
-google_ad_format = "' . $this->getVar('format', 'n') . '";
120
+google_ad_client = "' . $this->getVar('client_id', 'n').'";
121
+google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'].';
122
+google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'].';
123
+google_ad_format = "' . $this->getVar('format', 'n').'";
124 124
 google_ad_type = "text";
125 125
 google_ad_channel ="";
126
-google_color_border = "' . $this->getVar('border_color', 'n') . '";
127
-google_color_bg = "' . $this->getVar('background_color', 'n') . '";
128
-google_color_link = "' . $this->getVar('link_color', 'n') . '";
129
-google_color_url = "' . $this->getVar('url_color', 'n') . '";
130
-google_color_text = "' . $this->getVar('text_color', 'n') . '";
126
+google_color_border = "' . $this->getVar('border_color', 'n').'";
127
+google_color_bg = "' . $this->getVar('background_color', 'n').'";
128
+google_color_link = "' . $this->getVar('link_color', 'n').'";
129
+google_color_url = "' . $this->getVar('url_color', 'n').'";
130
+google_color_text = "' . $this->getVar('text_color', 'n').'";
131 131
 //--></script>
132 132
 <script type="text/javascript"
133 133
   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function getXoopsCode()
144 144
     {
145
-        $ret = '[adsense]' . $this->getVar('tag', 'n') . '[/adsense]';
145
+        $ret = '[adsense]'.$this->getVar('tag', 'n').'[/adsense]';
146 146
 
147 147
         return $ret;
148 148
     }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function getCloneLink()
265 265
     {
266
-        $ret = '<a href="' . SMARTOBJECT_URL . 'admin/adsense.php?op=clone&adsenseid=' . $this->getVar('adsenseid') . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'editcopy.png" alt="' . _CO_SOBJECT_ADSENSE_CLONE . '" title="' . _CO_SOBJECT_ADSENSE_CLONE . '"></a>';
266
+        $ret = '<a href="'.SMARTOBJECT_URL.'admin/adsense.php?op=clone&adsenseid='.$this->getVar('adsenseid').'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'editcopy.png" alt="'._CO_SOBJECT_ADSENSE_CLONE.'" title="'._CO_SOBJECT_ADSENSE_CLONE.'"></a>';
267 267
 
268 268
         return $ret;
269 269
     }
Please login to merge, or discard this patch.
class/customtag.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
     }
148 148
 
149 149
     /**
150
-     * @return mixed|string
150
+     * @return string
151 151
      */
152 152
     public function generateTag()
153 153
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31 31
 
32
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
32
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
33 33
 
34 34
 /**
35 35
  * Class SmartobjectCustomtag
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function getXoopsCode()
124 124
     {
125
-        $ret = '[customtag]' . $this->getVar('tag', 'n') . '[/customtag]';
125
+        $ret = '[customtag]'.$this->getVar('tag', 'n').'[/customtag]';
126 126
 
127 127
         return $ret;
128 128
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function getCloneLink()
134 134
     {
135
-        $ret = '<a href="' . SMARTOBJECT_URL . 'admin/customtag.php?op=clone&customtagid=' . $this->id() . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'editcopy.png" style="vertical-align: middle;" alt="' . _CO_SOBJECT_CUSTOMTAG_CLONE . '" title="' . _CO_SOBJECT_CUSTOMTAG_CLONE . '"></a>';
135
+        $ret = '<a href="'.SMARTOBJECT_URL.'admin/customtag.php?op=clone&customtagid='.$this->id().'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'editcopy.png" style="vertical-align: middle;" alt="'._CO_SOBJECT_CUSTOMTAG_CLONE.'" title="'._CO_SOBJECT_CUSTOMTAG_CLONE.'"></a>';
136 136
 
137 137
         return $ret;
138 138
     }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             $granted_ids                   = $smartobjectPermissionsHandler->getGrantedItems('view');
298 298
 
299 299
             if ($granted_ids && count($granted_ids) > 0) {
300
-                $criteria->add(new Criteria('customtagid', '(' . implode(', ', $granted_ids) . ')', 'IN'));
300
+                $criteria->add(new Criteria('customtagid', '('.implode(', ', $granted_ids).')', 'IN'));
301 301
                 $customtagsObj = $this->getObjects($criteria, true);
302 302
                 foreach ($customtagsObj as $customtagObj) {
303 303
                     $ret[$customtagObj->getVar('name')] = $customtagObj;
Please login to merge, or discard this patch.
class/form/elements/smartformuploadelement.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 class SmartFormUploadElement extends XoopsFormFile
13 13
 {
14 14
     /**
15
-     * @param $object
16
-     * @param $key
15
+     * @param string $object
16
+     * @param string $key
17 17
      */
18 18
     public function SmartFormFileElement($object, $key)
19 19
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
      */
29 29
     public function render()
30 30
     {
31
-        return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "'>
32
-                <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . ">
33
-                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "'>";
31
+        return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."'>
32
+                <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra().">
33
+                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."'>";
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
class/form/smartobjectform.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,8 +306,8 @@
 block discarded – undo
306 306
     }
307 307
 
308 308
     /**
309
-     * @param      $form_name
310
-     * @param      $form_caption
309
+     * @param      string $form_name
310
+     * @param      string $form_caption
311 311
      * @param bool $submit_button_caption
312 312
      */
313 313
     public function createButtons($form_name, $form_caption, $submit_button_caption = false)
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 /**
16 16
  * Including the XoopsFormLoader classes
17 17
  */
18
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
19
-require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php';
20
-require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsectionclose.php';
18
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
19
+require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php';
20
+require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsectionclose.php';
21 21
 
22 22
 /**
23 23
  * SmartForm base class
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $cancel_js_action = false,
61 61
         $captcha = false
62 62
     ) {
63
-        $this->targetObject           =& $target;
63
+        $this->targetObject           = & $target;
64 64
         $this->form_fields            = $form_fields;
65 65
         $this->_cancel_js_action      = $cancel_js_action;
66 66
         $this->_captcha               = $captcha;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function addCaptcha()
90 90
     {
91
-        require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/formcaptcha.php';
91
+        require_once SMARTOBJECT_ROOT_PATH.'include/captcha/formcaptcha.php';
92 92
         $this->addElement(new XoopsFormCaptcha(), true);
93 93
     }
94 94
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function addCustomButton($name, $caption, $onclick = false)
101 101
     {
102
-        $custom_button_array    = array(
102
+        $custom_button_array = array(
103 103
             'name'    => $name,
104 104
             'caption' => $caption,
105 105
             'onclick' => $onclick
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         if ($key) {
121 121
             if ($this->targetObject->vars[$key]['readonly']) {
122 122
                 $formElement->setExtra('disabled="disabled"');
123
-                $formElement->setName($key . '-readonly');
123
+                $formElement->setName($key.'-readonly');
124 124
                 // Since this element is disable, we still want to pass it's value in the form
125 125
                 $hidden = new XoopsFormHidden($key, $this->targetObject->vars[$key]['value']);
126 126
                 $this->addElement($hidden);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $this->addElement($hidden);
132 132
                 $otherExtra      = isset($var['form_extra']) ? $var['form_extra'] : '';
133 133
                 $onchangedString = "this.form.elements.changedField.value='$key'; this.form.elements.op.value='changedField'; submit()";
134
-                $formElement->setExtra('onchange="' . $onchangedString . '"' . ' ' . $otherExtra);
134
+                $formElement->setExtra('onchange="'.$onchangedString.'"'.' '.$otherExtra);
135 135
             } else {
136 136
                 if (isset($var['form_extra'])) {
137 137
                     $formElement->setExtra($var['form_extra']);
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
             asort($group_list);
299 299
             foreach ($permissions as $permission) {
300 300
                 if ($this->targetObject->isNew()) {
301
-                    if (isset($smartModuleConfig['def_perm_' . $permission['perm_name']])) {
302
-                        $groups_value = $smartModuleConfig['def_perm_' . $permission['perm_name']];
301
+                    if (isset($smartModuleConfig['def_perm_'.$permission['perm_name']])) {
302
+                        $groups_value = $smartModuleConfig['def_perm_'.$permission['perm_name']];
303 303
                     }
304 304
                 } else {
305 305
                     $groups_value = $this->targetObject->getGroupPerm($permission['perm_name']);
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
         } else {
332 332
             $butt_create = new XoopsFormButton('', 'modify_button', $submit_button_caption, 'submit');
333 333
         }
334
-        $butt_create->setExtra('onclick="this.form.elements.op.value=\'' . $form_name . '\'"');
334
+        $butt_create->setExtra('onclick="this.form.elements.op.value=\''.$form_name.'\'"');
335 335
         $button_tray->addElement($butt_create);
336 336
 
337 337
         //creating custom buttons
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             foreach ($this->_custom_button as $custom_button) {
340 340
                 $butt_custom = new XoopsFormButton('', $custom_button['name'], $custom_button['caption'], 'submit');
341 341
                 if ($custom_button['onclick']) {
342
-                    $butt_custom->setExtra('onclick="' . $custom_button['onclick'] . '"');
342
+                    $butt_custom->setExtra('onclick="'.$custom_button['onclick'].'"');
343 343
                 }
344 344
                 $button_tray->addElement($butt_custom);
345 345
                 unset($butt_custom);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         // creating the "cancel" button
350 350
         $butt_cancel = new XoopsFormButton('', 'cancel_button', _CO_SOBJECT_CANCEL, 'button');
351 351
         if ($this->_cancel_js_action) {
352
-            $butt_cancel->setExtra('onclick="' . $this->_cancel_js_action . '"');
352
+            $butt_cancel->setExtra('onclick="'.$this->_cancel_js_action.'"');
353 353
         } else {
354 354
             $butt_cancel->setExtra('onclick="history.go(-1)"');
355 355
         }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     {
368 368
         switch ($controlName) {
369 369
             case 'check':
370
-                require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php';
370
+                require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformcheckelement.php';
371 371
                 $control    = $this->targetObject->getControl($key);
372 372
                 $controlObj = new SmartFormCheckElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key));
373 373
                 $controlObj->addOptionArray($control['options']);
@@ -434,38 +434,38 @@  discard block
 block discarded – undo
434 434
                 break;
435 435
 
436 436
             case 'urllink':
437
-                require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformurllinkelement.php';
437
+                require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformurllinkelement.php';
438 438
 
439 439
                 return new SmartFormUrlLinkElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getUrlLinkObj($key));
440 440
                 break;
441 441
 
442 442
             case 'richfile':
443
-                require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformrichfileelement.php';
443
+                require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformrichfileelement.php';
444 444
 
445 445
                 return new SmartFormRichFileElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getFileObj($key));
446 446
                 break;
447 447
             case 'section':
448
-                require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php';
448
+                require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php';
449 449
 
450 450
                 return new SmartFormSection($key, $this->targetObject->vars[$key]['form_caption']);
451 451
                 break;
452 452
 
453 453
             default:
454
-                $classname = 'SmartForm' . ucfirst($controlName) . 'Element';
454
+                $classname = 'SmartForm'.ucfirst($controlName).'Element';
455 455
                 if (!class_exists($classname)) {
456
-                    if (file_exists(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php')) {
457
-                        require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php';
456
+                    if (file_exists(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php')) {
457
+                        require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php';
458 458
                     } else {
459 459
                         // perhaps this is a control created by the module
460 460
                         $moduleName             = $this->targetObject->handler->_moduleName;
461
-                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath . 'class/form/elements/';
462
-                        $classname              = ucfirst($moduleName) . ucfirst($controlName) . 'Element';
463
-                        $classFileName          = strtolower($classname) . '.php';
461
+                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath.'class/form/elements/';
462
+                        $classname              = ucfirst($moduleName).ucfirst($controlName).'Element';
463
+                        $classFileName          = strtolower($classname).'.php';
464 464
 
465
-                        if (file_exists($moduleFormElementsPath . $classFileName)) {
466
-                            require_once $moduleFormElementsPath . $classFileName;
465
+                        if (file_exists($moduleFormElementsPath.$classFileName)) {
466
+                            require_once $moduleFormElementsPath.$classFileName;
467 467
                         } else {
468
-                            trigger_error($classname . ' Not found', E_USER_WARNING);
468
+                            trigger_error($classname.' Not found', E_USER_WARNING);
469 469
 
470 470
                             return new XoopsFormLabel(); //Empty object
471 471
                         }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         $editor_configs['height'] = '400px';
535 535
 
536 536
         $dhtml            = true;
537
-        $xoopseditorclass = XOOPS_ROOT_PATH . '/class/xoopsform/formeditor.php';
537
+        $xoopseditorclass = XOOPS_ROOT_PATH.'/class/xoopsform/formeditor.php';
538 538
 
539 539
         if (file_exists($xoopseditorclass)) {
540 540
             require_once $xoopseditorclass;
@@ -544,8 +544,8 @@  discard block
 block discarded – undo
544 544
 
545 545
                 case 'tiny':
546 546
                     if (!$xoops22) {
547
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
548
-                            require_once XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php';
547
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
548
+                            require_once XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php';
549 549
                             $editor = new XoopsFormTinyTextArea(array(
550 550
                                                                     'caption' => $caption,
551 551
                                                                     'name'    => $name,
@@ -575,8 +575,8 @@  discard block
 block discarded – undo
575 575
 
576 576
                 case 'fckeditor':
577 577
                     if (!$xoops22) {
578
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php')) {
579
-                            require_once XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php';
578
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php')) {
579
+                            require_once XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php';
580 580
                             $editor = new XoopsFormFckeditor(array(
581 581
                                                                  'caption' => $caption,
582 582
                                                                  'name'    => $name,
@@ -598,8 +598,8 @@  discard block
 block discarded – undo
598 598
 
599 599
                 case 'inbetween':
600 600
                     if (!$xoops22) {
601
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
602
-                            require_once XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php';
601
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
602
+                            require_once XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php';
603 603
                             $editor = new XoopsFormInbetweenTextArea(array(
604 604
                                                                          'caption' => $caption,
605 605
                                                                          'name'    => $name,
@@ -621,8 +621,8 @@  discard block
 block discarded – undo
621 621
 
622 622
                 case 'koivi':
623 623
                     if (!$xoops22) {
624
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) {
625
-                            require_once XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php';
624
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php')) {
625
+                            require_once XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php';
626 626
                             $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px');
627 627
                         } else {
628 628
                             if ($dhtml) {
@@ -638,8 +638,8 @@  discard block
 block discarded – undo
638 638
 
639 639
                 case 'spaw':
640 640
                     if (!$xoops22) {
641
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php')) {
642
-                            require_once XOOPS_ROOT_PATH . '/class/spaw/formspaw.php';
641
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php')) {
642
+                            require_once XOOPS_ROOT_PATH.'/class/spaw/formspaw.php';
643 643
                             $editor = new XoopsFormSpaw($caption, $name, $value);
644 644
                         }
645 645
                     } else {
@@ -649,8 +649,8 @@  discard block
 block discarded – undo
649 649
 
650 650
                 case 'htmlarea':
651 651
                     if (!$xoops22) {
652
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
653
-                            require_once XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php';
652
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')) {
653
+                            require_once XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php';
654 654
                             $editor = new XoopsFormHtmlarea($caption, $name, $value);
655 655
                         }
656 656
                     } else {
@@ -686,10 +686,10 @@  discard block
 block discarded – undo
686 686
         $size         = $multiple ? 5 : 1;
687 687
         $theme_select = new XoopsFormSelect($var['form_caption'], $key, $this->targetObject->getVar($key), $size, $multiple);
688 688
 
689
-        $handle  = opendir(XOOPS_THEME_PATH . '/');
689
+        $handle  = opendir(XOOPS_THEME_PATH.'/');
690 690
         $dirlist = array();
691 691
         while (false !== ($file = readdir($handle))) {
692
-            if (is_dir(XOOPS_THEME_PATH . '/' . $file) && !preg_match("/^[.]{1,2}$/", $file)
692
+            if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/", $file)
693 693
                 && strtolower($file) !== 'cvs') {
694 694
                 $dirlist[$file] = $file;
695 695
             }
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
     {
712 712
         foreach ($this->_elements as $eleObj) {
713 713
             if ($eleObj->getName() == $keyname) {
714
-                $ret =& $eleObj;
714
+                $ret = & $eleObj;
715 715
                 break;
716 716
             }
717 717
         }
@@ -728,9 +728,9 @@  discard block
 block discarded – undo
728 728
     {
729 729
         $required = $this->getRequired();
730 730
         $ret      = "
731
-            <form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "' onsubmit='return xoopsFormValidate_" . $this->getName() . "(this);'" . $this->getExtra() . ">
731
+            <form name='" . $this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."' onsubmit='return xoopsFormValidate_".$this->getName()."(this);'".$this->getExtra().">
732 732
             <table width='100%' class='outer' cellspacing='1'>
733
-            <tr><th colspan='2'>" . $this->getTitle() . '</th></tr>
733
+            <tr><th colspan='2'>" . $this->getTitle().'</th></tr>
734 734
         ';
735 735
         $hidden   = '';
736 736
         $class    = 'even';
@@ -739,11 +739,11 @@  discard block
 block discarded – undo
739 739
                 $ret .= $ele;
740 740
             } elseif (!$ele->isHidden()) {
741 741
                 //$class = ( $class == 'even' ) ? 'odd': 'even';
742
-                $ret .= "<tr id='" . $ele->getName() . "' valign='top' align='left'><td class='head'>" . $ele->getCaption();
742
+                $ret .= "<tr id='".$ele->getName()."' valign='top' align='left'><td class='head'>".$ele->getCaption();
743 743
                 if ($ele->getDescription() !== '') {
744
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $ele->getDescription() . '</span>';
744
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
745 745
                 }
746
-                $ret .= "</td><td class='$class'>" . $ele->render() . "</td></tr>\n";
746
+                $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>\n";
747 747
             } else {
748 748
                 $hidden .= $ele->render();
749 749
             }
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
             'name'       => $this->getName(),
790 790
             'action'     => $this->getAction(),
791 791
             'method'     => $this->getMethod(),
792
-            'extra'      => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '(this);"' . $this->getExtra(),
792
+            'extra'      => 'onsubmit="return xoopsFormValidate_'.$this->getName().'(this);"'.$this->getExtra(),
793 793
             'javascript' => $js,
794 794
             'elements'   => $elements
795 795
         ));
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
         }
808 808
         $myts     = MyTextSanitizer::getInstance();
809 809
         $formname = $this->getName();
810
-        $js       .= "function xoopsFormValidate_{$formname}(myform) {";
810
+        $js .= "function xoopsFormValidate_{$formname}(myform) {";
811 811
         // First, output code to check required elements
812 812
         $elements = $this->getRequired();
813 813
         foreach ($elements as $elt) {
@@ -858,15 +858,15 @@  discard block
 block discarded – undo
858 858
                         window.alert(\"{$eltmsg}\"); myform['{$eltname}'][0].focus(); return false; }\n";
859 859
                 }
860 860
             } else {
861
-                $js .= "if ( myform.{$eltname}.value == \"\" ) " . "{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
861
+                $js .= "if ( myform.{$eltname}.value == \"\" ) "."{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
862 862
             }
863 863
         }
864 864
         // Now, handle custom validation code
865
-        $elements =& $this->getElements(true);
865
+        $elements = & $this->getElements(true);
866 866
         foreach ($elements as $elt) {
867 867
             if (method_exists($elt, 'renderValidationJS') && strtolower(get_class($elt)) !== 'xoopsformcheckbox') {
868 868
                 if ($eltjs = $elt->renderValidationJS()) {
869
-                    $js .= $eltjs . "\n";
869
+                    $js .= $eltjs."\n";
870 870
                 }
871 871
             }
872 872
         }
Please login to merge, or discard this patch.
class/member.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
      * Creates a random number with a specified number of $digits
238 238
      *
239 239
      * @param  int $digits number of digits
240
-     * @return return int random number
240
+     * @return string int random number
241 241
      * @author xHelp Team
242 242
      *
243 243
      * @access public
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
21
-require_once XOOPS_ROOT_PATH . '/kernel/user.php';
22
-require_once XOOPS_ROOT_PATH . '/kernel/group.php';
23
-require_once XOOPS_ROOT_PATH . '/kernel/member.php';
21
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
22
+require_once XOOPS_ROOT_PATH.'/kernel/group.php';
23
+require_once XOOPS_ROOT_PATH.'/kernel/member.php';
24 24
 
25 25
 /**
26 26
  * XOOPS member handler class.
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
             // send some notifications
142 142
             $xoopsMailer = xoops_getMailer();
143 143
             $xoopsMailer->useMail();
144
-            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/mail_template');
144
+            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/mail_template');
145 145
             $xoopsMailer->setTemplate('smartobject_notify_user_added_by_admin.tpl');
146 146
             $xoopsMailer->assign('XOOPS_USER_PASSWORD', $password);
147 147
             $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
148 148
             $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
149
-            $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
149
+            $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
150 150
             $xoopsMailer->assign('NAME', $userObj->getVar('name'));
151 151
             $xoopsMailer->assign('UNAME', $userObj->getVar('uname'));
152 152
             $xoopsMailer->setToUsers($userObj);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         if (strlen($name) > 0) {
193 193
             $name = explode(' ', trim($name));
194 194
             if (count($name) > 1) {
195
-                $basename = strtolower(substr($name[0], 0, 1) . $name[count($name) - 1]);
195
+                $basename = strtolower(substr($name[0], 0, 1).$name[count($name) - 1]);
196 196
             } else {
197 197
                 $basename = strtolower($name[0]);
198 198
             }
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
209 209
         while ($i < $count) {
210 210
             $num = $this->genRandNumber();
211 211
             if ($onbasename < 0 && $hasbasename) {
212
-                $names[] = xoops_substr($basename, 0, 58, '') . $num;
212
+                $names[] = xoops_substr($basename, 0, 58, '').$num;
213 213
             } else {
214
-                $names[] = xoops_substr($emailname, 0, 58, '') . $num;
214
+                $names[] = xoops_substr($emailname, 0, 58, '').$num;
215 215
             }
216 216
             $i          = count($names);
217 217
             $onbasename = ~$onbasename;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     {
254 254
         static $randCalled = false;
255 255
         if (!$randCalled) {
256
-            mt_srand((double)microtime() * 1000000);
256
+            mt_srand((double) microtime() * 1000000);
257 257
             $randCalled = true;
258 258
         }
259 259
     }
Please login to merge, or discard this patch.
class/smartdbupdater.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     }
142 142
 
143 143
     /**
144
-     * @param $field
144
+     * @param string $field
145 145
      * @return bool
146 146
      */
147 147
     public function fieldExists($field)
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
     /**
624 624
      * Use to update a table
625 625
      *
626
-     * @param object $table {@link SmartDbTable} that will be updated
626
+     * @param SmartDbTable $table {@link SmartDbTable} that will be updated
627 627
      *
628 628
      * @see SmartDbTable
629 629
      *
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
     /**
726 726
      * @param $module
727 727
      * @param $item
728
-     * @return bool
728
+     * @return false|null
729 729
      */
730 730
     public function upgradeObjectItem($module, $item)
731 731
     {
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
  */
19 19
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
20 20
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
21
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
21
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
22 22
 }
23 23
 /**
24 24
  * Include the language constants for the SmartObjectDBUpdater
25 25
  */
26 26
 global $xoopsConfig;
27
-$common_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/smartdbupdater.php';
27
+$common_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/smartdbupdater.php';
28 28
 if (!file_exists($common_file)) {
29
-    $common_file = SMARTOBJECT_ROOT_PATH . 'language/english/smartdbupdater.php';
29
+    $common_file = SMARTOBJECT_ROOT_PATH.'language/english/smartdbupdater.php';
30 30
 }
31 31
 include $common_file;
32 32
 
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
     public function getExistingFieldsArray()
124 124
     {
125 125
         global $xoopsDB;
126
-        $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $this->name());
126
+        $result = $xoopsDB->query('SHOW COLUMNS FROM '.$this->name());
127 127
         while ($existing_field = $xoopsDB->fetchArray($result)) {
128 128
             $fields[$existing_field['Field']] = $existing_field['Type'];
129 129
             if ($existing_field['Null'] !== 'YES') {
130 130
                 $fields[$existing_field['Field']] .= ' NOT NULL';
131 131
             }
132 132
             if ($existing_field['Extra']) {
133
-                $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
133
+                $fields[$existing_field['Field']] .= ' '.$existing_field['Extra'];
134 134
             }
135 135
             if (!($existing_field['Default'] === null)
136 136
                 && ($existing_field['Default']
137 137
                     || $existing_field['Default'] === ''
138 138
                     || $existing_field['Default'] == 0)) {
139
-                $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
139
+                $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
140 140
             }
141 141
         }
142 142
 
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
             $query = sprintf('INSERT INTO %s VALUES (%s)', $this->name(), $data);
223 223
             $ret   = $xoopsDB->query($query);
224 224
             if (!$ret) {
225
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>';
225
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>';
226 226
             } else {
227
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>';
227
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>';
228 228
             }
229 229
         }
230 230
 
@@ -376,13 +376,13 @@  discard block
 block discarded – undo
376 376
     {
377 377
         global $xoopsDB;
378 378
         $query = $this->getStructure();
379
-        $query = 'CREATE TABLE `' . $this->name() . '` (' . $query . ") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
379
+        $query = 'CREATE TABLE `'.$this->name().'` ('.$query.") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
380 380
         //xoops_debug($query);
381 381
         $ret = $xoopsDB->query($query);
382 382
         if (!$ret) {
383
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
383
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
384 384
         } else {
385
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>';
385
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>';
386 386
         }
387 387
 
388 388
         return $ret;
@@ -400,11 +400,11 @@  discard block
 block discarded – undo
400 400
         $query = sprintf('DROP TABLE %s', $this->name());
401 401
         $ret   = $xoopsDB->query($query);
402 402
         if (!$ret) {
403
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
403
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
404 404
 
405 405
             return false;
406 406
         } else {
407
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>';
407
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>';
408 408
 
409 409
             return true;
410 410
         }
@@ -430,9 +430,9 @@  discard block
 block discarded – undo
430 430
             $ret   = $ret && $xoopsDB->query($query);
431 431
             if ($alteredField['showerror']) {
432 432
                 if (!$ret) {
433
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
433
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).' ('.$xoopsDB->error().')<br>';
434 434
                 } else {
435
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>';
435
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>';
436 436
                 }
437 437
             }
438 438
         }
@@ -455,9 +455,9 @@  discard block
 block discarded – undo
455 455
             //echo $query;
456 456
             $ret = $ret && $xoopsDB->query($query);
457 457
             if (!$ret) {
458
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>';
458
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>';
459 459
             } else {
460
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>';
460
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>';
461 461
             }
462 462
         }
463 463
 
@@ -478,9 +478,9 @@  discard block
 block discarded – undo
478 478
             $query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']);
479 479
             $ret   = $ret && $xoopsDB->query($query);
480 480
             if (!$ret) {
481
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
481
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
482 482
             } else {
483
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
483
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
484 484
             }
485 485
         }
486 486
 
@@ -501,9 +501,9 @@  discard block
 block discarded – undo
501 501
             //echo $query."<br>";
502 502
             $ret = $ret && $xoopsDB->query($query);
503 503
             if (!$ret) {
504
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
504
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
505 505
             } else {
506
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
506
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
507 507
             }
508 508
         }
509 509
 
@@ -524,9 +524,9 @@  discard block
 block discarded – undo
524 524
             $query = sprintf('ALTER TABLE %s DROP %s', $this->name(), $droppedField);
525 525
             $ret   = $ret && $xoopsDB->query($query);
526 526
             if (!$ret) {
527
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
527
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).' ('.$xoopsDB->error().')<br>';
528 528
             } else {
529
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>';
529
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>';
530 530
             }
531 531
         }
532 532
 
@@ -613,11 +613,11 @@  discard block
 block discarded – undo
613 613
         $query = sprintf('ALTER TABLE %s RENAME %s', $from, $to);
614 614
         $ret   = $xoopsDB->query($query);
615 615
         if (!$ret) {
616
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>';
616
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>';
617 617
 
618 618
             return false;
619 619
         } else {
620
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>';
620
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>';
621 621
 
622 622
             return true;
623 623
         }
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
             return false;
738 738
         }
739 739
 
740
-        $table      = new SmartDbTable($module . '_' . $item);
740
+        $table      = new SmartDbTable($module.'_'.$item);
741 741
         $object     = $moduleHandler->create();
742 742
         $objectVars = $object->getVars();
743 743
 
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 ";
759 759
                 }
760 760
             }
761
-            $structure .= 'PRIMARY KEY  (`' . $moduleHandler->keyName . '`)
761
+            $structure .= 'PRIMARY KEY  (`'.$moduleHandler->keyName.'`)
762 762
 ';
763 763
             $table->setStructure($structure);
764 764
             if (!$this->updateTable($table)) {
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 
819 819
         ob_start();
820 820
 
821
-        $table = new SmartDbTable($dirname . '_meta');
821
+        $table = new SmartDbTable($dirname.'_meta');
822 822
         if (!$table->exists()) {
823 823
             $table->setStructure("
824 824
               `metakey` varchar(50) NOT NULL default '',
@@ -836,20 +836,20 @@  discard block
 block discarded – undo
836 836
         if (!$dbVersion) {
837 837
             $dbVersion = 0;
838 838
         }
839
-        $newDbVersion = constant(strtoupper($dirname . '_db_version')) ?: 0;
840
-        echo 'Database version: ' . $dbVersion . '<br>';
841
-        echo 'New database version: ' . $newDbVersion . '<br>';
839
+        $newDbVersion = constant(strtoupper($dirname.'_db_version')) ?: 0;
840
+        echo 'Database version: '.$dbVersion.'<br>';
841
+        echo 'New database version: '.$newDbVersion.'<br>';
842 842
 
843 843
         if ($newDbVersion > $dbVersion) {
844 844
             for ($i = $dbVersion + 1; $i <= $newDbVersion; ++$i) {
845
-                $upgrade_function = $dirname . '_db_upgrade_' . $i;
845
+                $upgrade_function = $dirname.'_db_upgrade_'.$i;
846 846
                 if (function_exists($upgrade_function)) {
847 847
                     $upgrade_function();
848 848
                 }
849 849
             }
850 850
         }
851 851
 
852
-        echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>';
852
+        echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>';
853 853
 
854 854
         // if there is a function to execute for this DB version, let's do it
855 855
         //$function_
Please login to merge, or discard this patch.
class/smartexport.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     /**
198 198
      * @param $val
199 199
      * @param $separator
200
-     * @param $trimFunction
200
+     * @param false|string $trimFunction
201 201
      * @return mixed|string
202 202
      */
203 203
     public function valToCsvHelper($val, $separator, $trimFunction)
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     }
249 249
 
250 250
     /**
251
-     * @param $content
251
+     * @param string $content
252 252
      */
253 253
     public function saveExportFile($content)
254 254
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             }
237 237
         } while (false);
238 238
         if ($needQuote) {
239
-            $val = '"' . $val . '"';
239
+            $val = '"'.$val.'"';
240 240
         }
241 241
 
242 242
         return $val;
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
             case 'csv':
251 251
                 $separator      = isset($this->options['separator']) ? $this->options['separator'] : ';';
252 252
                 $firstRow       = implode($separator, $this->data['columnsHeaders']);
253
-                $exportFileData .= $firstRow . "\r\n";
253
+                $exportFileData .= $firstRow."\r\n";
254 254
 
255 255
                 foreach ($this->data['rows'] as $cols) {
256
-                    $exportFileData .= $this->arrayToCsvString($cols, $separator) . "\r\n";
256
+                    $exportFileData .= $this->arrayToCsvString($cols, $separator)."\r\n";
257 257
                 }
258 258
                 break;
259 259
         }
@@ -278,19 +278,19 @@  discard block
 block discarded – undo
278 278
     public function saveCsv($content)
279 279
     {
280 280
         if (!$this->filepath) {
281
-            $this->filepath = XOOPS_UPLOAD_PATH . '/';
281
+            $this->filepath = XOOPS_UPLOAD_PATH.'/';
282 282
         }
283 283
         if (!$this->filename) {
284 284
             $this->filename .= time();
285 285
             $this->filename .= '.csv';
286 286
         }
287 287
 
288
-        $fullFileName = $this->filepath . $this->filename;
288
+        $fullFileName = $this->filepath.$this->filename;
289 289
 
290 290
         if (!$handle = fopen($fullFileName, 'a+')) {
291
-            trigger_error('Unable to open ' . $fullFileName, E_USER_WARNING);
291
+            trigger_error('Unable to open '.$fullFileName, E_USER_WARNING);
292 292
         } elseif (fwrite($handle, $content) === false) {
293
-            trigger_error('Unable to write in ' . $fullFileName, E_USER_WARNING);
293
+            trigger_error('Unable to write in '.$fullFileName, E_USER_WARNING);
294 294
         } else {
295 295
             $mimeType  = 'text/csv';
296 296
             $file      = strrev($this->filename);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             } else {
301 301
                 $file_name = $temp_name;
302 302
             }
303
-            $fullFileName = $this->filepath . stripslashes(trim($this->filename));
303
+            $fullFileName = $this->filepath.stripslashes(trim($this->filename));
304 304
 
305 305
             if (ini_get('zlib.output_compression')) {
306 306
                 ini_set('zlib.output_compression', 'Off');
@@ -311,10 +311,10 @@  discard block
 block discarded – undo
311 311
             header('Cache-Control: private', false);
312 312
             header('Content-Transfer-Encoding: binary');
313 313
             if (isset($mimeType)) {
314
-                header('Content-Type: ' . $mimeType);
314
+                header('Content-Type: '.$mimeType);
315 315
             }
316 316
 
317
-            header('Content-Disposition: attachment; filename=' . $file_name);
317
+            header('Content-Disposition: attachment; filename='.$file_name);
318 318
 
319 319
             if (isset($mimeType) && false !== strpos($mimeType, 'text/')) {
320 320
                 $fp = fopen($fullFileName, 'r');
Please login to merge, or discard this patch.
class/smartmetagen.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
 
167 167
     /**
168
-     * @param $keywords
168
+     * @param string|boolean $keywords
169 169
      */
170 170
     public function setKeywords($keywords)
171 171
     {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-     * @param $categoryPath
176
+     * @param boolean $categoryPath
177 177
      */
178 178
     public function setCategoryPath($categoryPath)
179 179
     {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     }
183 183
 
184 184
     /**
185
-     * @param $description
185
+     * @param boolean $description
186 186
      */
187 187
     public function setDescription($description)
188 188
     {
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
     }
243 243
 
244 244
     /**
245
-     * @param $text
246
-     * @param $minChar
245
+     * @param string $text
246
+     * @param integer $minChar
247 247
      * @return array
248 248
      */
249 249
     public function findMetaKeywords($text, $minChar)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -354,7 +354,7 @@
 block discarded – undo
354 354
     public function createMetaKeywords()
355 355
     {
356 356
         global $xoopsModuleConfig;
357
-        $keywords = $this->findMetaKeywords($this->_original_title . ' ' . $this->_description, $this->_minChar);
357
+        $keywords = $this->findMetaKeywords($this->_original_title.' '.$this->_description, $this->_minChar);
358 358
         if (isset($xoopsModuleConfig) && isset($xoopsModuleConfig['moduleMetaKeywords'])
359 359
             && $xoopsModuleConfig['moduleMetaKeywords'] !== '') {
360 360
             $moduleKeywords = explode(',', $xoopsModuleConfig['moduleMetaKeywords']);
Please login to merge, or discard this patch.
class/smartobjectlink.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * @access public
62 62
      * @param  string $key    key of the object's variable to be returned
63 63
      * @param  string $format format to use for the output
64
-     * @return mixed  formatted value of the variable
64
+     * @return integer  formatted value of the variable
65 65
      */
66 66
     public function getVar($key, $format = 's')
67 67
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // -------------------------------------------------------------------------//
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
31
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
32 32
 
33 33
 /**
34 34
  * Class SmartobjectLink
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
             return $ret;
119 119
         } else {
120
-            $ret = '<a href="' . $ret . '" alt="' . $this->getVar('link', 'e') . '" title="' . $this->getVar('link', 'e') . '">' . _AM_SOBJECT_SENT_LINKS_GOTO . '</a>';
120
+            $ret = '<a href="'.$ret.'" alt="'.$this->getVar('link', 'e').'" title="'.$this->getVar('link', 'e').'">'._AM_SOBJECT_SENT_LINKS_GOTO.'</a>';
121 121
 
122 122
             return $ret;
123 123
         }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function getViewItemLink()
130 130
     {
131
-        $ret = '<a href="' . SMARTOBJECT_URL . 'admin/link.php?op=view&linkid=' . $this->getVar('linkid') . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'mail_find.png" alt="' . _AM_SOBJECT_SENT_LINK_VIEW . '" title="' . _AM_SOBJECT_SENT_LINK_VIEW . '"></a>';
131
+        $ret = '<a href="'.SMARTOBJECT_URL.'admin/link.php?op=view&linkid='.$this->getVar('linkid').'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'mail_find.png" alt="'._AM_SOBJECT_SENT_LINK_VIEW.'" title="'._AM_SOBJECT_SENT_LINK_VIEW.'"></a>';
132 132
 
133 133
         return $ret;
134 134
     }
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
         if ($this->getVar('from_uid')) {
144 144
             $user = smart_getLinkedUnameFromId($this->getVar('from_uid'));
145 145
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
146
-                $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
146
+                $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
147 147
             }
148 148
         } else {
149
-            $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
149
+            $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
150 150
         }
151 151
 
152 152
         return $user;
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
         if ($this->getVar('to_uid')) {
176 176
             $user = smart_getLinkedUnameFromId($this->getVar('to_uid'));
177 177
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
178
-                $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
178
+                $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
179 179
             }
180 180
         } else {
181
-            $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
181
+            $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
182 182
         }
183 183
 
184 184
         return $user;
Please login to merge, or discard this patch.