Completed
Pull Request — master (#616)
by Richard
13:56
created
htdocs/modules/publisher/include/search.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $hightlight_key = '';
41 41
     } else {
42 42
         $keywords = implode('+', $queryarray);
43
-        $hightlight_key = '&keywords=' . $keywords;
43
+        $hightlight_key = '&keywords='.$keywords;
44 44
     }
45 45
     $itemsObjs = $helper->getItemHandler()->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra);
46 46
     $withCategoryPath = $helper->getConfig('search_cat_path');
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
     foreach ($itemsObjs as $obj) {
51 51
         $item['image'] = 'images/item_icon.gif';
52 52
         $item['link'] = $obj->getItemUrl();
53
-        $item['link'] .= (!empty($hightlight_key) && (false === mb_strpos($item['link'], '.php?'))) ? '?' . ltrim($hightlight_key, '&') : $hightlight_key;
53
+        $item['link'] .= (!empty($hightlight_key) && (false === mb_strpos($item['link'], '.php?'))) ? '?'.ltrim($hightlight_key, '&') : $hightlight_key;
54 54
         if ($withCategoryPath) {
55
-            $item['title'] = $obj->getCategoryPath(false) . ' > ' . $obj->title();
55
+            $item['title'] = $obj->getCategoryPath(false).' > '.$obj->title();
56 56
         } else {
57 57
             $item['title'] = $obj->title();
58 58
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             $start = max($pos - 100, 0);
71 71
             $length = mb_strlen($query) + 200; //xoops_local("strlen", $query) + 200;
72 72
             $context = $obj->highlight(XoopsLocale::substr($text, $start, $length, ' [...]'), $query);
73
-            $sanitized_text .= '<p>[...] ' . $context . '</p>';
73
+            $sanitized_text .= '<p>[...] '.$context.'</p>';
74 74
         }
75 75
 
76 76
         //End of highlight
Please login to merge, or discard this patch.
htdocs/modules/publisher/backend.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 use Xoops\Core\XoopsTpl;
23 23
 use XoopsModules\Publisher;
24 24
 
25
-require_once __DIR__ . '/header.php';
25
+require_once __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 $xoops->disableErrorReporting();
28 28
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     $categoryObj = $helper->getCategoryHandler()->get($categoryid);
38 38
 }
39 39
 
40
-header('Content-Type:text/xml; charset=' . XoopsLocale::getCharset());
40
+header('Content-Type:text/xml; charset='.XoopsLocale::getCharset());
41 41
 $tpl = new XoopsTpl();
42 42
 $tpl->caching = 2;
43 43
 $tpl->cache_lifetime = 0;
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
     $tpl->assign('channel_editor', $xoops->getConfig('adminmail'));
55 55
 
56 56
     if (-1 != $categoryid) {
57
-        $channel_category .= ' > ' . $categoryObj->getVar('name');
57
+        $channel_category .= ' > '.$categoryObj->getVar('name');
58 58
     }
59 59
 
60 60
     $tpl->assign('channel_category', htmlspecialchars($channel_category));
61 61
     $tpl->assign('channel_generator', $helper->getModule()->getVar('name'));
62 62
     $tpl->assign('channel_language', XoopsLocale::getLangCode());
63
-    $tpl->assign('image_url', XoopsBaseConfig::get('url') . '/images/logo.gif');
64
-    $dimention = getimagesize(XoopsBaseConfig::get('root-path') . '/images/logo.gif');
63
+    $tpl->assign('image_url', XoopsBaseConfig::get('url').'/images/logo.gif');
64
+    $dimention = getimagesize(XoopsBaseConfig::get('root-path').'/images/logo.gif');
65 65
     if (empty($dimention[0])) {
66 66
         $width = 140;
67 67
         $height = 140;
Please login to merge, or discard this patch.
htdocs/modules/publisher/pop.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,4 +23,4 @@
 block discarded – undo
23 23
 $doNotStartPrint = true;
24 24
 $noTitle         = true;
25 25
 $smartPopup      = true;
26
-require_once __DIR__ . '/print.php';
26
+require_once __DIR__.'/print.php';
Please login to merge, or discard this patch.
htdocs/modules/publisher/archive.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 // # [11-may-2001] Kenneth Lee - http://www.nexgear.com/
34 34
 // ######################################################################
35 35
 
36
-require_once __DIR__ . '/header.php';
36
+require_once __DIR__.'/header.php';
37 37
 
38 38
 $xoops = Xoops::getInstance();
39 39
 $helper = Helper::getInstance();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 $myts = Sanitizer::getInstance();
64
-$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES) . $pgtitle . ' - ' . $myts->htmlSpecialChars($xoopsModule->getVar('name')));
64
+$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_MD_PUBLISHER_ARCHIVES).$pgtitle.' - '.$myts->htmlSpecialChars($xoopsModule->getVar('name')));
65 65
 
66 66
 $useroffset = '';
67 67
 if ($xoops->isUser()) {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     $itemhandler->field_object = 'categoryid';
147 147
     // Categories for which user has access
148 148
     $categoriesGranted = $helper->getPermissionHandler()->getGrantedItems('category_read');
149
-    $grantedCategories = new Criteria('l.categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN');
149
+    $grantedCategories = new Criteria('l.categoryid', '('.implode(',', $categoriesGranted).')', 'IN');
150 150
     $criteria = new CriteriaCompo();
151 151
     $criteria->add($grantedCategories, 'AND');
152 152
     $criteria->add(new Criteria('o.status', 2), 'AND');
@@ -165,18 +165,18 @@  discard block
 block discarded – undo
165 165
         foreach ($storyarray as $item) {
166 166
             $story = [];
167 167
             $htmltitle = '';
168
-            $story['title'] = "<a href='" . XoopsBaseConfig::get('url') . '/modules/publisher/category.php?categoryid=' . $item->getVar('categoryid') . "'>" . $item->getCategoryName() . "</a>: <a href='" . $item->getItemUrl() . "'" . $htmltitle . '>' . $item->title() . '</a>';
168
+            $story['title'] = "<a href='".XoopsBaseConfig::get('url').'/modules/publisher/category.php?categoryid='.$item->getVar('categoryid')."'>".$item->getCategoryName()."</a>: <a href='".$item->getItemUrl()."'".$htmltitle.'>'.$item->title().'</a>';
169 169
             $story['counter'] = $item->getVar('counter');
170 170
             $story['date'] = $item->datesub();
171
-            $story['print_link'] = XoopsBaseConfig::get('url') . '/modules/publisher/print.php?itemid=' . $item->getVar('itemid');
172
-            $story['mail_link'] = 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')) . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')) . ':  ' . $item->getItemUrl();
171
+            $story['print_link'] = XoopsBaseConfig::get('url').'/modules/publisher/print.php?itemid='.$item->getVar('itemid');
172
+            $story['mail_link'] = 'mailto:?subject='.sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')).'&amp;body='.sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')).':  '.$item->getItemUrl();
173 173
 
174 174
             $xoopsTpl->append('stories', $story);
175 175
         }
176 176
     }
177 177
     $xoopsTpl->assign('lang_printer', _MD_PUBLISHER_PRINTERFRIENDLY);
178 178
     $xoopsTpl->assign('lang_sendstory', _MD_PUBLISHER_SENDSTORY);
179
-    $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS . ' ' . $count);
179
+    $xoopsTpl->assign('lang_storytotal', _MD_PUBLISHER_TOTAL_ITEMS.' '.$count);
180 180
 } else {
181 181
     $xoopsTpl->assign('show_articles', false);
182 182
 }
Please login to merge, or discard this patch.
htdocs/modules/publisher/xoops_version.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 $xoops = Xoops::getInstance();
22
-XoopsLoad::loadFile($xoops->path(__DIR__ . '/include/constants.php'));
22
+XoopsLoad::loadFile($xoops->path(__DIR__.'/include/constants.php'));
23 23
 
24 24
 $modversion['name'] = _MI_PUBLISHER_MD_NAME;
25 25
 $modversion['description'] = _MI_PUBLISHER_MD_DESC;
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 $modversion['namespace'] = 'XoopsModules\Publisher';
36 36
 //$modversion['namespace']   = basename(__DIR__);
37 37
 
38
-$logo_filename = $modversion['dirname'] . '_logo.png';
38
+$logo_filename = $modversion['dirname'].'_logo.png';
39 39
 
40
-if (XoopsLoad::fileExists(__DIR__ . '/images/' . $logo_filename)) {
40
+if (XoopsLoad::fileExists(__DIR__.'/images/'.$logo_filename)) {
41 41
     $modversion['image'] = "images/{$logo_filename}";
42 42
 } else {
43 43
     $modversion['image'] = 'images/module_logo.png';
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     'description' => _MI_PUBLISHER_DATE_TO_DATE_DSC,
159 159
     'show_func' => 'publisher_date_to_date_show',
160 160
     'edit_func' => 'publisher_date_to_date_edit',
161
-    'options' => XoopsLocale::formatTimestamp(time(), 'm/j/Y') . '|' . XoopsLocale::formatTimestamp(time(), 'm/j/Y'),
161
+    'options' => XoopsLocale::formatTimestamp(time(), 'm/j/Y').'|'.XoopsLocale::formatTimestamp(time(), 'm/j/Y'),
162 162
     'template' => 'publisher_date_to_date.tpl',
163 163
 ];
164 164
 
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
     'description' => '_MI_PUBLISHER_PRINTLOGOURLDSC',
655 655
     'formtype' => 'textbox',
656 656
     'valuetype' => 'text',
657
-    'default' => XoopsBaseConfig::get('url') . '/images/logo.gif',
657
+    'default' => XoopsBaseConfig::get('url').'/images/logo.gif',
658 658
     'category' => 'print',
659 659
 ];
660 660
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/GroupPermHandler.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 GroupPermHandler
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/RatingHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * @author          trabis <[email protected]>
26 26
  * @version         $Id$
27 27
  */
28
-require_once \dirname(__DIR__) . '/include/common.php';
28
+require_once \dirname(__DIR__).'/include/common.php';
29 29
 
30 30
 /**
31 31
  * Class RatingHandler
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/CategoryHandler.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  * @author          The SmartFactory <www.smartfactory.ca>
30 30
  * @version         $Id$
31 31
  */
32
-require_once \dirname(__DIR__) . '/include/common.php';
32
+require_once \dirname(__DIR__).'/include/common.php';
33 33
 
34 34
 /**
35 35
  * Categories handler class.
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         if (!Publisher\Utils::IsUserAdmin()) {
161 161
             $categoriesGranted = $this->helper->getPermissionHandler()->getGrantedItems('category_read');
162 162
             if (\count($categoriesGranted) > 0) {
163
-                $criteria->add(new Criteria('categoryid', '(' . \implode(',', $categoriesGranted) . ')', 'IN'));
163
+                $criteria->add(new Criteria('categoryid', '('.\implode(',', $categoriesGranted).')', 'IN'));
164 164
             } else {
165 165
                 return $ret;
166 166
             }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         for ($j = 0; $j < $level; ++$j) {
191 191
             $spaces .= '--';
192 192
         }
193
-        $theresult[$category['categoryid']] = $spaces . $category['name'];
193
+        $theresult[$category['categoryid']] = $spaces.$category['name'];
194 194
         if (isset($cat_array[$category['categoryid']])) {
195 195
             $level = $level + 1;
196 196
             foreach ($cat_array[$category['categoryid']] as $cat) {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         if (!Publisher\Utils::IsUserAdmin()) {
211 211
             $categoriesGranted = $this->helper->getPermissionHandler()->getGrantedItems('item_submit');
212 212
             if (\count($categoriesGranted) > 0) {
213
-                $criteria->add(new Criteria('categoryid', '(' . \implode(',', $categoriesGranted) . ')', 'IN'));
213
+                $criteria->add(new Criteria('categoryid', '('.\implode(',', $categoriesGranted).')', 'IN'));
214 214
             } else {
215 215
                 return $ret;
216 216
             }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         if (!Publisher\Utils::IsUserAdmin()) {
251 251
             $categoriesGranted = $this->helper->getPermissionHandler()->getGrantedItems('category_read');
252 252
             if (\count($categoriesGranted) > 0) {
253
-                $criteria->add(new Criteria('categoryid', '(' . \implode(',', $categoriesGranted) . ')', 'IN'));
253
+                $criteria->add(new Criteria('categoryid', '('.\implode(',', $categoriesGranted).')', 'IN'));
254 254
             } else {
255 255
                 return $ret;
256 256
             }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             if (!Publisher\Utils::IsUserAdmin()) {
295 295
                 $categoriesGranted = $this->helper->getPermissionHandler()->getGrantedItems('category_read');
296 296
                 if (\count($categoriesGranted) > 0) {
297
-                    $criteria->add(new Criteria('categoryid', '(' . \implode(',', $categoriesGranted) . ')', 'IN'));
297
+                    $criteria->add(new Criteria('categoryid', '('.\implode(',', $categoriesGranted).')', 'IN'));
298 298
                 } else {
299 299
                     return 0;
300 300
                 }
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
     public function &getSubCats($categories): array
316 316
     {
317 317
         $xoops = Xoops::getInstance();
318
-        $criteria = new CriteriaCompo(new Criteria('parentid', '(' . \implode(',', \array_keys($categories)) . ')', 'IN'));
318
+        $criteria = new CriteriaCompo(new Criteria('parentid', '('.\implode(',', \array_keys($categories)).')', 'IN'));
319 319
         $ret = [];
320 320
         if (!Publisher\Utils::IsUserAdmin()) {
321 321
             $categoriesGranted = $this->helper->getPermissionHandler()->getGrantedItems('category_read');
322 322
             if (\count($categoriesGranted) > 0) {
323
-                $criteria->add(new Criteria('categoryid', '(' . \implode(',', $categoriesGranted) . ')', 'IN'));
323
+                $criteria->add(new Criteria('categoryid', '('.\implode(',', $categoriesGranted).')', 'IN'));
324 324
             } else {
325 325
                 return $ret;
326 326
             }
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.