Completed
Push — master ( 2f8aec...b781ca )
by Richard
16s
created
htdocs/modules/protector/admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-include_once __DIR__ . '/header.php';
22
+include_once __DIR__.'/header.php';
23 23
 
24 24
 $xoops = Xoops::getInstance();
25 25
 $xoops->header();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 /*$db = $xoopsDB;
29 29
 $db->prefix('protector_log');
30 30
 $rs = $db->query("SELECT count(lid) FROM " . $db->prefix('protector_log'));*/
31
-$rs = $xoops->db()->query("SELECT count(lid) FROM " . $xoops->db()->prefix('protector_log'));
31
+$rs = $xoops->db()->query("SELECT count(lid) FROM ".$xoops->db()->prefix('protector_log'));
32 32
 //$table = $xoops->db()->prefix('protector_log');
33 33
 //$rs = $xoops->db()->query($alterSql);
34 34
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 $indexAdmin->displayNavigation('index.php');
39 39
 
40 40
 $indexAdmin->addInfoBox(_MI_PROTECTOR_ADMININDEX, 'off');
41
-$indexAdmin->addInfoBoxLine(sprintf(_AM_PROTECTOR_NBALERT, '<span class="red">' . $numrows . '</span>'), 'off');
41
+$indexAdmin->addInfoBoxLine(sprintf(_AM_PROTECTOR_NBALERT, '<span class="red">'.$numrows.'</span>'), 'off');
42 42
 
43 43
 $indexAdmin->displayIndex();
44 44
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/Text.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getSize()
59 59
     {
60
-        return (int) $this->get('size');
60
+        return (int)$this->get('size');
61 61
     }
62 62
 
63 63
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getMaxlength()
69 69
     {
70
-        return (int) $this->get('maxlength');
70
+        return (int)$this->get('maxlength');
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getPlaceholder()
79 79
     {
80
-        return (string) $this->get('placeholder');
80
+        return (string)$this->get('placeholder');
81 81
     }
82 82
 
83 83
     /**
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $dataList = $this->isDatalist();
91 91
         if (!empty($dataList)) {
92
-            $this->add('list', 'list_' . $this->getName());
92
+            $this->add('list', 'list_'.$this->getName());
93 93
         }
94 94
 
95 95
         $attributes = $this->renderAttributeString();
96
-        return '<input ' . $attributes . ' ' . $this->getExtra() .' >';
96
+        return '<input '.$attributes.' '.$this->getExtra().' >';
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/ColorPicker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         if (is_array($caption)) {
38 38
             parent::__construct($caption);
39
-            $value = $this->get('value','');
39
+            $value = $this->get('value', '');
40 40
             if (empty($value)) {
41 41
                 $this->set('value', '#FFFFFF');
42 42
             }
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
         if ($xoops->theme()) {
65 65
             $xoops->theme()->addScript('include/color-picker.js');
66 66
         } else {
67
-            echo '<script type="text/javascript" src="' . $xoops->url('/include/color-picker.js') . '"></script>';
67
+            echo '<script type="text/javascript" src="'.$xoops->url('/include/color-picker.js').'"></script>';
68 68
         }
69 69
         $temp = $this->get('value', '');
70 70
         if (!empty($temp)) {
71
-            $this->set('style', 'background-color:' . $temp . ';');
71
+            $this->set('style', 'background-color:'.$temp.';');
72 72
         }
73 73
         $ret = '<div>';
74 74
         $attributes = $this->renderAttributeString();
75
-        $ret .= '<input ' . $attributes . ' ' . $this->getExtra() .' >';
75
+        $ret .= '<input '.$attributes.' '.$this->getExtra().' >';
76 76
         $ret .= '<span>';
77 77
         $ret .= '<button type="button" ';
78
-        $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" ';
78
+        $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" ';
79 79
         $ret .= 'onclick="return TCP.popup(\'';
80
-        $ret .= $xoops->url('/include/') . '\',document.getElementById(\'' . $this->getName() . '\'));">';
80
+        $ret .= $xoops->url('/include/').'\',document.getElementById(\''.$this->getName().'\'));">';
81 81
         $ret .= '<span>...</span></button>';
82 82
         $ret .= '</span></div>';
83 83
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/ButtonTray.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function getType()
60 60
     {
61
-        return (string) $this->get('type', '');
61
+        return (string)$this->get('type', '');
62 62
     }
63 63
 
64 64
     /**
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
     public function defaultRender()
70 70
     {
71 71
         $ret = '';
72
-        $class = 'class="' . $this->getClass() . '"';
72
+        $class = 'class="'.$this->getClass().'"';
73 73
 
74 74
         $attributes = $this->renderAttributeString();
75 75
 
76
-        if ((bool) $this->get(':showdelete', false)) {
77
-            $ret .= '<input type="submit"' . $class . ' name="delete" id="delete" value="'
78
-                . \XoopsLocale::A_DELETE . '" onclick="this.form.elements.op.value=\'delete\'">';
76
+        if ((bool)$this->get(':showdelete', false)) {
77
+            $ret .= '<input type="submit"'.$class.' name="delete" id="delete" value="'
78
+                . \XoopsLocale::A_DELETE.'" onclick="this.form.elements.op.value=\'delete\'">';
79 79
         }
80
-        $ret .= ' <input type="button" ' . $class . ' value="' . \XoopsLocale::A_CANCEL
80
+        $ret .= ' <input type="button" '.$class.' value="'.\XoopsLocale::A_CANCEL
81 81
             . '" onclick="history.go(-1);return true;" />'
82
-            . ' <input type="reset"' . $class . ' name="reset"  id="reset" value="' . \XoopsLocale::A_RESET . '" />'
83
-            . ' <input ' . $attributes . $this->getExtra() . ' />';
82
+            . ' <input type="reset"'.$class.' name="reset"  id="reset" value="'.\XoopsLocale::A_RESET.'" />'
83
+            . ' <input '.$attributes.$this->getExtra().' />';
84 84
         return $ret;
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/Password.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
             parent::__construct([]);
54 54
             $this->setCaption($caption);
55 55
             $this->setWithDefaults('name', $name, 'name_error');
56
-            $this->set('size', empty($size) ? 32 : (int) $size);
57
-            $this->set('maxlength', empty($maxlength) ? 64 : (int) $maxlength);
56
+            $this->set('size', empty($size) ? 32 : (int)$size);
57
+            $this->set('maxlength', empty($maxlength) ? 64 : (int)$maxlength);
58 58
             $this->setValue($value);
59 59
             $this->setWithDefaults('autocomplete', $autoComplete, 'off', ['on', 'off']);
60 60
             if (!empty($placeholder)) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getSize()
73 73
     {
74
-        return (int) $this->get('size', 32);
74
+        return (int)$this->get('size', 32);
75 75
     }
76 76
 
77 77
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getMaxlength()
83 83
     {
84
-        return (int) $this->get('maxlength', 64);
84
+        return (int)$this->get('maxlength', 64);
85 85
     }
86 86
 
87 87
     /**
@@ -92,6 +92,6 @@  discard block
 block discarded – undo
92 92
     public function defaultRender()
93 93
     {
94 94
         $attributes = $this->renderAttributeString();
95
-        return '<input ' . $attributes . $this->getExtra() .' >';
95
+        return '<input '.$attributes.$this->getExtra().' >';
96 96
     }
97 97
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/Button.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,6 +53,6 @@
 block discarded – undo
53 53
     public function defaultRender()
54 54
     {
55 55
         $attributes = $this->renderAttributeString();
56
-        return '<input ' . $attributes . $this->getExtra() .' >';
56
+        return '<input '.$attributes.$this->getExtra().' >';
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/DateSelect.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $dataList = $this->isDatalist();
61 61
         if (!empty($dataList)) {
62
-            $this->add('list', 'list_' . $this->getName());
62
+            $this->add('list', 'list_'.$this->getName());
63 63
         }
64 64
 
65 65
         $this->suppressRender(['value']);
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
         $xoops->theme()->addScript(
73 73
             '',
74 74
             '',
75
-            ' $(function() { $( "#' . $this->get('id') . '" ).datepicker({' .
76
-            'showOn: "focus", changeYear: true, constrainInput: false ' .
75
+            ' $(function() { $( "#'.$this->get('id').'" ).datepicker({'.
76
+            'showOn: "focus", changeYear: true, constrainInput: false '.
77 77
             ' }); }); '
78 78
         );
79 79
         $ret = '<div>';
80
-        $ret .= '<input ' . $attributes . ' value="' . $display_value . '" ' . $this->getExtra() .' >';
80
+        $ret .= '<input '.$attributes.' value="'.$display_value.'" '.$this->getExtra().' >';
81 81
         $ret .= '<span>';
82 82
         $ret .= '<button type="button" ';
83
-        $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" ';
84
-        $ret .= 'onclick="$( \'#' . $this->get('id') . '\' ).datepicker( \'show\' );"> ';
83
+        $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" ';
84
+        $ret .= 'onclick="$( \'#'.$this->get('id').'\' ).datepicker( \'show\' );"> ';
85 85
         $ret .= '<span>...</span></button>';
86 86
         $ret .= '</span></div>';
87 87
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/TextArea.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getRows()
59 59
     {
60
-        return (int) $this->get('rows');
60
+        return (int)$this->get('rows');
61 61
     }
62 62
 
63 63
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getCols()
69 69
     {
70
-        return (int) $this->get('cols');
70
+        return (int)$this->get('cols');
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getPlaceholder()
79 79
     {
80
-        return (string) $this->get('placeholder');
80
+        return (string)$this->get('placeholder');
81 81
     }
82 82
 
83 83
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $this->suppressRender(['value']);
91 91
         $attributes = $this->renderAttributeString();
92
-        return '<textarea ' . $attributes . ' ' . $this->getExtra() .' >'
93
-            . $this->getValue() . '</textarea>';
92
+        return '<textarea '.$attributes.' '.$this->getExtra().' >'
93
+            . $this->getValue().'</textarea>';
94 94
     }
95 95
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/Element.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
         }
67 67
     }
68 68
 	
69
-	 /**
70
-     * defaultRender - Generates default output for the element.
71
-     *
72
-     * This method is abstract and must be overwritten by the child classes.
73
-     *
74
-     * @return    string
75
-     */
69
+        /**
70
+         * defaultRender - Generates default output for the element.
71
+         *
72
+         * This method is abstract and must be overwritten by the child classes.
73
+         *
74
+         * @return    string
75
+         */
76 76
     abstract public function defaultRender();
77 77
 
78 78
     /**
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
      * @return    string
82 82
      */
83 83
     public function render(){
84
-		$xoops = \Xoops::getInstance();
85
-		return $xoops->theme()->renderer($this);
86
-	}
84
+        $xoops = \Xoops::getInstance();
85
+        return $xoops->theme()->renderer($this);
86
+    }
87 87
 
88 88
     /**
89 89
      * render attributes as a string to include in HTML output
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @return    string
82 82
      */
83
-    public function render(){
83
+    public function render() {
84 84
 		$xoops = \Xoops::getInstance();
85 85
 		return $xoops->theme()->renderer($this);
86 86
 	}
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         if (!$this->has('id')) {
103 103
             $id = $this->get('name');
104 104
             if (substr($id, -2) === '[]') {
105
-                $id = substr($id, 0, strlen($id)-2);
105
+                $id = substr($id, 0, strlen($id) - 2);
106 106
             }
107 107
             $this->set('id', $id);
108 108
         }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function getName()
162 162
     {
163
-        return (string) $this->get('name');
163
+        return (string)$this->get('name');
164 164
     }
165 165
 
166 166
     /**
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function getAccessKey()
184 184
     {
185
-        return (string) $this->get('accesskey');
185
+        return (string)$this->get('accesskey');
186 186
     }
187 187
 
188 188
     /**
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         if (!empty($access) && (false !== ($pos = strpos($str, $access)))) {
199 199
             return htmlspecialchars(substr($str, 0, $pos), ENT_QUOTES)
200 200
                 . '<span style="text-decoration: underline;">'
201
-                . htmlspecialchars(substr($str, $pos, 1), ENT_QUOTES) . '</span>'
201
+                . htmlspecialchars(substr($str, $pos, 1), ENT_QUOTES).'</span>'
202 202
                 . htmlspecialchars(substr($str, $pos + 1), ENT_QUOTES);
203 203
         }
204 204
         return htmlspecialchars($str, ENT_QUOTES);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function setClass($class)
215 215
     {
216
-        $this->add('class', (string) $class);
216
+        $this->add('class', (string)$class);
217 217
     }
218 218
 
219 219
     /**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function getPattern()
253 253
     {
254
-        return (string) $this->get('pattern', '');
254
+        return (string)$this->get('pattern', '');
255 255
     }
256 256
 
257 257
     /**
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     public function getPatternDescription()
263 263
     {
264
-        return (string) $this->get(':pattern_description', '');
264
+        return (string)$this->get(':pattern_description', '');
265 265
     }
266 266
 
267 267
     /**
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
         if (!$this->isDatalist()) {
287 287
             return '';
288 288
         }
289
-        $ret = "\n" . '<datalist id="list_' . $this->getName() . '">' . "\n";
289
+        $ret = "\n".'<datalist id="list_'.$this->getName().'">'."\n";
290 290
         foreach ($this->get('datalist') as $datalist) {
291
-            $ret .= '<option value="' . htmlspecialchars($datalist, ENT_QUOTES) . '">' . "\n";
291
+            $ret .= '<option value="'.htmlspecialchars($datalist, ENT_QUOTES).'">'."\n";
292 292
         }
293
-        $ret .= '</datalist>' . "\n";
293
+        $ret .= '</datalist>'."\n";
294 294
         return $ret;
295 295
     }
296 296
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         } else {
352 352
             if ($this->has(':pattern_description')) {
353 353
                 return htmlspecialchars(
354
-                    strip_tags($this->get('caption') . ' - ' . $this->get(':pattern_description')),
354
+                    strip_tags($this->get('caption').' - '.$this->get(':pattern_description')),
355 355
                     ENT_QUOTES
356 356
                 );
357 357
             } else {
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
         $class = $this->get('class');
537 537
         if ($class) {
538 538
             $length = strlen($pattern);
539
-            foreach ((array) $class as $i => $value) {
539
+            foreach ((array)$class as $i => $value) {
540 540
                 if (0 === strncmp($value, $pattern, $length)) {
541 541
                     return $i;
542 542
                 }
Please login to merge, or discard this patch.