Completed
Push — master ( 2f8aec...b781ca )
by Richard
16s
created
htdocs/modules/publisher/src/PermissionHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  * @author          The SmartFactory <www.smartfactory.ca>
31 31
  * @version         $Id$
32 32
  */
33
-require_once \dirname(__DIR__) . '/include/common.php';
33
+require_once \dirname(__DIR__).'/include/common.php';
34 34
 
35 35
 /**
36 36
  * Class PermissionHandler
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         // Save the new permissions
166 166
         if (\count($groups) > 0) {
167 167
             foreach ($groups as $group_id) {
168
-                echo $group_id . '-';
168
+                echo $group_id.'-';
169 169
                 echo $gpermHandler->addRight($perm_name, $itemid, $group_id, $module_id);
170 170
             }
171 171
         }
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/file.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @author          The SmartFactory <www.smartfactory.ca>
28 28
  * @version         $Id$
29 29
  */
30
-require_once \dirname(__DIR__) . '/include/common.php';
30
+require_once \dirname(__DIR__).'/include/common.php';
31 31
 
32 32
 // File status
33 33
 \define('_PUBLISHER_STATUS_FILE_NOTSET', -1);
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
                 throw new RuntimeException(\sprintf('Directory "%s" was not created', $concurrentDirectory));
124 124
             }
125 125
         }
126
-        $uploader = new XoopsMediaUploader(Publisher\Utils::getUploadDir() . '/', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
126
+        $uploader = new XoopsMediaUploader(Publisher\Utils::getUploadDir().'/', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
127 127
         if ($uploader->fetchMedia($post_field)) {
128
-            $uploader->setTargetFileName($itemid . '_' . $uploader->getMediaName());
128
+            $uploader->setTargetFileName($itemid.'_'.$uploader->getMediaName());
129 129
             if ($uploader->upload()) {
130 130
                 $this->setVar('filename', $uploader->getSavedFileName());
131 131
                 if ('' == $this->getVar('name')) {
@@ -187,22 +187,22 @@  discard block
 block discarded – undo
187 187
 
188 188
     public function getFileUrl(): string
189 189
     {
190
-        return Publisher\Utils::getUploadDir(false) . $this->getVar('filename');
190
+        return Publisher\Utils::getUploadDir(false).$this->getVar('filename');
191 191
     }
192 192
 
193 193
     public function getFilePath(): string
194 194
     {
195
-        return Publisher\Utils::getUploadDir() . $this->getVar('filename');
195
+        return Publisher\Utils::getUploadDir().$this->getVar('filename');
196 196
     }
197 197
 
198 198
     public function getFileLink(): string
199 199
     {
200
-        return "<a href='" . \PUBLISHER_URL . '/visit.php?fileid=' . $this->getVar('fileid') . "'>" . $this->getVar('name') . '</a>';
200
+        return "<a href='".\PUBLISHER_URL.'/visit.php?fileid='.$this->getVar('fileid')."'>".$this->getVar('name').'</a>';
201 201
     }
202 202
 
203 203
     public function getItemLink(): string
204 204
     {
205
-        return "<a href='" . \PUBLISHER_URL . '/item.php?itemid=' . $this->getVar('itemid') . "'>" . $this->getVar('name') . '</a>';
205
+        return "<a href='".\PUBLISHER_URL.'/item.php?itemid='.$this->getVar('itemid')."'>".$this->getVar('name').'</a>';
206 206
     }
207 207
 
208 208
     /**
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/metagen.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * @author          The SmartFactory <www.smartfactory.ca>
24 24
  * @version         $Id$
25 25
  */
26
-require_once \dirname(__DIR__) . '/include/common.php';
26
+require_once \dirname(__DIR__).'/include/common.php';
27 27
 
28 28
 /**
29 29
  * Class Metagen
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
     public function createMetaKeywords(): string
206 206
     {
207
-        $keywords = $this->findMetaKeywords($this->_original_title . ' ' . $this->_description, $this->_minChar);
207
+        $keywords = $this->findMetaKeywords($this->_original_title.' '.$this->_description, $this->_minChar);
208 208
         $moduleKeywords = $this->helper->getConfig('seo_meta_keywords');
209 209
         if ('' != $moduleKeywords) {
210 210
             $moduleKeywords = \explode(',', $moduleKeywords);
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/form/CategoryForm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
  * @author          trabis <[email protected]>
44 44
  * @version         $Id$
45 45
  */
46
-require_once \dirname(\dirname(__DIR__)) . '/include/common.php';
46
+require_once \dirname(\dirname(__DIR__)).'/include/common.php';
47 47
 
48 48
 /**
49 49
  * Class CategoryForm
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
         // IMAGE
130 130
         $image_select = new Select('', 'image', $obj->image());
131 131
         ImageFile::setOptionsArray($image_select, Publisher\Utils::getImageDir('category'));
132
-        $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"" . 'uploads/' . \PUBLISHER_DIRNAME . '/images/category/' . '", "", "' . XoopsBaseConfig::get('url') . "\")'");
132
+        $image_select->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"".'uploads/'.\PUBLISHER_DIRNAME.'/images/category/'.'", "", "'.XoopsBaseConfig::get('url')."\")'");
133 133
         $image_tray = new ElementTray(_AM_PUBLISHER_IMAGE, '&nbsp;');
134 134
         $image_tray->addElement($image_select);
135
-        $image_tray->addElement(new Label('', "<br><br><img src='" . Publisher\Utils::getImageDir('category', false) . $obj->image() . "' name='image3' id='image3' alt=''>"));
135
+        $image_tray->addElement(new Label('', "<br><br><img src='".Publisher\Utils::getImageDir('category', false).$obj->image()."' name='image3' id='image3' alt=''>"));
136 136
         $image_tray->setDescription(_AM_PUBLISHER_IMAGE_DSC);
137 137
         $this->addElement($image_tray);
138 138
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             } else {
200 200
                 $subname = '';
201 201
             }
202
-            $cat_tray->addElement(new Text('', 'scname[' . $i . ']', 50, 255, $subname));
202
+            $cat_tray->addElement(new Text('', 'scname['.$i.']', 50, 255, $subname));
203 203
         }
204 204
         $t = new Text('', 'nb_subcats', 3, 2);
205 205
         $l = new Label('', \sprintf(_AM_PUBLISHER_ADD_OPT, $t->render()));
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/form/FileForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 use XoopsModules\Publisher;
35 35
 use XoopsModules\Publisher\Helper;
36 36
 
37
-require_once \dirname(\dirname(__DIR__)) . '/include/common.php';
37
+require_once \dirname(\dirname(__DIR__)).'/include/common.php';
38 38
 
39 39
 /**
40 40
  * Class FileForm
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/form/ItemForm.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -591,12 +591,12 @@
 block discarded – undo
591 591
             $imagesTab->addElement($image_select3);
592 592
 
593 593
             $imgTag = new Img([
594
-                                         'src' => $xoops->url('uploads/' . $imageforpath),
595
-                                         'width' => 500,
596
-                                         'name' => 'image_display',
597
-                                         'id' => 'image_display',
598
-                                         'alt' => '',
599
-                                     ]);
594
+                                            'src' => $xoops->url('uploads/' . $imageforpath),
595
+                                            'width' => 500,
596
+                                            'name' => 'image_display',
597
+                                            'id' => 'image_display',
598
+                                            'alt' => '',
599
+                                        ]);
600 600
             $image_preview = new Label(_CO_PUBLISHER_IMAGE_PREVIEW, $imgTag->render());
601 601
             $imagesTab->addElement($image_preview);
602 602
         }
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 use XoopsModules\Publisher;
41 41
 use XoopsModules\Publisher\Helper;
42 42
 
43
-require_once \dirname(\dirname(__DIR__)) . '/include/common.php';
43
+require_once \dirname(\dirname(__DIR__)).'/include/common.php';
44 44
 
45 45
 $helper = Helper::getInstance();
46 46
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $wrap_pages = XoopsLists::getHtmlListAsArray(Publisher\Utils::getUploadDir(true, 'content'));
207 207
             $available_wrap_pages_text = [];
208 208
             foreach ($wrap_pages as $page) {
209
-                $available_wrap_pages_text[] = "<span onclick='publisherPageWrap(\"body\", \"[pagewrap=$page] \");'" . " onmouseover='style.cursor=\"pointer\"'>$page</span>";
209
+                $available_wrap_pages_text[] = "<span onclick='publisherPageWrap(\"body\", \"[pagewrap=$page] \");'"." onmouseover='style.cursor=\"pointer\"'>$page</span>";
210 210
             }
211 211
             $available_wrap_pages = new Label(_CO_PUBLISHER_AVAILABLE_PAGE_WRAP, \implode(', ', $available_wrap_pages_text));
212 212
             $available_wrap_pages->setDescription(_CO_PUBLISHER_AVAILABLE_PAGE_WRAP_DSC);
@@ -397,28 +397,28 @@  discard block
 block discarded – undo
397 397
                     $table .= "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
398 398
                     $table .= '<tr>';
399 399
                     $table .= "<td width='50' class='bg3' align='center'><strong>ID</strong></td>";
400
-                    $table .= "<td width='150' class='bg3' align='left'><strong>" . _AM_PUBLISHER_FILENAME . '</strong></td>';
401
-                    $table .= "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_DESCRIPTION . '</strong></td>';
402
-                    $table .= "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_HITS . '</strong></td>';
403
-                    $table .= "<td width='100' class='bg3' align='center'><strong>" . _AM_PUBLISHER_UPLOADED_DATE . '</strong></td>';
404
-                    $table .= "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>';
400
+                    $table .= "<td width='150' class='bg3' align='left'><strong>"._AM_PUBLISHER_FILENAME.'</strong></td>';
401
+                    $table .= "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_DESCRIPTION.'</strong></td>';
402
+                    $table .= "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_HITS.'</strong></td>';
403
+                    $table .= "<td width='100' class='bg3' align='center'><strong>"._AM_PUBLISHER_UPLOADED_DATE.'</strong></td>';
404
+                    $table .= "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>';
405 405
                     $table .= '</tr>';
406 406
 
407 407
                     /* @var Publisher\File $fileObj */
408 408
                     foreach ($filesObj as $fileObj) {
409
-                        $modify = "<a href='file.php?op=mod&fileid=" . $fileObj->getVar('fileid') . "'><img src='" . \PUBLISHER_URL . "/images/links/edit.gif' title='" . _CO_PUBLISHER_EDITFILE . "' alt='" . _CO_PUBLISHER_EDITFILE . "'></a>";
410
-                        $delete = "<a href='file.php?op=del&fileid=" . $fileObj->getVar('fileid') . "'><img src='" . \PUBLISHER_URL . "/images/links/delete.png' title='" . _CO_PUBLISHER_DELETEFILE . "' alt='" . _CO_PUBLISHER_DELETEFILE . "'></a>";
409
+                        $modify = "<a href='file.php?op=mod&fileid=".$fileObj->getVar('fileid')."'><img src='".\PUBLISHER_URL."/images/links/edit.gif' title='"._CO_PUBLISHER_EDITFILE."' alt='"._CO_PUBLISHER_EDITFILE."'></a>";
410
+                        $delete = "<a href='file.php?op=del&fileid=".$fileObj->getVar('fileid')."'><img src='".\PUBLISHER_URL."/images/links/delete.png' title='"._CO_PUBLISHER_DELETEFILE."' alt='"._CO_PUBLISHER_DELETEFILE."'></a>";
411 411
                         if (0 == $fileObj->getVar('status')) {
412
-                            $notVisible = "<img src='" . \PUBLISHER_URL . "/images/no.gif'>";
412
+                            $notVisible = "<img src='".\PUBLISHER_URL."/images/no.gif'>";
413 413
                         } else {
414 414
                             $notVisible = '';
415 415
                         }
416 416
                         $table .= '<tr>';
417
-                        $table .= "<td class='head' align='center'>" . $fileObj->getVar('fileid') . '</td>';
418
-                        $table .= "<td class='odd' align='left'>" . $notVisible . $fileObj->getFileLink() . '</td>';
419
-                        $table .= "<td class='even' align='left'>" . $fileObj->getVar('description') . '</td>';
420
-                        $table .= "<td class='even' align='center'>" . $fileObj->getVar('counter') . '';
421
-                        $table .= "<td class='even' align='center'>" . $fileObj->datesub() . '</td>';
417
+                        $table .= "<td class='head' align='center'>".$fileObj->getVar('fileid').'</td>';
418
+                        $table .= "<td class='odd' align='left'>".$notVisible.$fileObj->getFileLink().'</td>';
419
+                        $table .= "<td class='even' align='left'>".$fileObj->getVar('description').'</td>';
420
+                        $table .= "<td class='even' align='center'>".$fileObj->getVar('counter').'';
421
+                        $table .= "<td class='even' align='center'>".$fileObj->datesub().'</td>';
422 422
                         $table .= "<td class='even' align='center'> {$modify} {$delete} </td>";
423 423
                         $table .= '</tr>';
424 424
                     }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 
463 463
             $imageObjs = [];
464 464
             if (!empty($catids)) {
465
-                $criteria = new CriteriaCompo(new Criteria('imgcat_id', '(' . \implode(',', $catids) . ')', 'IN'));
465
+                $criteria = new CriteriaCompo(new Criteria('imgcat_id', '('.\implode(',', $catids).')', 'IN'));
466 466
                 $criteria->add(new Criteria('image_display', 1));
467 467
                 $criteria->setSort('image_nicename');
468 468
                 $criteria->setOrder('ASC');
@@ -478,38 +478,38 @@  discard block
 block discarded – undo
478 478
 
479 479
             $image_select = new Select('', 'image_notused', '', 5);
480 480
             $image_select->addOptionArray($image_array);
481
-            $image_select->set('onchange', 'showImgSelected("image_display", "image_notused", "uploads/", "", "' . XoopsBaseConfig::get('url') . '")');
481
+            $image_select->set('onchange', 'showImgSelected("image_display", "image_notused", "uploads/", "", "'.XoopsBaseConfig::get('url').'")');
482 482
             unset($image_array);
483 483
 
484 484
             $image_select2 = new Select('', 'image_item', '', 5, true);
485 485
             $image_select2->addOptionArray($objimage_array);
486
-            $image_select2->set('onchange', 'publisher_updateSelectOption("image_item", "image_featured"), ' . 'showImgSelected("image_display", "image_item", "uploads/", "", "' . XoopsBaseConfig::get('url') . '");');
486
+            $image_select2->set('onchange', 'publisher_updateSelectOption("image_item", "image_featured"), '.'showImgSelected("image_display", "image_item", "uploads/", "", "'.XoopsBaseConfig::get('url').'");');
487 487
 
488 488
             $buttonadd = new Button('', 'buttonadd', _CO_PUBLISHER_ADD);
489
-            $buttonadd->set('onclick', 'publisher_appendSelectOption("image_notused", "image_item"), ' . 'publisher_updateSelectOption("image_item", "image_featured");');
489
+            $buttonadd->set('onclick', 'publisher_appendSelectOption("image_notused", "image_item"), '.'publisher_updateSelectOption("image_item", "image_featured");');
490 490
 
491 491
             $buttonremove = new Button('', 'buttonremove', _CO_PUBLISHER_REMOVE);
492
-            $buttonremove->set('onclick', 'publisher_appendSelectOption("image_item", "image_notused"), ' . 'publisher_updateSelectOption("image_item", "image_featured");');
492
+            $buttonremove->set('onclick', 'publisher_appendSelectOption("image_item", "image_notused"), '.'publisher_updateSelectOption("image_item", "image_featured");');
493 493
 
494 494
             $opentable = new Label('', '<table><tr><td>');
495 495
             $addcol = new Label('', '</td><td>');
496 496
             $addbreak = new Label('', '<br>');
497 497
             $closetable = new Label('', '</td></tr></table>');
498 498
 
499
-            $xoops->theme()->addScript(\PUBLISHER_URL . '/js/ajaxupload.3.9.js');
499
+            $xoops->theme()->addScript(\PUBLISHER_URL.'/js/ajaxupload.3.9.js');
500 500
             //todo, find replacement for error class
501 501
             $js_data = new Label('', '
502 502
 <script type= "text/javascript">/*<![CDATA[*/
503 503
 $(document).ready(function(){
504 504
     var button = $("#publisher_upload_button"), interval;
505 505
     new AjaxUpload(button,{
506
-        action: "' . \PUBLISHER_URL . '/include/ajax_upload.php", // I disabled uploads in this example for security reasons
506
+        action: "' . \PUBLISHER_URL.'/include/ajax_upload.php", // I disabled uploads in this example for security reasons
507 507
         responseType: "text/html",
508 508
         name: "publisher_upload_file",
509 509
         onSubmit : function(file, ext){
510 510
             // change button text, when user selects file
511 511
             $("#publisher_upload_message").html(" ");
512
-            button.html("<img src=\'' . \PUBLISHER_URL . '/images/loadingbar.gif\'>"); this.setData({
512
+            button.html("<img src=\'' . \PUBLISHER_URL.'/images/loadingbar.gif\'>"); this.setData({
513 513
                 "image_nicename": $("#image_nicename").val(),
514 514
                 "imgcat_id" : $("#imgcat_id").val()
515 515
             });
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             }, 200);
521 521
         },
522 522
         onComplete: function(file, response){
523
-            button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . '");
523
+            button.text("' . _CO_PUBLISHER_IMAGE_UPLOAD_NEW.'");
524 524
             window.clearInterval(interval);
525 525
             // enable upload button
526 526
             this.enable();
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
             if (result[0] == "success") {
530 530
                  $("#image_item").append("<option value=\'" + result[1] + "\' selected=\'selected\'>" + result[2] + "</option>");
531 531
                  publisher_updateSelectOption(\'image_item\', \'image_featured\');
532
-                 showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . XoopsBaseConfig::get('url') . '\')
532
+                 showImgSelected(\'image_display\', \'image_item\', \'uploads/\', \'\', \'' . XoopsBaseConfig::get('url').'\')
533 533
             } else {
534 534
                  $("#publisher_upload_message").html("<div class=\'errorMsg\'>" + result[1] + "</div>");
535 535
             }
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 /*]]>*/</script>
540 540
 ');
541 541
             $messages = new Label('', "<div id='publisher_upload_message'></div>");
542
-            $button = new Label('', "<div id='publisher_upload_button'>" . _CO_PUBLISHER_IMAGE_UPLOAD_NEW . '</div>');
542
+            $button = new Label('', "<div id='publisher_upload_button'>"._CO_PUBLISHER_IMAGE_UPLOAD_NEW.'</div>');
543 543
             $nicename = new Text('', 'image_nicename', 30, 30, \_CO_PUBLISHER_IMAGE_NICENAME);
544 544
 
545 545
             $catlist = $imgcatHandler->getListByPermission($group, 'imgcat_read', 1);
@@ -586,12 +586,12 @@  discard block
 block discarded – undo
586 586
 
587 587
             $image_select3 = new Select(_CO_PUBLISHER_IMAGE_ITEM, 'image_featured', $imagename, 1);
588 588
             $image_select3->addOptionArray($objimage_array);
589
-            $image_select3->set('onchange', 'showImgSelected("image_display", "image_featured", "uploads/", "", "' . XoopsBaseConfig::get('url') . '");');
589
+            $image_select3->set('onchange', 'showImgSelected("image_display", "image_featured", "uploads/", "", "'.XoopsBaseConfig::get('url').'");');
590 590
             $image_select3->setDescription(_CO_PUBLISHER_IMAGE_ITEM_DSC);
591 591
             $imagesTab->addElement($image_select3);
592 592
 
593 593
             $imgTag = new Img([
594
-                                         'src' => $xoops->url('uploads/' . $imageforpath),
594
+                                         'src' => $xoops->url('uploads/'.$imageforpath),
595 595
                                          'width' => 500,
596 596
                                          'name' => 'image_display',
597 597
                                          'id' => 'image_display',
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/utils.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             return $helper->getModule()->getVar('name');
184 184
         }
185 185
 
186
-        return '<a href="' . $xoops->url(\PUBLISHER_URL) . '/">' . $helper->getModule()->getVar('name') . '</a>';
186
+        return '<a href="'.$xoops->url(\PUBLISHER_URL).'/">'.$helper->getModule()->getVar('name').'</a>';
187 187
     }
188 188
 
189 189
     /**
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
             $path_status = _AM_PUBLISHER_AVAILABLE;
261 261
         } elseif (!@\is_dir($thePath)) {
262 262
             $pathCheckResult = -1;
263
-            $path_status = _AM_PUBLISHER_NOTAVAILABLE . " <a href='" . $helper->url("admin/index.php?op=createdir&amp;path={$item}") . "'>" . _AM_PUBLISHER_CREATETHEDIR . '</a>';
263
+            $path_status = _AM_PUBLISHER_NOTAVAILABLE." <a href='".$helper->url("admin/index.php?op=createdir&amp;path={$item}")."'>"._AM_PUBLISHER_CREATETHEDIR.'</a>';
264 264
         } else {
265 265
             $pathCheckResult = -2;
266
-            $path_status = \_AM_PUBLISHER_NOTWRITABLE . " <a href='" . $helper->url("admin/index.php?op=setperm&amp;path={$item}") . "'>" . _AM_SCS_SETMPERM . '</a>';
266
+            $path_status = \_AM_PUBLISHER_NOTWRITABLE." <a href='".$helper->url("admin/index.php?op=setperm&amp;path={$item}")."'>"._AM_SCS_SETMPERM.'</a>';
267 267
         }
268 268
         if (!$getStatus) {
269 269
             return $path_status;
@@ -327,17 +327,17 @@  discard block
 block discarded – undo
327 327
             if ('root' === $item) {
328 328
                 $item = '';
329 329
             } else {
330
-                $item = $item . '/';
330
+                $item = $item.'/';
331 331
             }
332 332
         } else {
333 333
             $item = '';
334 334
         }
335 335
 
336 336
         if ($hasPath) {
337
-            return $xoops->path(\PUBLISHER_UPLOADS_PATH . '/' . $item);
337
+            return $xoops->path(\PUBLISHER_UPLOADS_PATH.'/'.$item);
338 338
         }
339 339
 
340
-        return $xoops->url(\PUBLISHER_UPLOADS_URL . '/' . $item);
340
+        return $xoops->url(\PUBLISHER_UPLOADS_URL.'/'.$item);
341 341
     }
342 342
 
343 343
     /**
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
     {
363 363
         $ret = '';
364 364
         foreach ($errors as $value) {
365
-            $ret .= '<br> - ' . $value;
365
+            $ret .= '<br> - '.$value;
366 366
         }
367 367
 
368 368
         return $ret;
@@ -447,11 +447,11 @@  discard block
 block discarded – undo
447 447
             $display = 'block';
448 448
         }
449 449
 
450
-        echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "')\";>";
451
-        echo "<img id='" . $iconname . "' src='" . $helper->url('images/links/' . $image) . "' alt=''></a>&nbsp;" . $tabletitle . '</h3>';
452
-        echo "<div id='" . $tablename . "' style='display: " . $display . ";'>";
450
+        echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"toggle('".$tablename."'); toggleIcon('".$iconname."')\";>";
451
+        echo "<img id='".$iconname."' src='".$helper->url('images/links/'.$image)."' alt=''></a>&nbsp;".$tabletitle.'</h3>';
452
+        echo "<div id='".$tablename."' style='display: ".$display.";'>";
453 453
         if ('' != $tabledsc) {
454
-            echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $tabledsc . '</span>';
454
+            echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$tabledsc.'</span>';
455 455
         }
456 456
     }
457 457
 
@@ -466,14 +466,14 @@  discard block
 block discarded – undo
466 466
         $urls = self::getCurrentUrls();
467 467
         $path = $urls['phpself'];
468 468
 
469
-        $cookie_name = $path . '_publisher_collaps_' . $name;
469
+        $cookie_name = $path.'_publisher_collaps_'.$name;
470 470
         $cookie_name = \str_replace('.', '_', $cookie_name);
471 471
         $cookie = self::getCookieVar($cookie_name, '');
472 472
 
473 473
         if ('none' === $cookie) {
474 474
             echo '
475 475
         <script type="text/javascript"><!--
476
-        toggle("' . $name . '"); toggleIcon("' . $icon . '");
476
+        toggle("' . $name.'"); toggleIcon("'.$icon.'");
477 477
         //-->
478 478
         </script>
479 479
         ';
@@ -516,10 +516,10 @@  discard block
 block discarded – undo
516 516
         $querystring = $_SERVER['QUERY_STRING'] ?? '';
517 517
 
518 518
         if ('' != $querystring) {
519
-            $querystring = '?' . $querystring;
519
+            $querystring = '?'.$querystring;
520 520
         }
521 521
 
522
-        $currenturl = $http . $httphost . $phpself . $querystring;
522
+        $currenturl = $http.$httphost.$phpself.$querystring;
523 523
 
524 524
         $urls = [];
525 525
         $urls['http'] = $http;
@@ -555,13 +555,13 @@  discard block
 block discarded – undo
555 555
             $spaces .= '--';
556 556
         }
557 557
 
558
-        $ret .= "<option value='" . $categoryObj->getVar('categoryid') . "'";
558
+        $ret .= "<option value='".$categoryObj->getVar('categoryid')."'";
559 559
         if (\is_array($selectedid) && \in_array($categoryObj->getVar('categoryid'), $selectedid)) {
560 560
             $ret .= " selected='selected'";
561 561
         } elseif ($categoryObj->getVar('categoryid') == $selectedid) {
562 562
             $ret .= " selected='selected'";
563 563
         }
564
-        $ret .= '>' . $spaces . $categoryObj->getVar('name') . "</option>\n";
564
+        $ret .= '>'.$spaces.$categoryObj->getVar('name')."</option>\n";
565 565
 
566 566
         $subCategoriesObj = $helper->getCategoryHandler()->getCategories(0, 0, $categoryObj->getVar('categoryid'));
567 567
         if (\count($subCategoriesObj) > 0) {
@@ -588,13 +588,13 @@  discard block
 block discarded – undo
588 588
 
589 589
         $selectedid = \explode(',', $selectedid);
590 590
 
591
-        $ret = "<select name='" . $selectname . "[]' multiple='multiple' size='10'>";
591
+        $ret = "<select name='".$selectname."[]' multiple='multiple' size='10'>";
592 592
         if ($allCatOption) {
593 593
             $ret .= "<option value='0'";
594 594
             if (\in_array(0, $selectedid)) {
595 595
                 $ret .= " selected='selected'";
596 596
             }
597
-            $ret .= '>' . _MB_PUBLISHER_ALLCAT . '</option>';
597
+            $ret .= '>'._MB_PUBLISHER_ALLCAT.'</option>';
598 598
         }
599 599
 
600 600
         // Creating category objects
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
         $ret = '';
625 625
         if ($allCatOption) {
626 626
             $ret .= "<option value='0'";
627
-            $ret .= '>' . _MB_PUBLISHER_ALLCAT . "</option>\n";
627
+            $ret .= '>'._MB_PUBLISHER_ALLCAT."</option>\n";
628 628
         }
629 629
 
630 630
         // Creating category objects
@@ -647,12 +647,12 @@  discard block
 block discarded – undo
647 647
     public static function renderErrors(&$err_arr, $reseturl = ''): void
648 648
     {
649 649
         if (\is_array($err_arr) && \count($err_arr) > 0) {
650
-            echo '<div id="readOnly" class="errorMsg" style="border:1px solid #D24D00; background:#FEFECC url(' . \PUBLISHER_URL . '/images/important-32.png) no-repeat 7px 50%;color:#333;padding-left:45px;">';
650
+            echo '<div id="readOnly" class="errorMsg" style="border:1px solid #D24D00; background:#FEFECC url('.\PUBLISHER_URL.'/images/important-32.png) no-repeat 7px 50%;color:#333;padding-left:45px;">';
651 651
 
652
-            echo '<h4 style="text-align:left;margin:0; padding-top:0">' . _AM_PUBLISHER_MSG_SUBMISSION_ERR;
652
+            echo '<h4 style="text-align:left;margin:0; padding-top:0">'._AM_PUBLISHER_MSG_SUBMISSION_ERR;
653 653
 
654 654
             if ($reseturl) {
655
-                echo ' <a href="' . $reseturl . '">[' . _AM_PUBLISHER_TEXT_SESSION_RESET . ']</a>';
655
+                echo ' <a href="'.$reseturl.'">['._AM_PUBLISHER_TEXT_SESSION_RESET.']</a>';
656 656
             }
657 657
 
658 658
             echo '</h4><ul>';
@@ -660,10 +660,10 @@  discard block
 block discarded – undo
660 660
             foreach ($err_arr as $key => $error) {
661 661
                 if (\is_array($error)) {
662 662
                     foreach ($error as $err) {
663
-                        echo '<li><a href="#' . $key . '" onclick="var e = xoopsGetElementById(\'' . $key . '\'); e.focus();">' . \htmlspecialchars($err) . '</a></li>';
663
+                        echo '<li><a href="#'.$key.'" onclick="var e = xoopsGetElementById(\''.$key.'\'); e.focus();">'.\htmlspecialchars($err).'</a></li>';
664 664
                     }
665 665
                 } else {
666
-                    echo '<li><a href="#' . $key . '" onclick="var e = xoopsGetElementById(\'' . $key . '\'); e.focus();">' . \htmlspecialchars($error) . '</a></li>';
666
+                    echo '<li><a href="#'.$key.'" onclick="var e = xoopsGetElementById(\''.$key.'\'); e.focus();">'.\htmlspecialchars($error).'</a></li>';
667 667
                 }
668 668
             }
669 669
             echo '</ul></div><br>';
@@ -691,11 +691,11 @@  discard block
 block discarded – undo
691 691
 
692 692
         $qs = '';
693 693
         foreach ($vars as $key => $value) {
694
-            $qs .= $joinStr . $key . '=' . $value;
694
+            $qs .= $joinStr.$key.'='.$value;
695 695
             $joinStr = $amp;
696 696
         }
697 697
 
698
-        return $page . '?' . $qs;
698
+        return $page.'?'.$qs;
699 699
     }
700 700
 
701 701
     /**
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
         }
710 710
         $target_uri = $xoops->url($_SERVER['REQUEST_URI']);
711 711
 
712
-        return $xoops->url('modules/tellafriend/index.php?target_uri=' . \rawurlencode($target_uri) . '&amp;subject=' . \rawurlencode($subject));
712
+        return $xoops->url('modules/tellafriend/index.php?target_uri='.\rawurlencode($target_uri).'&amp;subject='.\rawurlencode($subject));
713 713
     }
714 714
 
715 715
     /**
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 
758 758
                 $message = \sprintf(_CO_PUBLISHER_MESSAGE_FILE_ERROR, $errorstxt);
759 759
                 if ($withRedirect) {
760
-                    $xoops->redirect('file.php?op=mod&itemid=' . $itemid, 5, $message);
760
+                    $xoops->redirect('file.php?op=mod&itemid='.$itemid, 5, $message);
761 761
                 } else {
762 762
                     return $message;
763 763
                 }
@@ -767,15 +767,15 @@  discard block
 block discarded – undo
767 767
         // Storing the file
768 768
         if (!$fileObj->store($allowed_mimetypes)) {
769 769
             if ($withRedirect) {
770
-                $xoops->redirect('file.php?op=mod&itemid=' . $fileObj->getVar('itemid'), 3, _CO_PUBLISHER_FILEUPLOAD_ERROR . self::formatErrors($fileObj->getErrors()));
770
+                $xoops->redirect('file.php?op=mod&itemid='.$fileObj->getVar('itemid'), 3, _CO_PUBLISHER_FILEUPLOAD_ERROR.self::formatErrors($fileObj->getErrors()));
771 771
             } else {
772
-                return _CO_PUBLISHER_FILEUPLOAD_ERROR . self::formatErrors($fileObj->getErrors());
772
+                return _CO_PUBLISHER_FILEUPLOAD_ERROR.self::formatErrors($fileObj->getErrors());
773 773
             }
774 774
         }
775 775
 
776 776
         if ($withRedirect) {
777 777
             $redirect_page = $another ? 'file.php' : 'item.php';
778
-            $xoops->redirect($redirect_page . '?op=mod&itemid=' . $fileObj->getVar('itemid'), 2, _CO_PUBLISHER_FILEUPLOAD_SUCCESS);
778
+            $xoops->redirect($redirect_page.'?op=mod&itemid='.$fileObj->getVar('itemid'), 2, _CO_PUBLISHER_FILEUPLOAD_SUCCESS);
779 779
         }
780 780
 
781 781
         return true;
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 
784 784
     public static function newFeatureTag(): string
785 785
     {
786
-        $ret = '<span style="padding-right: 4px; font-weight: bold; color: #ff0000;">' . _CO_PUBLISHER_NEW_FEATURE . '</span>';
786
+        $ret = '<span style="padding-right: 4px; font-weight: bold; color: #ff0000;">'._CO_PUBLISHER_NEW_FEATURE.'</span>';
787 787
 
788 788
         return $ret;
789 789
     }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
                 $string = self::closeTags($string);
827 827
             }
828 828
 
829
-            return $string . $etc;
829
+            return $string.$etc;
830 830
         }
831 831
 
832 832
         return $string;
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 
863 863
             $complete_tags = \array_reverse($complete_tags);
864 864
             foreach ($complete_tags as $iValue) {
865
-                $string .= '</' . $iValue . '>';
865
+                $string .= '</'.$iValue.'>';
866 866
             }
867 867
         }
868 868
 
@@ -911,27 +911,27 @@  discard block
 block discarded – undo
911 911
 
912 912
         if (!$gpermHandler->checkRight('global', \_PUBLISHER_RATE, $groups, $helper->getModule()->getVar('mid'))) {
913 913
             $static_rater = [];
914
-            $static_rater[] .= "\n" . '<div class="publisher_ratingblock">';
915
-            $static_rater[] .= '<div id="unit_long' . $itemid . '">';
916
-            $static_rater[] .= '<div id="unit_ul' . $itemid . '" class="publisher_unit-rating" style="width:' . $rating_unitwidth * $units . 'px;">';
917
-            $static_rater[] .= '<div class="publisher_current-rating" style="width:' . $rating_width . 'px;">' . _MD_PUBLISHER_VOTE_RATING . ' ' . $rating2 . '/' . $units . '</div>';
914
+            $static_rater[] .= "\n".'<div class="publisher_ratingblock">';
915
+            $static_rater[] .= '<div id="unit_long'.$itemid.'">';
916
+            $static_rater[] .= '<div id="unit_ul'.$itemid.'" class="publisher_unit-rating" style="width:'.$rating_unitwidth * $units.'px;">';
917
+            $static_rater[] .= '<div class="publisher_current-rating" style="width:'.$rating_width.'px;">'._MD_PUBLISHER_VOTE_RATING.' '.$rating2.'/'.$units.'</div>';
918 918
             $static_rater[] .= '</div>';
919
-            $static_rater[] .= '<div class="publisher_static">' . _MD_PUBLISHER_VOTE_RATING . ': <strong> ' . $rating1 . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ') <br><em>' . _MD_PUBLISHER_VOTE_DISABLE . '</em></div>';
919
+            $static_rater[] .= '<div class="publisher_static">'._MD_PUBLISHER_VOTE_RATING.': <strong> '.$rating1.'</strong>/'.$units.' ('.$count.' '.$tense.') <br><em>'._MD_PUBLISHER_VOTE_DISABLE.'</em></div>';
920 920
             $static_rater[] .= '</div>';
921
-            $static_rater[] .= '</div>' . "\n\n";
921
+            $static_rater[] .= '</div>'."\n\n";
922 922
 
923 923
             return \implode("\n", $static_rater);
924 924
         }
925 925
 
926 926
         $rater = '';
927 927
         $rater .= '<div class="publisher_ratingblock">';
928
-        $rater .= '<div id="unit_long' . $itemid . '">';
929
-        $rater .= '<div id="unit_ul' . $itemid . '" class="publisher_unit-rating" style="width:' . $rating_unitwidth * $units . 'px;">';
930
-        $rater .= '<div class="publisher_current-rating" style="width:' . $rating_width . 'px;">' . _MD_PUBLISHER_VOTE_RATING . ' ' . $rating2 . '/' . $units . '</div>';
928
+        $rater .= '<div id="unit_long'.$itemid.'">';
929
+        $rater .= '<div id="unit_ul'.$itemid.'" class="publisher_unit-rating" style="width:'.$rating_unitwidth * $units.'px;">';
930
+        $rater .= '<div class="publisher_current-rating" style="width:'.$rating_width.'px;">'._MD_PUBLISHER_VOTE_RATING.' '.$rating2.'/'.$units.'</div>';
931 931
 
932 932
         for ($ncount = 1; $ncount <= $units; ++$ncount) { // loop from 1 to the number of units
933 933
             if (!$voted) { // if the user hasn't yet voted, draw the voting stars
934
-                $rater .= '<div><a href="' . \PUBLISHER_URL . '/rate.php?itemid=' . $itemid . '&amp;rating=' . $ncount . '" title="' . $ncount . ' ' . _MD_PUBLISHER_VOTE_OUTOF . ' ' . $units . '" class="publisher_r' . $ncount . '-unit rater" rel="nofollow">' . $ncount . '</a></div>';
934
+                $rater .= '<div><a href="'.\PUBLISHER_URL.'/rate.php?itemid='.$itemid.'&amp;rating='.$ncount.'" title="'.$ncount.' '._MD_PUBLISHER_VOTE_OUTOF.' '.$units.'" class="publisher_r'.$ncount.'-unit rater" rel="nofollow">'.$ncount.'</a></div>';
935 935
             }
936 936
         }
937 937
 
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
             $rater .= ' class="publisher_voted"';
943 943
         }
944 944
 
945
-        $rater .= '>' . _MD_PUBLISHER_VOTE_RATING . ': <strong> ' . $rating1 . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ')';
945
+        $rater .= '>'._MD_PUBLISHER_VOTE_RATING.': <strong> '.$rating1.'</strong>/'.$units.' ('.$count.' '.$tense.')';
946 946
         $rater .= '  </div>';
947 947
         $rater .= '</div>';
948 948
         $rater .= '</div>';
@@ -1152,12 +1152,12 @@  discard block
 block discarded – undo
1152 1152
         $helper = Helper::getInstance();
1153 1153
         if ('none' !== $helper->getConfig('seo_url_rewrite')) {
1154 1154
             if (!empty($short_url)) {
1155
-                $short_url = $short_url . '.html';
1155
+                $short_url = $short_url.'.html';
1156 1156
             }
1157 1157
 
1158 1158
             if ('htaccess' === $helper->getConfig('seo_url_rewrite')) {
1159 1159
                 // generate SEO url using htaccess
1160
-                return XoopsBaseConfig::get('url') . '/' . $helper->getConfig('seo_module_name') . ".${op}.${id}/${short_url}";
1160
+                return XoopsBaseConfig::get('url').'/'.$helper->getConfig('seo_module_name').".${op}.${id}/${short_url}";
1161 1161
             }
1162 1162
 
1163 1163
             if ('path-info' === $helper->getConfig('seo_url_rewrite')) {
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/FileHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  * @author          The SmartFactory <www.smartfactory.ca>
29 29
  * @version         $Id$
30 30
  */
31
-require_once \dirname(__DIR__) . '/include/common.php';
31
+require_once \dirname(__DIR__).'/include/common.php';
32 32
 
33 33
 // File status
34 34
 \define('_PUBLISHER_STATUS_FILE_NOTSET', -1);
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/formdatetime.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @author          trabis <[email protected]>
27 27
  * @version         $Id$
28 28
  */
29
-require_once \dirname(__DIR__) . '/include/common.php';
29
+require_once \dirname(__DIR__).'/include/common.php';
30 30
 
31 31
 /**
32 32
  * Class FormDateTime
@@ -48,16 +48,16 @@  discard block
 block discarded – undo
48 48
         $value = (int)$value;
49 49
         $value = ($value > 0) ? $value : \time();
50 50
         $datetime = \getdate($value);
51
-        $this->addElement(new DateSelect('', $name . '[date]', $value));
51
+        $this->addElement(new DateSelect('', $name.'[date]', $value));
52 52
         $timearray = [];
53 53
         for ($i = 0; $i < 24; ++$i) {
54 54
             for ($j = 0; $j < 60; $j = $j + 10) {
55 55
                 $key = ($i * 3600) + ($j * 60);
56
-                $timearray[$key] = (0 != $j) ? $i . ':' . $j : $i . ':0' . $j;
56
+                $timearray[$key] = (0 != $j) ? $i.':'.$j : $i.':0'.$j;
57 57
             }
58 58
         }
59 59
         \ksort($timearray);
60
-        $timeselect = new Select('', $name . '[time]', $datetime['hours'] * 3600 + 600 * \floor($datetime['minutes'] / 10));
60
+        $timeselect = new Select('', $name.'[time]', $datetime['hours'] * 3600 + 600 * \floor($datetime['minutes'] / 10));
61 61
         $timeselect->addOptionArray($timearray);
62 62
         $this->addElement($timeselect);
63 63
     }
Please login to merge, or discard this patch.