Completed
Push — master ( 2f8aec...b781ca )
by Richard
16s
created
xoops_lib/Xoops/Html/Button.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function render()
43 43
     {
44 44
         $this->suppressRender(['value']);
45
-        $tag = '<button ' . $this->renderAttributeString() . '>'
45
+        $tag = '<button '.$this->renderAttributeString().'>'
46 46
             . $this->get('value', '')
47 47
             . '</button>';
48 48
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/XoopsCode.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -42,113 +42,113 @@
 block discarded – undo
42 42
 
43 43
         $shortcodes->addShortcode(
44 44
             'siteurl',
45
-            function ($attributes, $content, $tagName) use ($shortcodes) {
45
+            function($attributes, $content, $tagName) use ($shortcodes) {
46 46
                 $url = ltrim($attributes[0], '=');
47 47
                 $url = \Xoops::getInstance()->url($url);
48
-                $newcontent = '<a href="' .$url. '">' . $shortcodes->process($content) . '</a>';
48
+                $newcontent = '<a href="'.$url.'">'.$shortcodes->process($content).'</a>';
49 49
                 return $newcontent;
50 50
             }
51 51
         );
52 52
 
53 53
         $shortcodes->addShortcode(
54 54
             'url',
55
-            function ($attributes, $content, $tagName) use ($shortcodes) {
55
+            function($attributes, $content, $tagName) use ($shortcodes) {
56 56
                 $url = ltrim($attributes[0], '=');
57 57
                 $url = \Xoops::getInstance()->url($url);
58
-                $newcontent = '<a href="' .$url. '">' . $shortcodes->process($content) . '</a>';
58
+                $newcontent = '<a href="'.$url.'">'.$shortcodes->process($content).'</a>';
59 59
                 return $newcontent;
60 60
             }
61 61
         );
62 62
 
63 63
         $shortcodes->addShortcode(
64 64
             'color',
65
-            function ($attributes, $content, $tagName) use ($shortcodes) {
65
+            function($attributes, $content, $tagName) use ($shortcodes) {
66 66
                 $color = ltrim($attributes[0], '=');
67
-                $color = preg_match('/^[a-f0-9]{3}$|^[a-f0-9]{6}$/i', $color) ? '#' . $color : $color;
68
-                $newcontent = '<span style="color: ' .$color. '">' . $shortcodes->process($content) . '</span>';
67
+                $color = preg_match('/^[a-f0-9]{3}$|^[a-f0-9]{6}$/i', $color) ? '#'.$color : $color;
68
+                $newcontent = '<span style="color: '.$color.'">'.$shortcodes->process($content).'</span>';
69 69
                 return $newcontent;
70 70
             }
71 71
         );
72 72
 
73 73
         $shortcodes->addShortcode(
74 74
             'size',
75
-            function ($attributes, $content, $tagName) use ($shortcodes) {
75
+            function($attributes, $content, $tagName) use ($shortcodes) {
76 76
                 $size = ltrim($attributes[0], '=');
77
-                $newcontent = '<span style="font-size: ' .$size. '">' . $shortcodes->process($content) . '</span>';
77
+                $newcontent = '<span style="font-size: '.$size.'">'.$shortcodes->process($content).'</span>';
78 78
                 return $newcontent;
79 79
             }
80 80
         );
81 81
 
82 82
         $shortcodes->addShortcode(
83 83
             'font',
84
-            function ($attributes, $content, $tagName) use ($shortcodes) {
84
+            function($attributes, $content, $tagName) use ($shortcodes) {
85 85
                 $font = ltrim($attributes[0], '=');
86
-                $newcontent = '<span style="font-family: ' .$font. '">' . $shortcodes->process($content) . '</span>';
86
+                $newcontent = '<span style="font-family: '.$font.'">'.$shortcodes->process($content).'</span>';
87 87
                 return $newcontent;
88 88
             }
89 89
         );
90 90
 
91 91
         $shortcodes->addShortcode(
92 92
             'email',
93
-            function ($attributes, $content, $tagName) {
93
+            function($attributes, $content, $tagName) {
94 94
                 $content = trim($content);
95
-                $newcontent = '<a href="mailto:' . $content . '">' . $content . '</a>';
95
+                $newcontent = '<a href="mailto:'.$content.'">'.$content.'</a>';
96 96
                 return $newcontent;
97 97
             }
98 98
         );
99 99
 
100 100
         $shortcodes->addShortcode(
101 101
             'b',
102
-            function ($attributes, $content, $tagName) use ($shortcodes) {
103
-                $newcontent = '<strong>' . $shortcodes->process($content) . '</strong>';
102
+            function($attributes, $content, $tagName) use ($shortcodes) {
103
+                $newcontent = '<strong>'.$shortcodes->process($content).'</strong>';
104 104
                 return $newcontent;
105 105
             }
106 106
         );
107 107
 
108 108
         $shortcodes->addShortcode(
109 109
             'i',
110
-            function ($attributes, $content, $tagName) use ($shortcodes) {
111
-                $newcontent = '<em>' . $shortcodes->process($content) . '</em>';
110
+            function($attributes, $content, $tagName) use ($shortcodes) {
111
+                $newcontent = '<em>'.$shortcodes->process($content).'</em>';
112 112
                 return $newcontent;
113 113
             }
114 114
         );
115 115
 
116 116
         $shortcodes->addShortcode(
117 117
             'u',
118
-            function ($attributes, $content, $tagName) use ($shortcodes) {
119
-                $newcontent = '<u>' . $shortcodes->process($content) . '</u>';
118
+            function($attributes, $content, $tagName) use ($shortcodes) {
119
+                $newcontent = '<u>'.$shortcodes->process($content).'</u>';
120 120
                 return $newcontent;
121 121
             }
122 122
         );
123 123
 
124 124
         $shortcodes->addShortcode(
125 125
             'd',
126
-            function ($attributes, $content, $tagName) use ($shortcodes) {
127
-                $newcontent = '<del>' . $shortcodes->process($content) . '</del>';
126
+            function($attributes, $content, $tagName) use ($shortcodes) {
127
+                $newcontent = '<del>'.$shortcodes->process($content).'</del>';
128 128
                 return $newcontent;
129 129
             }
130 130
         );
131 131
 
132 132
         $shortcodes->addShortcode(
133 133
             'center',
134
-            function ($attributes, $content, $tagName) use ($shortcodes) {
135
-                $newcontent = '<div style="text-align: center;">' . $shortcodes->process($content) . '</div>';
134
+            function($attributes, $content, $tagName) use ($shortcodes) {
135
+                $newcontent = '<div style="text-align: center;">'.$shortcodes->process($content).'</div>';
136 136
                 return $newcontent;
137 137
             }
138 138
         );
139 139
 
140 140
         $shortcodes->addShortcode(
141 141
             'left',
142
-            function ($attributes, $content, $tagName) use ($shortcodes) {
143
-                $newcontent = '<div style="text-align: left;">' . $shortcodes->process($content) . '</div>';
142
+            function($attributes, $content, $tagName) use ($shortcodes) {
143
+                $newcontent = '<div style="text-align: left;">'.$shortcodes->process($content).'</div>';
144 144
                 return $newcontent;
145 145
             }
146 146
         );
147 147
 
148 148
         $shortcodes->addShortcode(
149 149
             'right',
150
-            function ($attributes, $content, $tagName) use ($shortcodes) {
151
-                $newcontent = '<div style="text-align: right;">' . $shortcodes->process($content) . '</div>';
150
+            function($attributes, $content, $tagName) use ($shortcodes) {
151
+                $newcontent = '<div style="text-align: right;">'.$shortcodes->process($content).'</div>';
152 152
                 return $newcontent;
153 153
             }
154 154
         );
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/DhtmlTextArea.php 1 patch
Spacing   +42 added lines, -43 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 }
144 144
             } else {
145 145
                 list ($class, $path) = $this->htmlEditor;
146
-                include_once \XoopsBaseConfig::get('root-path') . $path;
146
+                include_once \XoopsBaseConfig::get('root-path').$path;
147 147
                 if (class_exists($class)) {
148 148
                     $this->htmlEditor = new $class($options);
149 149
                 }
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
 
173 173
         $xoops = \Xoops::getInstance();
174 174
 
175
-        $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : '');
175
+        $extra = ($this->getExtra() != '' ? " ".$this->getExtra() : '');
176 176
         $ret = "";
177 177
         // actions
178
-        $ret .= $this->xoopsCodeControls() . "<br />\n";
178
+        $ret .= $this->xoopsCodeControls()."<br />\n";
179 179
         // fonts
180 180
         $ret .= $this->typographyControls();
181 181
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         $this->suppressRender(['value']);
185 185
         $attributes = $this->renderAttributeString();
186 186
 
187
-        $ret .= '<textarea ' . $attributes . $extra . '>' . $this->getValue() . "</textarea>\n";
187
+        $ret .= '<textarea '.$attributes.$extra.'>'.$this->getValue()."</textarea>\n";
188 188
 
189 189
         if (empty($this->skipPreview)) {
190 190
             if (!$xoops->theme()) {
@@ -192,15 +192,15 @@  discard block
 block discarded – undo
192 192
             } else {
193 193
                 $xoops->theme()->addScript('media/xoops/image.js', array('type' => 'text/javascript'));
194 194
             }
195
-            $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . "class='btn btn-sm btn-default' value='" . \XoopsLocale::A_PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . (int)($this->doHtml) . ", '" . $xoops->security()->createToken() . "')\"" . " />";
196
-            $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $this->getName() . "_hidden_data'>" . \XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT . "</div>" . "</fieldset>" . "</div>";
195
+            $button = "<input id='".$this->getName()."_preview_button' "."type='button' "."class='btn btn-sm btn-default' value='".\XoopsLocale::A_PREVIEW."' "."onclick=\"form_instantPreview('".XOOPS_URL."', '".$this->getName()."','".XOOPS_URL."/images', ".(int)($this->doHtml).", '".$xoops->security()->createToken()."')\""." />";
196
+            $ret .= "<br />"."<div id='".$this->getName()."_hidden' style='display: block;'> "."<fieldset>"."<legend>".$button."</legend>"."<div id='".$this->getName()."_hidden_data'>".\XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT."</div>"."</fieldset>"."</div>";
197 197
         }
198 198
         // Load javascript
199 199
         if (empty($js_loaded)) {
200 200
             $javascript = (($this->js)
201
-                ? '<script type="text/javascript">' . $this->js . '</script>'
202
-                : '') . '<script type="text/javascript" src="' . \XoopsBaseConfig::get('url') . '/include/formdhtmltextarea.js"></script>';
203
-            $ret = $javascript . $ret;
201
+                ? '<script type="text/javascript">'.$this->js.'</script>'
202
+                : '').'<script type="text/javascript" src="'.\XoopsBaseConfig::get('url').'/include/formdhtmltextarea.js"></script>';
203
+            $ret = $javascript.$ret;
204 204
             $js_loaded = true;
205 205
         }
206 206
         return $ret;
@@ -332,63 +332,63 @@  discard block
 block discarded – undo
332 332
 
333 333
         $fontStr = '<div class="row"><div class="col-md-12"><div class="btn-group" role="toolbar">';
334 334
         $fontStr .= '<div class="btn-group">'
335
-            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::SIZE .'"'
335
+            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::SIZE.'"'
336 336
             . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
337 337
             . '<span class = "glyphicon glyphicon-text-height"></span><span class="caret"></span></button>'
338 338
             . '<ul class="dropdown-menu">';
339 339
         $localeFontSizes = \XoopsLocale::getFontSizes();
340 340
         foreach ($localeFontSizes as $value => $name) {
341
-            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'size\', \'' . $value . '\', \''
342
-                . $textarea_id . '\', \'' . $hiddentext . '\');">' . $name . '</a></li>';
341
+            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'size\', \''.$value.'\', \''
342
+                . $textarea_id.'\', \''.$hiddentext.'\');">'.$name.'</a></li>';
343 343
         }
344 344
         $fontStr .= '</ul></div>';
345 345
 
346 346
         $fontStr .= '<div class="btn-group">'
347
-            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::FONT .'"'
347
+            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::FONT.'"'
348 348
             . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
349 349
             . '<span class = "glyphicon glyphicon-font"></span><span class="caret"></span></button>'
350 350
             . '<ul class="dropdown-menu">';
351 351
         //. _FONT . '&nbsp;&nbsp;<span class="caret"></span></button><ul class="dropdown-menu">';
352 352
         foreach ($fontarray as $font) {
353
-            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'font\', \'' . $font . '\', \''
354
-                . $textarea_id . '\', \'' . $hiddentext . '\');">' . $font . '</a></li>';
353
+            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'font\', \''.$font.'\', \''
354
+                . $textarea_id.'\', \''.$hiddentext.'\');">'.$font.'</a></li>';
355 355
         }
356 356
         $fontStr .= '</ul></div>';
357 357
 
358 358
         $fontStr .= '<div class="btn-group">'
359
-            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::COLOR .'"'
359
+            . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::COLOR.'"'
360 360
             . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
361 361
             . '<span class = "glyphicon glyphicon-text-color"></span><span class="caret"></span></button>'
362 362
             . '<ul class="dropdown-menu">';
363 363
         //. _COLOR . '&nbsp;&nbsp;<span class="caret"></span></button><ul class="dropdown-menu">';
364 364
         foreach ($colorArray as $color => $hex) {
365
-            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'color\', \'' . $hex . '\', \''
366
-                . $textarea_id . '\', \'' . $hiddentext . '\');">'
367
-                . '<span style="color:#' . $hex . ';">' . $color .'</span></a></li>';
365
+            $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'color\', \''.$hex.'\', \''
366
+                . $textarea_id.'\', \''.$hiddentext.'\');">'
367
+                . '<span style="color:#'.$hex.';">'.$color.'</span></a></li>';
368 368
         }
369 369
         $fontStr .= '</ul></div>';
370 370
         $fontStr .= '</div>';
371 371
 
372 372
         //$styleStr = "<div class='row'><div class='col-md-12'>";
373 373
         $styleStr  = "<div class='btn-group' role='group'>";
374
-        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::BOLD . "' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>";
375
-        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::ITALIC . "' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>";
376
-        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::UNDERLINE . "' aria-label='Left Align'>" . '<span class="fa fa-underline"></span></button>';
377
-        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::LINE_THROUGH . "' aria-label='Left Align'>" . '<span class="fa fa-strikethrough"></span></button>';
374
+        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::BOLD."' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>";
375
+        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::ITALIC."' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>";
376
+        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::UNDERLINE."' aria-label='Left Align'>".'<span class="fa fa-underline"></span></button>';
377
+        $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::LINE_THROUGH."' aria-label='Left Align'>".'<span class="fa fa-strikethrough"></span></button>';
378 378
         $styleStr .= "</div>";
379 379
 
380 380
         $alignStr = "<div class='btn-group' role='group'>";
381
-        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::LEFT . "' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>";
382
-        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::CENTER . "' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>";
383
-        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::RIGHT . "' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>";
381
+        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::LEFT."' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>";
382
+        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::CENTER."' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>";
383
+        $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::RIGHT."' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>";
384 384
         $alignStr .= "</div>";
385 385
 
386 386
         $fontStr .= "&nbsp;{$styleStr}&nbsp;{$alignStr}&nbsp;\n";
387 387
 
388 388
         $fontStr .= "<button type='button' class='btn btn-default btn-sm' onclick=\"XoopsCheckLength('"
389
-            . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '"
390
-            . \XoopsLocale::F_CURRENT_TEXT_LENGTH . "', '" . \XoopsLocale::MAXIMUM_LENGTH . "');\" title='"
391
-            . \XoopsLocale::CHECK_TEXT_LENGTH . "'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>";
389
+            . $this->getName()."', '".@$this->configs['maxlength']."', '"
390
+            . \XoopsLocale::F_CURRENT_TEXT_LENGTH."', '".\XoopsLocale::MAXIMUM_LENGTH."');\" title='"
391
+            . \XoopsLocale::CHECK_TEXT_LENGTH."'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>";
392 392
         $fontStr .= "</div></div>";
393 393
 
394 394
         return $fontStr;
@@ -405,24 +405,23 @@  discard block
 block discarded – undo
405 405
         $hiddentext = $this->hiddenText;
406 406
 
407 407
         $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">";
408
-        $fontStr .= "var _editor_dialog = ''" . "+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'";
409
-        $fontStr .= "+ '<option value=\'SIZE\'>" . \XoopsLocale::SIZE . "</option>'";
408
+        $fontStr .= "var _editor_dialog = ''"."+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'";
409
+        $fontStr .= "+ '<option value=\'SIZE\'>".\XoopsLocale::SIZE."</option>'";
410 410
         $localeFontSizes = \XoopsLocale::getFontSizes();
411 411
         foreach ($localeFontSizes as $_val => $_name) {
412 412
             $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'";
413 413
         }
414 414
         $fontStr .= " + '</select> '";
415 415
         $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'";
416
-        $fontStr .= "+ '<option value=\'FONT\'>" . \XoopsLocale::FONT . "</option>'";
416
+        $fontStr .= "+ '<option value=\'FONT\'>".\XoopsLocale::FONT."</option>'";
417 417
         $localeFonts = \XoopsLocale::getFonts();
418
-        $fontarray = !empty($localeFonts) ? $localeFonts :
419
-            array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler");
418
+        $fontarray = !empty($localeFonts) ? $localeFonts : array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler");
420 419
         foreach ($fontarray as $font) {
421 420
             $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'";
422 421
         }
423 422
         $fontStr .= " + '</select> '";
424 423
         $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'";
425
-        $fontStr .= "+ '<option value=\'COLOR\'>" . \XoopsLocale::COLOR . "</option>';";
424
+        $fontStr .= "+ '<option value=\'COLOR\'>".\XoopsLocale::COLOR."</option>';";
426 425
         $fontStr .= "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF');
427 426
             for(var i = 0; i < _color_array.length; i ++) {
428 427
                 for(var j = 0; j < _color_array.length; j ++) {
@@ -436,15 +435,15 @@  discard block
 block discarded – undo
436 435
 
437 436
         $fontStr .= "document.write(_editor_dialog); </script>";
438 437
 
439
-        $styleStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/bold.gif' alt='" . \XoopsLocale::BOLD . "' title='" . \XoopsLocale::BOLD . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
440
-        $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/italic.gif' alt='" . \XoopsLocale::ITALIC . "' title='" . \XoopsLocale::ITALIC . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
441
-        $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/underline.gif' alt='" . \XoopsLocale::UNDERLINE . "' title='" . \XoopsLocale::UNDERLINE . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/>&nbsp;";
442
-        $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/linethrough.gif' alt='" . \XoopsLocale::LINE_THROUGH . "' title='" . \XoopsLocale::LINE_THROUGH . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
438
+        $styleStr = "<img src='".\XoopsBaseConfig::get('url')."/images/bold.gif' alt='".\XoopsLocale::BOLD."' title='".\XoopsLocale::BOLD."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
439
+        $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/italic.gif' alt='".\XoopsLocale::ITALIC."' title='".\XoopsLocale::ITALIC."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
440
+        $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/underline.gif' alt='".\XoopsLocale::UNDERLINE."' title='".\XoopsLocale::UNDERLINE."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/>&nbsp;";
441
+        $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/linethrough.gif' alt='".\XoopsLocale::LINE_THROUGH."' title='".\XoopsLocale::LINE_THROUGH."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
443 442
 
444
-        $alignStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignleft.gif' alt='" . \XoopsLocale::LEFT . "' title='" . \XoopsLocale::LEFT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
445
-        $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/aligncenter.gif' alt='" . \XoopsLocale::CENTER . "' title='" . \XoopsLocale::CENTER . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
446
-        $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignright.gif' alt='" . \XoopsLocale::RIGHT . "' title='" . \XoopsLocale::RIGHT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
447
-        $fontStr = $fontStr . "<br />\n{$styleStr}&nbsp;{$alignStr}&nbsp;\n";
443
+        $alignStr = "<img src='".\XoopsBaseConfig::get('url')."/images/alignleft.gif' alt='".\XoopsLocale::LEFT."' title='".\XoopsLocale::LEFT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
444
+        $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/aligncenter.gif' alt='".\XoopsLocale::CENTER."' title='".\XoopsLocale::CENTER."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
445
+        $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/alignright.gif' alt='".\XoopsLocale::RIGHT."' title='".\XoopsLocale::RIGHT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' />&nbsp;";
446
+        $fontStr = $fontStr."<br />\n{$styleStr}&nbsp;{$alignStr}&nbsp;\n";
448 447
         return $fontStr;
449 448
     }
450 449
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Service/Manager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * Service Mode constant - Multiple mode where all located services will be
49 49
      * dispatched in priority order.
50 50
      */
51
-    const MODE_MULTIPLE  = 8;
51
+    const MODE_MULTIPLE = 8;
52 52
 
53 53
     /**
54 54
      * Provider priorities
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
         } else {
248 248
             $xoops = \Xoops::getInstance();
249 249
             $provider = new Provider($this, $service);
250
-            $event = 'core.service.locate.' . $service;
250
+            $event = 'core.service.locate.'.$service;
251 251
             // locate service provider(s)
252 252
             // In response to trigger message, the contract implementor should register()
253 253
             $xoops->events()->triggerEvent($event, $provider);
254 254
             // get reference to the list of providers and prioritize it.
255
-            $registered=$provider->getRegistered();
255
+            $registered = $provider->getRegistered();
256 256
             if (count($registered)) {
257 257
                 $choices = $this->providerPrefs[$service] ?? [];
258 258
                 foreach ($registered as $p) {
Please login to merge, or discard this patch.
htdocs/modules/system/class/module.php 1 patch
Spacing   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -107,20 +107,20 @@  discard block
 block discarded – undo
107 107
                     $module->setInfo('warning_update', true);
108 108
                 }
109 109
                 if (XoopsLoad::fileExists(
110
-                    \XoopsBaseConfig::get('root-path') . '/modules/' . $module->getVar('dirname') . '/icons/logo_small.png'
110
+                    \XoopsBaseConfig::get('root-path').'/modules/'.$module->getVar('dirname').'/icons/logo_small.png'
111 111
                 )) {
112 112
                     $module->setInfo(
113 113
                         'logo_small',
114
-                        \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/icons/logo_small.png'
114
+                        \XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/icons/logo_small.png'
115 115
                     );
116 116
                 } else {
117
-                    $module->setInfo('logo_small', \XoopsBaseConfig::get('url') . '/media/xoops/images/icons/16/default.png');
117
+                    $module->setInfo('logo_small', \XoopsBaseConfig::get('url').'/media/xoops/images/icons/16/default.png');
118 118
                 }
119 119
                 $module->setInfo('version', round($module->getVar('version') / 100, 2));
120 120
                 $module->setInfo('update', XoopsLocale::formatTimestamp($module->getVar('last_update'), 's'));
121 121
                 $module->setInfo(
122 122
                     'link_admin',
123
-                    \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/' . $module->getInfo('adminindex')
123
+                    \XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex')
124 124
                 );
125 125
 
126 126
                 if ($module->getVar('isactive')) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 ) {
143 143
                     $module->setInfo(
144 144
                         'link_pref',
145
-                        \XoopsBaseConfig::get('url') . '/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod='
145
+                        \XoopsBaseConfig::get('url').'/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod='
146 146
                         . $module->getVar('mid')
147 147
                     );
148 148
                 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $ret = array();
168 168
         $i = 0;
169 169
         foreach ($this->modulesList as $file) {
170
-            if (XoopsLoad::fileExists(\XoopsBaseConfig::get('root-path') . '/modules/' . $file . '/xoops_version.php')) {
170
+            if (XoopsLoad::fileExists(\XoopsBaseConfig::get('root-path').'/modules/'.$file.'/xoops_version.php')) {
171 171
                 clearstatcache();
172 172
                 $file = trim($file);
173 173
                 if (!in_array($file, $this->modulesDirnames)) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $this->addTemporaryAutoloader($module);
216 216
             $install_script = $module->getInfo('onInstall');
217 217
             if ($install_script && trim($install_script) != '') {
218
-                XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($install_script)));
218
+                XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($install_script)));
219 219
             }
220 220
             $func = "xoops_module_pre_install_{$mod}";
221 221
             // If pre install function is defined, execute
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 $schema_file = $module->getInfo('schema');
237 237
                 $sql_file = $module->getInfo('sqlfile');
238 238
                 if (!empty($schema_file)) {
239
-                    $schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file;
239
+                    $schema_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$schema_file;
240 240
                     if (!XoopsLoad::fileExists($schema_file_path)) {
241 241
                         $this->error[] =
242 242
                             sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>");
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                 } elseif (is_array($sql_file) && !empty($sql_file[\XoopsBaseConfig::get('db-type')])) {
250 250
                     $xoops->deprecated('Install SQL files are deprecated since 2.6.0. Convert to portable Schemas');
251 251
 
252
-                    $sql_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $sql_file[\XoopsBaseConfig::get('db-type')];
252
+                    $sql_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$sql_file[\XoopsBaseConfig::get('db-type')];
253 253
                     if (!XoopsLoad::fileExists($sql_file_path)) {
254 254
                         $this->error[] =
255 255
                             sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$sql_file_path}</strong>");
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
                             // [4] contains unprefixed table name
267 267
                             $prefixed_query = SqlUtility::prefixQuery($piece, $xoops->db()->prefix());
268 268
                             if (!$prefixed_query) {
269
-                                $this->error[]['sub'] = '<span class="red">' . sprintf(
269
+                                $this->error[]['sub'] = '<span class="red">'.sprintf(
270 270
                                     XoopsLocale::EF_INVALID_SQL,
271
-                                    '<strong>' . $piece . '</strong>'
272
-                                ) . '</span>';
271
+                                    '<strong>'.$piece.'</strong>'
272
+                                ).'</span>';
273 273
                                 break;
274 274
                             }
275 275
                             // check if the table name is reserved
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
                                     $result = $xoops->db()->query($prefixed_query[0]);
280 280
                                 } catch (Exception $e) {
281 281
                                     $xoops->events()->triggerEvent('core.exception', $e);
282
-                                    $result=false;
282
+                                    $result = false;
283 283
                                 }
284 284
 
285 285
                                 if (!$result) {
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
                                     if (!in_array($prefixed_query[4], $created_tables)) {
290 290
                                         $this->trace[]['sub'] = sprintf(
291 291
                                             XoopsLocale::SF_TABLE_CREATED,
292
-                                            '<strong>' . $xoops->db()->prefix($prefixed_query[4]) . '</strong>'
292
+                                            '<strong>'.$xoops->db()->prefix($prefixed_query[4]).'</strong>'
293 293
                                         );
294 294
                                         $created_tables[] = $prefixed_query[4];
295 295
                                     } else {
296 296
                                         $this->trace[]['sub'] = sprintf(
297 297
                                             XoopsLocale::SF_DATA_INSERTED_TO_TABLE,
298
-                                            '<strong>' . $xoops->db()->prefix($prefixed_query[4]) . '</strong>'
298
+                                            '<strong>'.$xoops->db()->prefix($prefixed_query[4]).'</strong>'
299 299
                                         );
300 300
                                     }
301 301
                                 }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                                 // the table name is reserved, so halt the installation
304 304
                                 $this->error[]['sub'] = sprintf(
305 305
                                     SystemLocale::EF_TABLE_IS_RESERVED,
306
-                                    '<strong>' . $prefixed_query[4] . '</strong>'
306
+                                    '<strong>'.$prefixed_query[4].'</strong>'
307 307
                                 );
308 308
                                 break;
309 309
                             }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
                         if (count($this->error) > 0) {
314 314
                             foreach ($created_tables as $table) {
315 315
                                 try {
316
-                                    $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($table));
316
+                                    $xoops->db()->query('DROP TABLE '.$xoops->db()->prefix($table));
317 317
                                 } catch (Exception $e) {
318 318
                                     $xoops->events()->triggerEvent('core.exception', $e);
319 319
                                 }
@@ -328,25 +328,25 @@  discard block
 block discarded – undo
328 328
                 if (!$module_handler->insertModule($module)) {
329 329
                     $this->error[] = sprintf(
330 330
                         XoopsLocale::EF_NOT_INSERTED_TO_DATABASE,
331
-                        '<strong>' . $module->getVar('name') . '</strong>'
331
+                        '<strong>'.$module->getVar('name').'</strong>'
332 332
                     );
333 333
                     foreach ($created_tables as $ct) {
334 334
                         try {
335
-                            $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($ct));
335
+                            $xoops->db()->query('DROP TABLE '.$xoops->db()->prefix($ct));
336 336
                         } catch (Exception $e) {
337 337
                             $xoops->events()->triggerEvent('core.exception', $e);
338 338
                         }
339 339
                     }
340
-                    $this->error[] = sprintf(XoopsLocale::EF_NOT_INSTALLED, "<strong>" . $module->name() . "</strong>");
340
+                    $this->error[] = sprintf(XoopsLocale::EF_NOT_INSTALLED, "<strong>".$module->name()."</strong>");
341 341
                     $this->error[] = XoopsLocale::C_ERRORS;
342 342
                     unset($module);
343 343
                     unset($created_tables);
344 344
                     return false;
345 345
                 }
346 346
                 unset($created_tables);
347
-                $this->trace[] = XoopsLocale::S_DATA_INSERTED . sprintf(
347
+                $this->trace[] = XoopsLocale::S_DATA_INSERTED.sprintf(
348 348
                     SystemLocale::F_MODULE_ID,
349
-                    '<strong>' . $module->getVar('mid') . '</strong>'
349
+                    '<strong>'.$module->getVar('mid').'</strong>'
350 350
                 );
351 351
                 $xoops->db()->beginTransaction();
352 352
                 // install Templates
@@ -378,14 +378,14 @@  discard block
 block discarded – undo
378 378
                         $mperm->setVar('gperm_name', 'module_admin');
379 379
                         $mperm->setVar('gperm_modid', 1);
380 380
                         if (!$gperm_handler->insert($mperm)) {
381
-                            $this->trace[]['sub'] = '<span class="red">' . sprintf(
381
+                            $this->trace[]['sub'] = '<span class="red">'.sprintf(
382 382
                                 SystemLocale::EF_GROUP_ID_ADMIN_ACCESS_RIGHT_NOT_ADDED,
383
-                                '<strong>' . $mygroup . '</strong>'
384
-                            ) . '</span>';
383
+                                '<strong>'.$mygroup.'</strong>'
384
+                            ).'</span>';
385 385
                         } else {
386 386
                             $this->trace[]['sub'] = sprintf(
387 387
                                 SystemLocale::SF_GROUP_ID_ADMIN_ACCESS_RIGHT_ADDED,
388
-                                '<strong>' . $mygroup . '</strong>'
388
+                                '<strong>'.$mygroup.'</strong>'
389 389
                             );
390 390
                         }
391 391
                         unset($mperm);
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
                     $mperm->setVar('gperm_name', 'module_read');
397 397
                     $mperm->setVar('gperm_modid', 1);
398 398
                     if (!$gperm_handler->insert($mperm)) {
399
-                        $this->trace[]['sub'] = '<span class="red">' . sprintf(
399
+                        $this->trace[]['sub'] = '<span class="red">'.sprintf(
400 400
                             SystemLocale::EF_GROUP_ID_USER_ACCESS_RIGHT_NOT_ADDED,
401
-                            '<strong>' . $mygroup . '</strong>'
402
-                        ) . '</span>';
401
+                            '<strong>'.$mygroup.'</strong>'
402
+                        ).'</span>';
403 403
                     } else {
404 404
                         $this->trace[]['sub'] = sprintf(
405 405
                             SystemLocale::SF_GROUP_ID_USER_ACCESS_RIGHT_ADDED,
406
-                            '<strong>' . $mygroup . '</strong>'
406
+                            '<strong>'.$mygroup.'</strong>'
407 407
                         );
408 408
                     }
409 409
                     unset($mperm);
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
                         $bperm->setVar('gperm_modid', 1);
416 416
                         if (!$gperm_handler->insert($bperm)) {
417 417
                             $this->trace[]['sub'] = '<span class="red">'
418
-                            . SystemLocale::E_BLOCK_ACCESS_NOT_ADDED . ' Block ID: <strong>'
419
-                            . $blc . '</strong> Group ID: <strong>' . $mygroup . '</strong></span>';
418
+                            . SystemLocale::E_BLOCK_ACCESS_NOT_ADDED.' Block ID: <strong>'
419
+                            . $blc.'</strong> Group ID: <strong>'.$mygroup.'</strong></span>';
420 420
                         } else {
421 421
                             $this->trace[]['sub'] = SystemLocale::S_BLOCK_ACCESS_ADDED
422
-                                . sprintf(SystemLocale::F_BLOCK_ID, "<strong>" . $blc . "</strong>")
423
-                                . sprintf(SystemLocale::F_GROUP_ID, "<strong>" . $mygroup . "</strong>");
422
+                                . sprintf(SystemLocale::F_BLOCK_ID, "<strong>".$blc."</strong>")
423
+                                . sprintf(SystemLocale::F_GROUP_ID, "<strong>".$mygroup."</strong>");
424 424
                         }
425 425
                         unset($bperm);
426 426
                     }
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 
445 445
                 $this->trace[] = sprintf(
446 446
                     XoopsLocale::SF_INSTALLED,
447
-                    '<strong>' . $module->getVar('name', 's') . '</strong>'
447
+                    '<strong>'.$module->getVar('name', 's').'</strong>'
448 448
                 );
449 449
                 unset($blocks);
450 450
 
@@ -456,8 +456,8 @@  discard block
 block discarded – undo
456 456
         } else {
457 457
             $this->error[] = sprintf(
458 458
                 XoopsLocale::EF_NOT_INSTALLED,
459
-                '<strong>' . $mod . '</strong>'
460
-            ) . "&nbsp;" . XoopsLocale::C_ERRORS;
459
+                '<strong>'.$mod.'</strong>'
460
+            )."&nbsp;".XoopsLocale::C_ERRORS;
461 461
             return false;
462 462
         }
463 463
         return false;
@@ -480,22 +480,22 @@  discard block
 block discarded – undo
480 480
         if ($module->getVar('dirname') === 'system') {
481 481
             $this->error[] = sprintf(
482 482
                 XoopsLocale::EF_NOT_UNINSTALLED,
483
-                '<strong>' . $module->getVar('name') . '</strong>'
484
-            ) . "&nbsp;" . XoopsLocale::C_ERRORS;
485
-            $this->error[] = " - " . SystemLocale::E_SYSTEM_MODULE_CANNOT_BE_DEACTIVATED;
483
+                '<strong>'.$module->getVar('name').'</strong>'
484
+            )."&nbsp;".XoopsLocale::C_ERRORS;
485
+            $this->error[] = " - ".SystemLocale::E_SYSTEM_MODULE_CANNOT_BE_DEACTIVATED;
486 486
             return false;
487 487
         } elseif ($module->getVar('dirname') == $xoops->getConfig('startpage')) {
488 488
             $this->error[] = sprintf(
489 489
                 XoopsLocale::EF_NOT_UNINSTALLED,
490
-                '<strong>' . $module->getVar('name') . '</strong>'
491
-            ) . "&nbsp;" . XoopsLocale::C_ERRORS;
492
-            $this->error[] = " - " . SystemLocale::E_THIS_MODULE_IS_SET_AS_DEFAULT_START_PAGE;
490
+                '<strong>'.$module->getVar('name').'</strong>'
491
+            )."&nbsp;".XoopsLocale::C_ERRORS;
492
+            $this->error[] = " - ".SystemLocale::E_THIS_MODULE_IS_SET_AS_DEFAULT_START_PAGE;
493 493
             return false;
494 494
         } else {
495 495
             // Load module specific install script if any
496 496
             $uninstall_script = $module->getInfo('onUninstall');
497 497
             if ($uninstall_script && trim($uninstall_script) != '') {
498
-                XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($uninstall_script)));
498
+                XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($uninstall_script)));
499 499
             }
500 500
             $func = "xoops_module_pre_uninstall_{$mod}";
501 501
             // If pre uninstall function is defined, execute
@@ -505,8 +505,8 @@  discard block
 block discarded – undo
505 505
                     $this->error[] = sprintf(XoopsLocale::EF_NOT_EXECUTED, $func);
506 506
                     $this->error[] = sprintf(
507 507
                         XoopsLocale::EF_NOT_UNINSTALLED,
508
-                        '<strong>' . $module->getVar('name') . '</strong>'
509
-                    ) . "&nbsp;" . XoopsLocale::C_ERRORS;
508
+                        '<strong>'.$module->getVar('name').'</strong>'
509
+                    )."&nbsp;".XoopsLocale::C_ERRORS;
510 510
                     $this->error = array_merge($this->error, $module->getErrors());
511 511
                     return false;
512 512
                 } else {
@@ -540,13 +540,13 @@  discard block
 block discarded – undo
540 540
                             $toSchema->dropTable($xoops->db()->prefix($table));
541 541
                             $this->trace[]['sub'] = sprintf(
542 542
                                 XoopsLocale::SF_TABLE_DROPPED,
543
-                                '<strong>' . $xoops->db()->prefix($table) . '</strong>'
543
+                                '<strong>'.$xoops->db()->prefix($table).'</strong>'
544 544
                             );
545 545
                         } else {
546
-                            $this->trace[]['sub'] = '<span class="red">' . sprintf(
546
+                            $this->trace[]['sub'] = '<span class="red">'.sprintf(
547 547
                                 XoopsLocale::EF_TABLE_DROP_NOT_ALLOWED,
548
-                                '<strong>' . $xoops->db()->prefix($table) . '</strong>'
549
-                            ) . '</span>';
548
+                                '<strong>'.$xoops->db()->prefix($table).'</strong>'
549
+                            ).'</span>';
550 550
                         }
551 551
                     }
552 552
                     $synchronizer = new SingleDatabaseSynchronizer($xoops->db());
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
                 // delete permissions if any
557 557
                 $gperm_handler = $xoops->getHandlerGroupPermission();
558 558
                 if (false === $gperm_handler->deleteByModule($module->getVar('mid'))) {
559
-                    $this->trace[] = '<span class="red">' . SystemLocale::E_GROUP_PERMISSIONS_NOT_DELETED . '</span>';
559
+                    $this->trace[] = '<span class="red">'.SystemLocale::E_GROUP_PERMISSIONS_NOT_DELETED.'</span>';
560 560
                 } else {
561 561
                     $this->trace[] = SystemLocale::S_GROUP_PERMISSIONS_DELETED;
562 562
                 }
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
                 $this->deleteConfigs($module);
566 566
 
567 567
                 // execute module specific install script if any
568
-                $func = 'xoops_module_uninstall_' . $mod;
568
+                $func = 'xoops_module_uninstall_'.$mod;
569 569
                 if (function_exists($func)) {
570 570
                     $result = $func($module);
571 571
                     if (!$result) {
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                 }
579 579
                 $this->trace[] = sprintf(
580 580
                     XoopsLocale::SF_UNINSTALLED,
581
-                    '<strong>' . $module->getVar('name') . '</strong>'
581
+                    '<strong>'.$module->getVar('name').'</strong>'
582 582
                 );
583 583
                 $xoops->events()->triggerEvent('system.module.uninstall', $module);
584 584
                 return $module;
@@ -609,14 +609,14 @@  discard block
 block discarded – undo
609 609
         $this->addTemporaryAutoloader($module);
610 610
 
611 611
         if (!$module_handler->insertModule($module)) {
612
-            $this->error[] = sprintf(XoopsLocale::EF_NOT_UPDATED, "<strong>" . $module->getVar('name') . "</strong>");
612
+            $this->error[] = sprintf(XoopsLocale::EF_NOT_UPDATED, "<strong>".$module->getVar('name')."</strong>");
613 613
             return false;
614 614
         } else {
615 615
             // execute module specific preupdate script if any
616 616
             $update_script = $module->getInfo('onUpdate');
617 617
             if (false != $update_script && trim($update_script) != '') {
618
-                XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($update_script)));
619
-                $func = 'xoops_module_pre_update_' . $mod;
618
+                XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($update_script)));
619
+                $func = 'xoops_module_pre_update_'.$mod;
620 620
                 if (function_exists($func)) {
621 621
                     $result = $func($module, $prev_version);
622 622
                     if (!$result) {
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
             // update schema
633 633
             $schema_file = $module->getInfo('schema');
634 634
             if (!empty($schema_file)) {
635
-                $schema_file_path = \XoopsBaseConfig::get('root-path') . '/modules/' . $mod . '/' . $schema_file;
635
+                $schema_file_path = \XoopsBaseConfig::get('root-path').'/modules/'.$mod.'/'.$schema_file;
636 636
                 if (!XoopsLoad::fileExists($schema_file_path)) {
637 637
                     $this->error[] =
638 638
                         sprintf(SystemLocale::EF_SQL_FILE_NOT_FOUND, "<strong>{$schema_file}</strong>");
@@ -665,8 +665,8 @@  discard block
 block discarded – undo
665 665
             // execute module specific update script if any
666 666
             $update_script = $module->getInfo('onUpdate');
667 667
             if (false != $update_script && trim($update_script) != '') {
668
-                XoopsLoad::loadFile($xoops->path('modules/' . $mod . '/' . trim($update_script)));
669
-                $func = 'xoops_module_update_' . $mod;
668
+                XoopsLoad::loadFile($xoops->path('modules/'.$mod.'/'.trim($update_script)));
669
+                $func = 'xoops_module_update_'.$mod;
670 670
                 if (function_exists($func)) {
671 671
                     $result = $func($module, $prev_version);
672 672
                     if (!$result) {
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
                     }
679 679
                 }
680 680
             }
681
-            $this->trace[] = sprintf(XoopsLocale::SF_UPDATED, '<strong>' . $module->getVar('name', 's') . '</strong>');
681
+            $this->trace[] = sprintf(XoopsLocale::SF_UPDATED, '<strong>'.$module->getVar('name', 's').'</strong>');
682 682
             return $module;
683 683
         }
684 684
     }
@@ -699,10 +699,10 @@  discard block
 block discarded – undo
699 699
         switch ($type) {
700 700
             case 'blocks':
701 701
             case 'admin':
702
-                $path = $xoops->path('modules/' . $dirname . '/templates/' . $type . '/' . $template);
702
+                $path = $xoops->path('modules/'.$dirname.'/templates/'.$type.'/'.$template);
703 703
                 break;
704 704
             default:
705
-                $path = $xoops->path('modules/' . $dirname . '/templates/' . $template);
705
+                $path = $xoops->path('modules/'.$dirname.'/templates/'.$template);
706 706
                 break;
707 707
         }
708 708
         if (!XoopsLoad::fileExists($path)) {
@@ -755,39 +755,39 @@  discard block
 block discarded – undo
755 755
                     $tplfile->setVar('tpl_file', $tpl['file']);
756 756
                     $tplfile->setVar('tpl_desc', $tpl['description']);
757 757
                     if (!$tplfile_handler->insertTpl($tplfile)) {
758
-                        $this->trace[]['sub'] = '<span class="red">' . sprintf(
758
+                        $this->trace[]['sub'] = '<span class="red">'.sprintf(
759 759
                             SystemLocale::EF_TEMPLATE_NOT_ADDED_TO_DATABASE,
760
-                            '<strong>' . $tpl['file'] . '</strong>'
761
-                        ) . '</span>';
760
+                            '<strong>'.$tpl['file'].'</strong>'
761
+                        ).'</span>';
762 762
                     } else {
763 763
                         $newid = $tplfile->getVar('tpl_id');
764 764
                         $this->trace[]['sub'] = sprintf(
765 765
                             SystemLocale::SF_TEMPLATE_ADDED,
766
-                            '<strong>' . $tpl['file'] . '</strong>'
766
+                            '<strong>'.$tpl['file'].'</strong>'
767 767
                         );
768 768
                         if ($module->getVar('dirname') === 'system') {
769 769
                             if (!$xoops->templateTouch($newid)) {
770
-                                $this->trace[]['sub'] = '<span class="red">' . sprintf(
770
+                                $this->trace[]['sub'] = '<span class="red">'.sprintf(
771 771
                                     SystemLocale::EF_TEMPLATE_NOT_RECOMPILED,
772
-                                    '<strong>' . $tpl['file'] . '</strong>'
773
-                                ) . '</span>';
772
+                                    '<strong>'.$tpl['file'].'</strong>'
773
+                                ).'</span>';
774 774
                             } else {
775 775
                                 $this->trace[]['sub'] = sprintf(
776 776
                                     SystemLocale::SF_TEMPLATE_RECOMPILED,
777
-                                    '<strong>' . $tpl['file'] . '</strong>'
777
+                                    '<strong>'.$tpl['file'].'</strong>'
778 778
                                 );
779 779
                             }
780 780
                         } else {
781 781
                             if ($xoops->config['template_set'] === 'default') {
782 782
                                 if (!$xoops->templateTouch($newid)) {
783
-                                    $this->trace[]['sub'] = '<span class="red">' . sprintf(
783
+                                    $this->trace[]['sub'] = '<span class="red">'.sprintf(
784 784
                                         SystemLocale::EF_TEMPLATE_NOT_RECOMPILED,
785
-                                        '<strong>' . $tpl['file'] . '</strong>'
786
-                                    ) . '</span>';
785
+                                        '<strong>'.$tpl['file'].'</strong>'
786
+                                    ).'</span>';
787 787
                                 } else {
788 788
                                     $this->trace[]['sub'] = sprintf(
789 789
                                         SystemLocale::SF_TEMPLATE_RECOMPILED,
790
-                                        '<strong>' . $tpl['file'] . '</strong>'
790
+                                        '<strong>'.$tpl['file'].'</strong>'
791 791
                                     );
792 792
                                 }
793 793
                             }
@@ -795,10 +795,10 @@  discard block
 block discarded – undo
795 795
                     }
796 796
                     unset($tpldata);
797 797
                 } else {
798
-                    $this->trace[]['sub'] = '<span class="red">' . sprintf(
798
+                    $this->trace[]['sub'] = '<span class="red">'.sprintf(
799 799
                         SystemLocale::EF_TEMPLATE_NOT_DELETED,
800
-                        '<strong>' . $tpl['file'] . '</strong>'
801
-                    ) . '</span>';
800
+                        '<strong>'.$tpl['file'].'</strong>'
801
+                    ).'</span>';
802 802
                 }
803 803
             }
804 804
         }
@@ -887,17 +887,17 @@  discard block
 block discarded – undo
887 887
                     $block_obj[0]->setVar('last_modified', time());
888 888
 
889 889
                     if (!$block_handler->insert($block_obj[0])) {
890
-                        $this->trace[]['sub'] = '<span class="red">' . sprintf(
890
+                        $this->trace[]['sub'] = '<span class="red">'.sprintf(
891 891
                             XoopsLocale::EF_NOT_UPDATED,
892 892
                             $block_obj[0]->getVar('name')
893
-                        ) . '</span>';
893
+                        ).'</span>';
894 894
                     } else {
895 895
                         $this->trace[]['sub'] = sprintf(
896 896
                             SystemLocale::SF_BLOCK_UPDATED,
897
-                            '<strong>' . $block_obj[0]->getVar('name')
898
-                        ) . '</strong>' . sprintf(
897
+                            '<strong>'.$block_obj[0]->getVar('name')
898
+                        ).'</strong>'.sprintf(
899 899
                             SystemLocale::F_BLOCK_ID,
900
-                            '<strong>' . $block_obj[0]->getVar('bid') . '</strong>'
900
+                            '<strong>'.$block_obj[0]->getVar('bid').'</strong>'
901 901
                         );
902 902
 
903 903
                         if (0 == $blockmodulelink_handler->getCount(new Criteria('block_id', $block_obj[0]->getVar('bid')))) {
@@ -926,38 +926,38 @@  discard block
 block discarded – undo
926 926
                             $tplfile_new->setVar('tpl_lastmodified', time());
927 927
                             $tplfile_new->setVar('tpl_lastimported', 0);
928 928
                             if (!$tplfile_handler->insertTpl($tplfile_new)) {
929
-                                $this->trace[]['sub'] = '<span class="red">' . sprintf(
929
+                                $this->trace[]['sub'] = '<span class="red">'.sprintf(
930 930
                                     SystemLocale::EF_TEMPLATE_NOT_UPDATED,
931
-                                    '<strong>' . $block['template'] . '</strong>'
932
-                                ) . '</span>';
931
+                                    '<strong>'.$block['template'].'</strong>'
932
+                                ).'</span>';
933 933
                             } else {
934 934
                                 $this->trace[]['sub'] = sprintf(
935 935
                                     SystemLocale::SF_TEMPLATE_UPDATED,
936
-                                    '<strong>' . $block['template'] . '</strong>'
936
+                                    '<strong>'.$block['template'].'</strong>'
937 937
                                 );
938 938
                                 if ($module->getVar('dirname') === 'system') {
939 939
                                     if (!$xoops->templateTouch($tplfile_new->getVar('tpl_id'))) {
940
-                                        $this->trace[]['sub'] = '<span class="red">' . sprintf(
940
+                                        $this->trace[]['sub'] = '<span class="red">'.sprintf(
941 941
                                             SystemLocale::EF_TEMPLATE_NOT_RECOMPILED,
942
-                                            '<strong>' . $block['template'] . '</strong>'
943
-                                        ) . '</span>';
942
+                                            '<strong>'.$block['template'].'</strong>'
943
+                                        ).'</span>';
944 944
                                     } else {
945 945
                                         $this->trace[]['sub'] = sprintf(
946 946
                                             SystemLocale::SF_TEMPLATE_RECOMPILED,
947
-                                            '<strong>' . $block['template'] . '</strong>'
947
+                                            '<strong>'.$block['template'].'</strong>'
948 948
                                         );
949 949
                                     }
950 950
                                 } else {
951 951
                                     if ($xoops->config['template_set'] === 'default') {
952 952
                                         if (!$xoops->templateTouch($tplfile_new->getVar('tpl_id'))) {
953
-                                            $this->trace[]['sub'] = '<span class="red">' . sprintf(
953
+                                            $this->trace[]['sub'] = '<span class="red">'.sprintf(
954 954
                                                 SystemLocale::EF_TEMPLATE_NOT_RECOMPILED,
955
-                                                '<strong>' . $block['template'] . '</strong>'
956
-                                            ) . '</span>';
955
+                                                '<strong>'.$block['template'].'</strong>'
956
+                                            ).'</span>';
957 957
                                         } else {
958 958
                                             $this->trace[]['sub'] = sprintf(
959 959
                                                 SystemLocale::SF_TEMPLATE_RECOMPILED,
960
-                                                '<strong>' . $block['template'] . '</strong>'
960
+                                                '<strong>'.$block['template'].'</strong>'
961 961
                                             );
962 962
                                         }
963 963
                                     }
@@ -975,20 +975,20 @@  discard block
 block discarded – undo
975 975
                 || !in_array($block->getVar('func_file'), $funcfiles)
976 976
             ) {
977 977
                 if (!$block_handler->delete($block)) {
978
-                    $this->trace[]['sub'] = '<span class="red">' . sprintf(
978
+                    $this->trace[]['sub'] = '<span class="red">'.sprintf(
979 979
                         SystemLocale::EF_BLOCK_NOT_DELETED,
980
-                        "<strong>" . $block->getVar('name') . "</strong>"
981
-                    ) . sprintf(
980
+                        "<strong>".$block->getVar('name')."</strong>"
981
+                    ).sprintf(
982 982
                         SystemLocale::F_BLOCK_ID,
983
-                        "<strong>" . $block->getVar('bid') . "</strong>"
984
-                    ) . '</span>';
983
+                        "<strong>".$block->getVar('bid')."</strong>"
984
+                    ).'</span>';
985 985
                 } else {
986 986
                     $this->trace[]['sub'] = sprintf(
987 987
                         SystemLocale::SF_BLOCK_DELETED,
988
-                        '<strong>' . $block->getVar('name') . '</strong>'
989
-                    ) . '&nbsp;' . sprintf(
988
+                        '<strong>'.$block->getVar('name').'</strong>'
989
+                    ).'&nbsp;'.sprintf(
990 990
                         SystemLocale::F_BLOCK_ID,
991
-                        '<strong>' . $block->getVar('bid') . '</strong>'
991
+                        '<strong>'.$block->getVar('bid').'</strong>'
992 992
                     );
993 993
                     if ($block->getVar('template') != '') {
994 994
                         $tplfiles = $tplfile_handler->find(null, 'block', $block->getVar('bid'));
@@ -998,11 +998,11 @@  discard block
 block discarded – undo
998 998
                                 if (!$tplfile_handler->deleteTpl($tplfile)) {
999 999
                                     $this->trace[]['sub'] = '<span class="red">'
1000 1000
                                         . SystemLocale::E_BLOCK_TEMPLATE_DEPRECATED_NOT_REMOVED
1001
-                                        . '(ID: <strong>' . $tplfile->getVar('tpl_id') . '</strong>)</span>';
1001
+                                        . '(ID: <strong>'.$tplfile->getVar('tpl_id').'</strong>)</span>';
1002 1002
                                 } else {
1003 1003
                                     $this->trace[]['sub'] = sprintf(
1004 1004
                                         SystemLocale::SF_BLOCK_TEMPLATE_DEPRECATED,
1005
-                                        "<strong>" . $tplfile->getVar('tpl_file') . "</strong>"
1005
+                                        "<strong>".$tplfile->getVar('tpl_file')."</strong>"
1006 1006
                                     );
1007 1007
                                 }
1008 1008
                             }
@@ -1031,20 +1031,20 @@  discard block
 block discarded – undo
1031 1031
             /* @var $block XoopsBlock */
1032 1032
             foreach ($blocks as $block) {
1033 1033
                 if (false === $block_handler->deleteBlock($block)) {
1034
-                    $this->trace[]['sub'] = '<span class="red">' . sprintf(
1034
+                    $this->trace[]['sub'] = '<span class="red">'.sprintf(
1035 1035
                         SystemLocale::EF_BLOCK_NOT_DELETED,
1036
-                        "<strong>" . $block->getVar('name') . "</strong>"
1037
-                    ) . sprintf(
1036
+                        "<strong>".$block->getVar('name')."</strong>"
1037
+                    ).sprintf(
1038 1038
                         SystemLocale::F_BLOCK_ID,
1039
-                        "<strong>" . $block->getVar('bid') . "</strong>"
1040
-                    ) . '</span>';
1039
+                        "<strong>".$block->getVar('bid')."</strong>"
1040
+                    ).'</span>';
1041 1041
                 } else {
1042 1042
                     $this->trace[]['sub'] = sprintf(
1043 1043
                         SystemLocale::SF_BLOCK_DELETED,
1044
-                        "<strong>" . $block->getVar('name') . "</strong>"
1045
-                    ) . sprintf(
1044
+                        "<strong>".$block->getVar('name')."</strong>"
1045
+                    ).sprintf(
1046 1046
                         SystemLocale::F_BLOCK_ID,
1047
-                        "<strong>" . $block->getVar('bid') . "</strong>"
1047
+                        "<strong>".$block->getVar('bid')."</strong>"
1048 1048
                     );
1049 1049
                 }
1050 1050
                 if ($block->getVar('template') != '') {
@@ -1052,20 +1052,20 @@  discard block
 block discarded – undo
1052 1052
                     /* @var $template XoopsTplFile */
1053 1053
                     foreach ($templates as $template) {
1054 1054
                         if (!$tplfile_handler->delete($template)) {
1055
-                            $this->trace[]['sub'] = '<span class="red">' . sprintf(
1055
+                            $this->trace[]['sub'] = '<span class="red">'.sprintf(
1056 1056
                                 SystemLocale::EF_BLOCK_TEMPLATE_NOT_DELETED,
1057 1057
                                 $template->getVar('tpl_file')
1058
-                            ) . sprintf(
1058
+                            ).sprintf(
1059 1059
                                 SystemLocale::F_TEMPLATE_ID,
1060
-                                "<strong>" . $template->getVar('tpl_id') . "</strong>"
1061
-                            ) . '</span>';
1060
+                                "<strong>".$template->getVar('tpl_id')."</strong>"
1061
+                            ).'</span>';
1062 1062
                         } else {
1063 1063
                             $this->trace[]['sub'] = sprintf(
1064 1064
                                 SystemLocale::SF_BLOCK_TEMPLATE_DELETED,
1065
-                                "<strong>" . $template->getVar('tpl_file') . "</strong>"
1066
-                            ) . sprintf(
1065
+                                "<strong>".$template->getVar('tpl_file')."</strong>"
1066
+                            ).sprintf(
1067 1067
                                 SystemLocale::F_TEMPLATE_ID,
1068
-                                "<strong>" . $template->getVar('tpl_id') . "</strong>"
1068
+                                "<strong>".$template->getVar('tpl_id')."</strong>"
1069 1069
                             );
1070 1070
                         }
1071 1071
                     }
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
                 if (!$config_handler->deleteConfig($config)) {
1096 1096
                     $this->trace[]['sub'] = '<span class="red">'
1097 1097
                         . SystemLocale::E_CONFIG_DATA_NOT_DELETED
1098
-                        . sprintf(SystemLocale::F_CONFIG_ID, "<strong>" . $config->getVar('conf_id') . "</strong>")
1098
+                        . sprintf(SystemLocale::F_CONFIG_ID, "<strong>".$config->getVar('conf_id')."</strong>")
1099 1099
                         . '</span>';
1100 1100
                     // save the name of config failed to delete for later use
1101 1101
                     $this->config_delng[] = $config->getVar('conf_name');
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
                     $this->config_old[$config->getVar('conf_name')]['formtype'] = $config->getVar('conf_formtype');
1105 1105
                     $this->config_old[$config->getVar('conf_name')]['valuetype'] = $config->getVar('conf_valuetype');
1106 1106
                     $this->trace[]['sub'] = SystemLocale::S_CONFIG_DATA_DELETED
1107
-                        . sprintf(SystemLocale::F_CONFIG_ID, "<strong>" . $config->getVar('conf_id') . "</strong>");
1107
+                        . sprintf(SystemLocale::F_CONFIG_ID, "<strong>".$config->getVar('conf_id')."</strong>");
1108 1108
                 }
1109 1109
             }
1110 1110
         }
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
                             $confop_msgs .= ' <strong>'
1171 1171
                                 . \Xoops\Locale::translate($key, $module->getVar('dirname'))
1172 1172
                                 . '</strong> ';
1173
-                            $confop_msgs .= XoopsLocale::C_VALUE . ' <strong>' . $value . '</strong> ';
1173
+                            $confop_msgs .= XoopsLocale::C_VALUE.' <strong>'.$value.'</strong> ';
1174 1174
                             unset($confop);
1175 1175
                         }
1176 1176
                     }
@@ -1178,11 +1178,11 @@  discard block
 block discarded – undo
1178 1178
                     if (false != $config_handler->insertConfig($confobj)) {
1179 1179
                         $this->trace[]['sub'] = sprintf(
1180 1180
                             SystemLocale::SF_CONFIG_ADDED,
1181
-                            "<strong>" . $config['name'] . "</strong>"
1182
-                        ) . $confop_msgs;
1181
+                            "<strong>".$config['name']."</strong>"
1182
+                        ).$confop_msgs;
1183 1183
                     } else {
1184 1184
                         $this->trace[]['sub'] = '<span class="red">'
1185
-                            . sprintf(SystemLocale::EF_CONFIG_NOT_ADDED, "<strong>" . $config['name'] . "</strong>")
1185
+                            . sprintf(SystemLocale::EF_CONFIG_NOT_ADDED, "<strong>".$config['name']."</strong>")
1186 1186
                             . '</span>';
1187 1187
                     }
1188 1188
                     unset($confobj);
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
             return;
1211 1211
         }
1212 1212
         $xoops = Xoops::getInstance();
1213
-        $base_dir = $xoops->path('modules/' . $module->getVar('dirname') . '/src');
1213
+        $base_dir = $xoops->path('modules/'.$module->getVar('dirname').'/src');
1214 1214
         $loader = new Psr4ClassLoader;
1215 1215
         $loader->register();
1216 1216
         $loader->addNamespace($prefix, $base_dir);
Please login to merge, or discard this patch.
htdocs/include/common.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,27 +28,27 @@  discard block
 block discarded – undo
28 28
  * Temporarily try and fix, but set up a (delayed) warning
29 29
  */
30 30
 if (!class_exists('XoopsLoad', false)) {
31
-    require_once dirname(__DIR__). '/class/XoopsBaseConfig.php';
31
+    require_once dirname(__DIR__).'/class/XoopsBaseConfig.php';
32 32
     XoopsBaseConfig::bootstrapTransition();
33 33
     $delayedWarning = 'Patch mainfile.php for XoopsBaseConfig';
34 34
 }
35 35
 
36 36
 global $xoops;
37
-$GLOBALS['xoops'] =& $xoops;
37
+$GLOBALS['xoops'] = & $xoops;
38 38
 
39 39
 //Legacy support
40 40
 global $xoopsDB;
41
-$GLOBALS['xoopsDB'] =& $xoopsDB;
41
+$GLOBALS['xoopsDB'] = & $xoopsDB;
42 42
 /**
43 43
  * YOU SHOULD NEVER USE THE FOLLOWING TO CONSTANTS, THEY WILL BE REMOVED
44 44
  */
45 45
 defined('DS') or define('DS', DIRECTORY_SEPARATOR);
46
-defined('NWLINE')or define('NWLINE', "\n");
46
+defined('NWLINE') or define('NWLINE', "\n");
47 47
 
48 48
 /**
49 49
  * Include files with definitions
50 50
  */
51
-include_once __DIR__ . '/defines.php';
51
+include_once __DIR__.'/defines.php';
52 52
 // include_once __DIR__ . '/version.php';
53 53
 
54 54
 /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
  */
65 65
 $xoops = Xoops::getInstance();
66 66
 
67
-$xoops->option =& $GLOBALS['xoopsOption'];
67
+$xoops->option = & $GLOBALS['xoopsOption'];
68 68
 
69 69
 /**
70 70
  * Create Instance Xoops\Core\Logger Object, the logger manager
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 //$xoops->cache()->delete($key);
87 87
 $autoloadPrefixDirList = $xoops->cache()->cacheRead(
88 88
     $key,
89
-    function () use ($xoops) {
89
+    function() use ($xoops) {
90 90
         try {
91 91
             $criteria = new CriteriaCompo(new Criteria('isactive', 1));
92 92
             $criteria->add(new Criteria('namespace', '', '!='));
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         /** @var XoopsObject $almod */
100 100
         foreach ($autoloadModules as $almod) {
101 101
             $prefix = $almod->getVar('namespace');
102
-            $base_dir = $xoops->path('modules/' . $almod->getVar('dirname') . '/src');
102
+            $base_dir = $xoops->path('modules/'.$almod->getVar('dirname').'/src');
103 103
             $autoloadPrefixDirList[] = [$prefix, $base_dir];
104 104
         }
105 105
         return $autoloadPrefixDirList;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
  * Requires functions and database loaded
159 159
  */
160 160
 $xoops->getConfigs();
161
-$xoopsConfig =& $xoops->config;
161
+$xoopsConfig = & $xoops->config;
162 162
 
163 163
 /**
164 164
  * Merge file and db configs.
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     $xoops->addConfigs(include $file);
168 168
     unset($file);
169 169
 } else {
170
-    trigger_error('File Path Error: ' . 'var/configs/system_configs.php' . ' does not exist.');
170
+    trigger_error('File Path Error: '.'var/configs/system_configs.php'.' does not exist.');
171 171
 }
172 172
 
173 173
 $xoops->events()->triggerEvent('core.include.common.configs.success');
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 $xFrameOptions = $xoopsConfig['xFrameOptions'] ?? 'sameorigin';
185 185
 $xoops->events()->triggerEvent('core.include.common.xframeoption');
186 186
 if (!headers_sent() && !empty($xFrameOptions)) {
187
-    header('X-Frame-Options: ' .$xFrameOptions);
187
+    header('X-Frame-Options: '.$xFrameOptions);
188 188
 }
189 189
 
190 190
 /**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     } else {
266 266
         if (!$moduleperm_handler->checkRight('module_read', $xoops->module->getVar('mid'), FixedGroups::ANONYMOUS)) {
267 267
             $xoops->redirect(
268
-                $xoops_url . '/user.php?from=' . $xoops->module->getVar('dirname', 'n'),
268
+                $xoops_url.'/user.php?from='.$xoops->module->getVar('dirname', 'n'),
269 269
                 1,
270 270
                 XoopsLocale::E_NO_ACCESS_PERMISSION
271 271
             );
@@ -291,10 +291,10 @@  discard block
 block discarded – undo
291 291
 
292 292
 $xoopsTpl = $xoops->tpl();
293 293
 $xoTheme = null;
294
-$xoopsUser =& $xoops->user;
295
-$xoopsModule =& $xoops->module;
296
-$xoopsUserIsAdmin =& $xoops->userIsAdmin;
297
-$xoopsModuleConfig =& $xoops->moduleConfig;
294
+$xoopsUser = & $xoops->user;
295
+$xoopsModule = & $xoops->module;
296
+$xoopsUserIsAdmin = & $xoops->userIsAdmin;
297
+$xoopsModuleConfig = & $xoops->moduleConfig;
298 298
 
299 299
 //Creates 'system_modules_active' cache file if it has been deleted.
300 300
 $xoops->getActiveModules();
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/ajax_rating.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 use XoopsModules\Publisher;
35 35
 use XoopsModules\Publisher\Helper;
36 36
 
37
-require_once dirname(__DIR__) . '/header.php';
37
+require_once dirname(__DIR__).'/header.php';
38 38
 
39 39
 $xoops = Xoops::getInstance();
40 40
 $xoops->disableErrorReporting();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 //Checking permissions
58 58
 if (!$helper->getConfig('perm_rating') || !$gpermHandler->checkRight('global', _PUBLISHER_RATE, $groups, $module_id)) {
59
-    $output = "unit_long$itemid|" . XoopsLocale::E_NO_ACCESS_PERMISSION . "\n";
59
+    $output = "unit_long$itemid|".XoopsLocale::E_NO_ACCESS_PERMISSION."\n";
60 60
     echo $output;
61 61
     exit();
62 62
 }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $units = 5;
66 66
 
67 67
 if ($rating > 5 || $rating < 1) {
68
-    $output = "unit_long$itemid|" . _MD_PUBLISHER_VOTE_BAD . "\n";
68
+    $output = "unit_long$itemid|"._MD_PUBLISHER_VOTE_BAD."\n";
69 69
     echo $output;
70 70
     exit();
71 71
 }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 }
88 88
 
89 89
 if ($voted) {
90
-    $output = "unit_long$itemid|" . _MD_PUBLISHER_VOTE_ALREADY . "\n";
90
+    $output = "unit_long$itemid|"._MD_PUBLISHER_VOTE_ALREADY."\n";
91 91
     echo $output;
92 92
     exit();
93 93
 }
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 // $new_back is what gets 'drawn' on your page after a successful 'AJAX/Javascript' vote
112 112
 $new_back = [];
113 113
 
114
-$new_back[] .= '<div class="publisher_unit-rating" style="width:' . $units * $rating_unitwidth . 'px;">';
115
-$new_back[] .= '<div class="publisher_current-rating" style="width:' . @number_format($current_rating / $count, 2) * $rating_unitwidth . 'px;">' . _MD_PUBLISHER_VOTE_RATING . '</div>';
114
+$new_back[] .= '<div class="publisher_unit-rating" style="width:'.$units * $rating_unitwidth.'px;">';
115
+$new_back[] .= '<div class="publisher_current-rating" style="width:'.@number_format($current_rating / $count, 2) * $rating_unitwidth.'px;">'._MD_PUBLISHER_VOTE_RATING.'</div>';
116 116
 $new_back[] .= '<div class="publisher_r1-unit">1</div>';
117 117
 $new_back[] .= '<div class="publisher_r2-unit">2</div>';
118 118
 $new_back[] .= '<div class="publisher_r3-unit">3</div>';
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
 $new_back[] .= '<div class="publisher_r9-unit">9</div>';
125 125
 $new_back[] .= '<div class="publisher_r10-unit">10</div>';
126 126
 $new_back[] .= '</div>';
127
-$new_back[] .= '<div class="publisher_voted">' . _MD_PUBLISHER_VOTE_RATING . ' <strong>' . @number_format($current_rating / $count, 2) . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ')</div>';
128
-$new_back[] .= '<div class="publisher_thanks">' . _MD_PUBLISHER_VOTE_THANKS . '</div>';
127
+$new_back[] .= '<div class="publisher_voted">'._MD_PUBLISHER_VOTE_RATING.' <strong>'.@number_format($current_rating / $count, 2).'</strong>/'.$units.' ('.$count.' '.$tense.')</div>';
128
+$new_back[] .= '<div class="publisher_thanks">'._MD_PUBLISHER_VOTE_THANKS.'</div>';
129 129
 
130 130
 $allnewback = implode("\n", $new_back);
131 131
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/ajax_upload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 use XoopsModules\Publisher;
30 30
 use XoopsModules\Publisher\Helper;
31 31
 
32
-include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
33
-require_once __DIR__ . '/common.php';
32
+include dirname(dirname(dirname(__DIR__))).'/mainfile.php';
33
+require_once __DIR__.'/common.php';
34 34
 
35 35
 $xoops = Xoops::getInstance();
36 36
 $xoops->disableErrorReporting();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 $image = null;
76 76
 if (false === $error) {
77
-    $uploader = new XoopsMediaUploader(XoopsBaseConfig::get('uploads-path') . '/images', [
77
+    $uploader = new XoopsMediaUploader(XoopsBaseConfig::get('uploads-path').'/images', [
78 78
         'image/gif',
79 79
         'image/jpeg',
80 80
         'image/pjpeg',
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             }
108 108
         }
109 109
     } else {
110
-        $error = sprintf(_CO_PUBLISHER_FAILSAVEIMG, $filename) . '<br>' . implode('<br>', $uploader->getErrors(false));
110
+        $error = sprintf(_CO_PUBLISHER_FAILSAVEIMG, $filename).'<br>'.implode('<br>', $uploader->getErrors(false));
111 111
     }
112 112
 }
113 113
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/common.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 define('PUBLISHER_DIRNAME', basename(dirname(__DIR__)));
27
-define('PUBLISHER_URL', $xoops->url('modules/' . PUBLISHER_DIRNAME));
28
-define('PUBLISHER_ADMIN_URL', PUBLISHER_URL . '/admin');
29
-define('PUBLISHER_UPLOADS_URL', $xoops->url('uploads/' . PUBLISHER_DIRNAME));
30
-define('PUBLISHER_ROOT_PATH', $xoops->path('modules/' . PUBLISHER_DIRNAME));
31
-define('PUBLISHER_UPLOADS_PATH', $xoops->path('uploads/' . PUBLISHER_DIRNAME));
27
+define('PUBLISHER_URL', $xoops->url('modules/'.PUBLISHER_DIRNAME));
28
+define('PUBLISHER_ADMIN_URL', PUBLISHER_URL.'/admin');
29
+define('PUBLISHER_UPLOADS_URL', $xoops->url('uploads/'.PUBLISHER_DIRNAME));
30
+define('PUBLISHER_ROOT_PATH', $xoops->path('modules/'.PUBLISHER_DIRNAME));
31
+define('PUBLISHER_UPLOADS_PATH', $xoops->path('uploads/'.PUBLISHER_DIRNAME));
32 32
 
33 33
 $path = dirname(__DIR__);
34 34
 //XoopsLoad::addMap(array(
Please login to merge, or discard this patch.