Completed
Pull Request — master (#622)
by Richard
29:20 queued 24s
created
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/Utils.php 1 patch
Spacing   +51 added lines, -51 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
 
@@ -902,36 +902,36 @@  discard block
 block discarded – undo
902 902
         $tense = 1 == $count ? _MD_PUBLISHER_VOTE_lVOTE : _MD_PUBLISHER_VOTE_lVOTES; //plural form votes/vote
903 903
 
904 904
         // now draw the rating bar
905
-        $rating_width = @\number_format($count==0 ? 0 : ($current_rating / $count), 2) * $rating_unitwidth;
906
-        $rating1 = @\number_format($count==0 ? 0 : ($current_rating / $count), 1);
907
-        $rating2 = @\number_format($count==0 ? 0 : ($current_rating / $count), 2);
905
+        $rating_width = @\number_format($count == 0 ? 0 : ($current_rating / $count), 2) * $rating_unitwidth;
906
+        $rating1 = @\number_format($count == 0 ? 0 : ($current_rating / $count), 1);
907
+        $rating2 = @\number_format($count == 0 ? 0 : ($current_rating / $count), 2);
908 908
 
909 909
         $groups = $xoops->getUserGroups();
910 910
         $gpermHandler = $helper->getGrouppermHandler();
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/Category.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @author          The SmartFactory <www.smartfactory.ca>
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 Category
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 if ($parentObj->notLoaded()) {
134 134
                     exit;
135 135
                 }
136
-                $ret = $parentObj->getCategoryPath($withAllLink) . ' > ' . $ret;
136
+                $ret = $parentObj->getCategoryPath($withAllLink).' > '.$ret;
137 137
             }
138 138
             $this->_categoryPath = $ret;
139 139
         }
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
     public function getCategoryLink($class = false): ?string
189 189
     {
190 190
         if ($class) {
191
-            return "<a class='$class' href='" . $this->getCategoryUrl() . "'>" . $this->getVar('name') . '</a>';
191
+            return "<a class='$class' href='".$this->getCategoryUrl()."'>".$this->getVar('name').'</a>';
192 192
         }
193 193
 
194
-        return "<a href='" . $this->getCategoryUrl() . "'>" . $this->getVar('name') . '</a>';
194
+        return "<a href='".$this->getCategoryUrl()."'>".$this->getVar('name').'</a>';
195 195
     }
196 196
 
197 197
     /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             $category['last_title_link'] = $this->getVar('last_title_link', 'n');
250 250
         }
251 251
         if ('blank.png' !== $this->image()) {
252
-            $category['image_path'] = Publisher\Utils::getImageDir('category', false) . $this->image();
252
+            $category['image_path'] = Publisher\Utils::getImageDir('category', false).$this->image();
253 253
         } else {
254 254
             $category['image_path'] = '';
255 255
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             $category['last_title_link'] = $this->getVar('last_title_link', 'n');
273 273
         }
274 274
         if ('blank.png' !== $this->image()) {
275
-            $category['image_path'] = Publisher\Utils::getImageDir('category', false) . $this->image();
275
+            $category['image_path'] = Publisher\Utils::getImageDir('category', false).$this->image();
276 276
         } else {
277 277
             $category['image_path'] = '';
278 278
         }
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/Rating.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  * @author          trabis <[email protected]>
25 25
  * @version         $Id$
26 26
  */
27
-require_once \dirname(__DIR__) . '/include/common.php';
27
+require_once \dirname(__DIR__).'/include/common.php';
28 28
 
29 29
 /**
30 30
  * Class Rating
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.
htdocs/modules/publisher/src/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
         $ret = false;
122 122
         //        /** @var Connection $db */
123 123
         $db = XoopsDatabaseFactory::getConnection();
124
-        $class = '\\XoopsModules\\' . \ucfirst(mb_strtolower(\basename(\dirname(__DIR__)))) . '\\' . $name . 'Handler';
124
+        $class = '\\XoopsModules\\'.\ucfirst(mb_strtolower(\basename(\dirname(__DIR__)))).'\\'.$name.'Handler';
125 125
         $ret = new $class($db);
126 126
 
127 127
         return $ret;
Please login to merge, or discard this patch.
htdocs/modules/publisher/class/plugin/comments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function update($item_id, $total_num)
81 81
     {
82 82
         $db = Xoops::getInstance()->db();
83
-        $sql = 'UPDATE ' . $db->prefix('publisher_items') . ' SET comments = ' . (int)$total_num . ' WHERE itemid = ' . (int)$item_id;
83
+        $sql = 'UPDATE '.$db->prefix('publisher_items').' SET comments = '.(int)$total_num.' WHERE itemid = '.(int)$item_id;
84 84
         $db->query($sql);
85 85
     }
86 86
 
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
     public function itemInfo($item_id)
101 101
     {
102 102
         $ret = [];
103
-        require_once \dirname(\dirname(__DIR__)) . '/include/common.php';
103
+        require_once \dirname(\dirname(__DIR__)).'/include/common.php';
104 104
 
105 105
         /* @var Publisher\Item $itemObj */
106 106
         $itemObj = Helper::getInstance()->getItemHandler()->get((int)$item_id);
107 107
         $ret['text'] = '';
108 108
         $summary = $itemObj->summary();
109 109
         if ('' != $summary) {
110
-            $ret['text'] .= $summary . '<br><br>';
110
+            $ret['text'] .= $summary.'<br><br>';
111 111
         }
112 112
         $ret['text'] .= $itemObj->body();
113 113
         $ret['title'] = $itemObj->title();
Please login to merge, or discard this patch.
htdocs/modules/publisher/class/plugin/notifications.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 use Xoops\Module\Plugin\PluginAbstract;
29 29
 use XoopsModules\Publisher;
30 30
 
31
-require_once \dirname(\dirname(__DIR__)) . '/include/common.php';
31
+require_once \dirname(\dirname(__DIR__)).'/include/common.php';
32 32
 
33 33
 /**
34 34
  * Class NotificationsPlugin
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         if ('category' === $category) {
59 59
             // Assume we have a valid category id
60
-            $sql = 'SELECT name, short_url FROM ' . $xoopsDB->prefix('publisher_categories') . ' WHERE categoryid  = ' . $item_id;
60
+            $sql = 'SELECT name, short_url FROM '.$xoopsDB->prefix('publisher_categories').' WHERE categoryid  = '.$item_id;
61 61
             $result = $xoopsDB->query($sql); // TODO: error check
62 62
             $result_array = $xoopsDB->fetchArray($result);
63 63
             $item['name'] = $result_array['name'];
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         if ('item' === $category) {
70 70
             // Assume we have a valid story id
71
-            $sql = 'SELECT title, short_url FROM ' . $xoopsDB->prefix('publisher_items') . ' WHERE itemid = ' . $item_id;
71
+            $sql = 'SELECT title, short_url FROM '.$xoopsDB->prefix('publisher_items').' WHERE itemid = '.$item_id;
72 72
             $result = $xoopsDB->query($sql); // TODO: error check
73 73
             $result_array = $xoopsDB->fetchArray($result);
74 74
             $item['name'] = $result_array['title'];
Please login to merge, or discard this patch.