Completed
Push — master ( 5061b6...54eaec )
by Michael
12:20 queued 12:16
created
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.
htdocs/modules/publisher/author_items.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @author          trabis <[email protected]>
22 22
  * @version         $Id$
23 23
  */
24
-require_once __DIR__ . '/header.php';
24
+require_once __DIR__.'/header.php';
25 25
 
26 26
 $xoops = Xoops::getInstance();
27 27
 $uid = Request::getInt('uid');
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 $xoopsTpl->assign('categories', $categories);
90 90
 
91
-$title = _MD_PUBLISHER_ITEMS_SAME_AUTHOR . ' - ' . $author_name;
91
+$title = _MD_PUBLISHER_ITEMS_SAME_AUTHOR.' - '.$author_name;
92 92
 
93 93
 /**
94 94
  * Generating meta information for this page
Please login to merge, or discard this patch.
htdocs/modules/publisher/category.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * @author          The SmartFactory <www.smartfactory.ca>
25 25
  * @version         $Id$
26 26
  */
27
-require_once __DIR__ . '/header.php';
27
+require_once __DIR__.'/header.php';
28 28
 
29 29
 $xoops = Xoops::getInstance();
30 30
 $helper = Helper::getInstance();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 // Added by skalpa: custom template support
62 62
 if (!$template = $categoryObj->template()) {
63
-    $template = 'module:publisher/publisher_display_' . $helper->getConfig('idxcat_items_display_type') . '.tpl';
63
+    $template = 'module:publisher/publisher_display_'.$helper->getConfig('idxcat_items_display_type').'.tpl';
64 64
 }
65 65
 
66 66
 $xoops->header($template);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     for ($i = 0; $i < $totalItemOnPage; ++$i) {
182 182
         $item = $itemsObj[$i]->toArray('default', $helper->getConfig('item_title_size'));
183 183
         $item['categoryname'] = $categoryObj->getVar('name');
184
-        $item['categorylink'] = "<a href='" . Publisher\Utils::seoGenUrl('category', $itemsObj[$i]->getVar('categoryid'), $categoryObj->getVar('short_url')) . "'>" . $categoryObj->getVar('name') . '</a>';
184
+        $item['categorylink'] = "<a href='".Publisher\Utils::seoGenUrl('category', $itemsObj[$i]->getVar('categoryid'), $categoryObj->getVar('short_url'))."'>".$categoryObj->getVar('name').'</a>';
185 185
         $item['who_when'] = $itemsObj[$i]->getWhoAndWhen();
186 186
         $xoopsTpl->append('items', $item);
187 187
     }
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
 $xoopsTpl->assign('selected_category', $categoryid);
212 212
 
213 213
 // The Navigation Bar
214
-$pagenav = new XoopsPageNav($thiscategory_itemcount, $helper->getConfig('idxcat_index_perpage'), $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid'));
214
+$pagenav = new XoopsPageNav($thiscategory_itemcount, $helper->getConfig('idxcat_index_perpage'), $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid'));
215 215
 if (1 == $helper->getConfig('format_image_nav')) {
216
-    $navbar = '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>';
216
+    $navbar = '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>';
217 217
 } else {
218
-    $navbar = '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
218
+    $navbar = '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
219 219
 }
220 220
 $xoopsTpl->assign('navbar', $navbar);
221 221
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
 // RSS Link
229 229
 if (1 == $helper->getConfig('idxcat_show_rss_link')) {
230
-    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL . '/backend.php?categoryid=' . $categoryid, _MD_PUBLISHER_RSSFEED, PUBLISHER_URL . '/images/rss.gif', _MD_PUBLISHER_RSSFEED);
230
+    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL.'/backend.php?categoryid='.$categoryid, _MD_PUBLISHER_RSSFEED, PUBLISHER_URL.'/images/rss.gif', _MD_PUBLISHER_RSSFEED);
231 231
     $xoopsTpl->assign('rssfeed_link', $link);
232 232
 }
233 233
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/list.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 // todo: Check this file
22
-require __DIR__ . '/header.php';
23
-include XoopsBaseConfig::get('root-path') . '/modules/tag/list.tag.php';
22
+require __DIR__.'/header.php';
23
+include XoopsBaseConfig::get('root-path').'/modules/tag/list.tag.php';
Please login to merge, or discard this patch.
htdocs/modules/publisher/item.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @author          The SmartFactory <www.smartfactory.ca>
26 26
  * @version         $Id$
27 27
  */
28
-require_once __DIR__ . '/header.php';
28
+require_once __DIR__.'/header.php';
29 29
 $xoops = Xoops::getInstance();
30 30
 $helper = Helper::getInstance();
31 31
 $myts = Sanitizer::getInstance();
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 $xoops->header('module:publisher/publisher_item.tpl');
50 50
 $xoopsTpl = $xoops->tpl();
51 51
 $xoTheme = $xoops->theme();
52
-$xoTheme->addStylesheet(PUBLISHER_URL . '/css/jquery.popeye.style.css');
52
+$xoTheme->addStylesheet(PUBLISHER_URL.'/css/jquery.popeye.style.css');
53 53
 $xoTheme->addBaseScriptAssets('@jquery');
54
-$xoTheme->addScript(PUBLISHER_URL . '/js/jquery.popeye-2.0.4.js');
54
+$xoTheme->addScript(PUBLISHER_URL.'/js/jquery.popeye-2.0.4.js');
55 55
 $xoTheme->addBaseScriptAssets('modules/publisher/js/publisher.js');
56 56
 
57 57
 XoopsLoad::loadFile($helper->path('footer.php'));
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     if (-1 == $item_page_id) {
138 138
         $item_page_id = 0;
139 139
     }
140
-    $pagenav = new XoopsPageNav($itemObj->getVar('pagescount'), 1, $item_page_id, 'page', 'itemid=' . $itemObj->getVar('itemid'));
140
+    $pagenav = new XoopsPageNav($itemObj->getVar('pagescount'), 1, $item_page_id, 'page', 'itemid='.$itemObj->getVar('itemid'));
141 141
     $xoopsTpl->assign('pagenav', $pagenav->renderNav());
142 142
 }
143 143
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
     if ('application/x-shockwave-flash' === $fileObj->getVar('mimetype')) {
165 165
         $file['content'] = $fileObj->displayFlash();
166
-        if (mb_strpos($item['maintext'], '[flash-' . $fileObj->getVar('fileid') . ']')) {
167
-            $item['maintext'] = str_replace('[flash-' . $fileObj->getVar('fileid') . ']', $file['content'], $item['maintext']);
166
+        if (mb_strpos($item['maintext'], '[flash-'.$fileObj->getVar('fileid').']')) {
167
+            $item['maintext'] = str_replace('[flash-'.$fileObj->getVar('fileid').']', $file['content'], $item['maintext']);
168 168
         } else {
169 169
             $embeded_files[] = $file;
170 170
         }
@@ -185,12 +185,12 @@  discard block
 block discarded – undo
185 185
 unset($file, $embeded_files, $filesObj, $fileObj);
186 186
 
187 187
 // Language constants
188
-$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')) . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')) . ': ' . $itemObj->getItemUrl());
188
+$xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')).'&amp;body='.sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')).': '.$itemObj->getItemUrl());
189 189
 $xoopsTpl->assign('itemid', $itemObj->getVar('itemid'));
190 190
 $xoopsTpl->assign('sectionname', $helper->getModule()->getVar('name'));
191 191
 $xoopsTpl->assign('modulename', $helper->getModule()->getVar('dirname'));
192 192
 $xoopsTpl->assign('module_home', Publisher\Utils::moduleHome($helper->getConfig('format_linked_path')));
193
-$xoopsTpl->assign('categoryPath', $item['categoryPath'] . ' > ' . $item['title']);
193
+$xoopsTpl->assign('categoryPath', $item['categoryPath'].' > '.$item['title']);
194 194
 $xoopsTpl->assign('commentatarticlelevel', $helper->getConfig('perm_com_art_level'));
195 195
 $xoopsTpl->assign('com_rule', $helper->getConfig('com_rule'));
196 196
 $xoopsTpl->assign('other_items', $helper->getConfig('item_other_items_type'));
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
 // tags support
201 201
 if ($xoops->isActiveModule('tag')) {
202
-    require_once XoopsBaseConfig::get('root-path') . '/modules/tag/include/tagbar.php';
202
+    require_once XoopsBaseConfig::get('root-path').'/modules/tag/include/tagbar.php';
203 203
     $xoopsTpl->assign('tagbar', tagBar($itemid, $catid = 0));
204 204
 }
205 205
 
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
 if ($helper->getConfig('perm_rating')) {
228 228
     $xoopsTpl->assign('rating_enabled', true);
229 229
     $item['ratingbar'] = Publisher\Utils::ratingBar($itemid);
230
-    $xoTheme->addScript(PUBLISHER_URL . '/js/behavior.js');
231
-    $xoTheme->addScript(PUBLISHER_URL . '/js/rating.js');
230
+    $xoTheme->addScript(PUBLISHER_URL.'/js/behavior.js');
231
+    $xoTheme->addScript(PUBLISHER_URL.'/js/rating.js');
232 232
 }
233 233
 
234 234
 $xoopsTpl->assign('item', $item);
Please login to merge, or discard this patch.
htdocs/modules/publisher/view.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 //todo: check this file
22
-require_once __DIR__ . '/header.php';
23
-require_once XoopsBaseConfig::get('root-path') . '/modules/tag/view.tag.php';
22
+require_once __DIR__.'/header.php';
23
+require_once XoopsBaseConfig::get('root-path').'/modules/tag/view.tag.php';
Please login to merge, or discard this patch.
htdocs/modules/publisher/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @author          The SmartFactory <www.smartfactory.ca>
26 26
  * @version         $Id$
27 27
  */
28
-require_once __DIR__ . '/header.php';
28
+require_once __DIR__.'/header.php';
29 29
 
30 30
 $xoops = Xoops::getInstance();
31 31
 $helper = Helper::getInstance();
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     $xoops->redirect(XoopsBaseConfig::get('url'), 2, _MD_PUBLISHER_NO_TOP_PERMISSIONS);
46 46
 }
47 47
 
48
-$xoops->header('module:publisher/publisher_display' . '_' . $helper->getConfig('idxcat_items_display_type') . '.tpl');
48
+$xoops->header('module:publisher/publisher_display'.'_'.$helper->getConfig('idxcat_items_display_type').'.tpl');
49 49
 $xoopsTpl = $xoops->tpl();
50 50
 XoopsLoad::loadFile($helper->path('footer.php'));
51 51
 
@@ -192,16 +192,16 @@  discard block
 block discarded – undo
192 192
 // Category Navigation Bar
193 193
 $pagenav = new XoopsPageNav($totalCategories, $helper->getConfig('idxcat_cat_perpage'), $catstart, 'catstart', '');
194 194
 if (1 == $helper->getConfig('format_image_nav')) {
195
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
195
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
196 196
 } else {
197
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
197
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
198 198
 }
199 199
 // ITEM Navigation Bar
200 200
 $pagenav = new XoopsPageNav($real_total_items, $helper->getConfig('idxcat_index_perpage'), $start, 'start', '');
201 201
 if (1 == $helper->getConfig('format_image_nav')) {
202
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
202
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
203 203
 } else {
204
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
204
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
205 205
 }
206 206
 //show subcategories
207 207
 $xoopsTpl->assign('show_subcats', $helper->getConfig('idxcat_show_subcats'));
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
 // RSS Link
217 217
 if (1 == $helper->getConfig('idxcat_show_rss_link')) {
218
-    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL . '/backend.php', _MD_PUBLISHER_RSSFEED, PUBLISHER_URL . '/images/rss.gif', _MD_PUBLISHER_RSSFEED);
218
+    $link = sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s'></a>", PUBLISHER_URL.'/backend.php', _MD_PUBLISHER_RSSFEED, PUBLISHER_URL.'/images/rss.gif', _MD_PUBLISHER_RSSFEED);
219 219
     $xoopsTpl->assign('rssfeed_link', $link);
220 220
 }
221 221
 
Please login to merge, or discard this patch.