Completed
Push — master ( 5061b6...54eaec )
by Michael
12:20 queued 12:16
created
htdocs/modules/publisher/admin/menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 use XoopsModules\Publisher\Helper;
23 23
 
24
-require_once dirname(__DIR__) . '/include/common.php';
24
+require_once dirname(__DIR__).'/include/common.php';
25 25
 
26 26
 $helper = Helper::getInstance();
27 27
 $helper->loadLanguage('admin');
Please login to merge, or discard this patch.
htdocs/modules/publisher/admin/clone.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 use Xoops\Form\ThemeForm;
24 24
 use XoopsModules\Publisher;
25 25
 
26
-require_once __DIR__ . '/admin_header.php';
26
+require_once __DIR__.'/admin_header.php';
27 27
 
28 28
 $xoops = Xoops::getInstance();
29 29
 Publisher\Utils::cpHeader();
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     }
45 45
 
46 46
     // Check wether the cloned module exists or not
47
-    if ($clone && is_dir(XoopsBaseConfig::get('root-path') . '/modules/' . $clone)) {
47
+    if ($clone && is_dir(XoopsBaseConfig::get('root-path').'/modules/'.$clone)) {
48 48
         $xoops->redirect('clone.php', 3, sprintf(_AM_PUBLISHER_CLONE_EXISTS, $clone));
49 49
     }
50 50
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     $logocreated = publisher_createLogo(mb_strtolower($clone));
61 61
 
62 62
     $msg = '';
63
-    if (is_dir(XoopsBaseConfig::get('root-path') . '/modules/' . mb_strtolower($clone))) {
64
-        $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "<a href='" . XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=modulesadmin'>" . ucfirst(mb_strtolower($clone)) . '</a>') . "<br>\n";
63
+    if (is_dir(XoopsBaseConfig::get('root-path').'/modules/'.mb_strtolower($clone))) {
64
+        $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "<a href='".XoopsBaseConfig::get('url')."/modules/system/admin.php?fct=modulesadmin'>".ucfirst(mb_strtolower($clone)).'</a>')."<br>\n";
65 65
         if (!$logocreated) {
66 66
             $msg .= _AM_PUBLISHER_CLONE_IMAGEFAIL;
67 67
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         }
156 156
     }
157 157
 
158
-    if (!XoopsLoad::fileExists($imageBase = XoopsBaseConfig::get('root-path') . '/modules/' . $dirname . '/images/module_logo.png') || !XoopsLoad::fileExists($font = XoopsBaseConfig::get('root-path') . '/modules/' . $dirname . '/images/VeraBd.ttf')) {
158
+    if (!XoopsLoad::fileExists($imageBase = XoopsBaseConfig::get('root-path').'/modules/'.$dirname.'/images/module_logo.png') || !XoopsLoad::fileExists($font = XoopsBaseConfig::get('root-path').'/modules/'.$dirname.'/images/VeraBd.ttf')) {
159 159
         return false;
160 160
     }
161 161
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
175 175
     imagefill($imageModule, 0, 0, $white);
176 176
     imagecolortransparent($imageModule, $white);
177
-    imagepng($imageModule, XoopsBaseConfig::get('root-path') . '/modules/' . $dirname . '/images/module_logo.png');
177
+    imagepng($imageModule, XoopsBaseConfig::get('root-path').'/modules/'.$dirname.'/images/module_logo.png');
178 178
     imagedestroy($imageModule);
179 179
 
180 180
     return true;
Please login to merge, or discard this patch.
htdocs/modules/publisher/makepdf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @author          trabis <[email protected]>
26 26
  * @author          Sina Asghari (AKA stranger) <[email protected]>
27 27
  */
28
-require_once __DIR__ . '/header.php';
28
+require_once __DIR__.'/header.php';
29 29
 $xoops = Xoops::getInstance();
30 30
 $xoops->disableErrorReporting();
31 31
 
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
 $xoops->service('htmltopdf')->setKeywords($itemObj->getVar('meta_keywords'));
74 74
 $xoops->service('htmltopdf')->setSubject($categoryObj->getVar('name'));
75 75
 $xoops->service('htmltopdf')->addHtml($content);
76
-$name = $itemObj->getVar('short_url') . '.pdf';
76
+$name = $itemObj->getVar('short_url').'.pdf';
77 77
 $xoops->service('htmltopdf')->outputPdfInline($name);
78 78
 exit();
Please login to merge, or discard this patch.
htdocs/modules/publisher/search.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * @author          Taiwen Jiang <[email protected]>
25 25
  * @version         $Id$
26 26
  */
27
-require_once __DIR__ . '/header.php';
27
+require_once __DIR__.'/header.php';
28 28
 $xoops = Xoops::getInstance();
29 29
 
30 30
 $helper = Helper::getInstance();
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 //Checking general permissions
35 35
 $xoopsConfigSearch = $xoops->getConfigs();
36 36
 if (empty($xoopsConfigSearch['enable_search'])) {
37
-    $xoops->redirect(PUBLISHER_URL . '/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
37
+    $xoops->redirect(PUBLISHER_URL.'/index.php', 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
38 38
 }
39 39
 
40 40
 $groups = $xoops->getUserGroups();
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
             }
94 94
         }
95 95
         if (0 == count($queries)) {
96
-            $xoops->redirect(PUBLISHER_URL . '/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min']));
96
+            $xoops->redirect(PUBLISHER_URL.'/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min']));
97 97
             exit();
98 98
         }
99 99
     } else {
100 100
         if (mb_strlen($query) < $xoopsConfigSearch['keyword_min']) {
101
-            $xoops->redirect(PUBLISHER_URL . '/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min']));
101
+            $xoops->redirect(PUBLISHER_URL.'/search.php', 2, sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch['keyword_min']));
102 102
             exit();
103 103
         }
104 104
         $queries = [$query];
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
     if (!empty($search_username)) {
111 111
         $uname_required = true;
112 112
         $search_username = $search_username;
113
-        if (!$result = $xoopsDB->query('SELECT uid FROM ' . $xoopsDB->prefix('users') . ' WHERE uname LIKE ' . $xoopsDB->quoteString("%$search_username%"))) {
114
-            $xoops->redirect(PUBLISHER_URL . '/search.php', 1, _CO_PUBLISHER_ERROR);
113
+        if (!$result = $xoopsDB->query('SELECT uid FROM '.$xoopsDB->prefix('users').' WHERE uname LIKE '.$xoopsDB->quoteString("%$search_username%"))) {
114
+            $xoops->redirect(PUBLISHER_URL.'/search.php', 1, _CO_PUBLISHER_ERROR);
115 115
             exit();
116 116
         }
117 117
         $uid = [];
@@ -156,29 +156,29 @@  discard block
 block discarded – undo
156 156
         unset($next_search);
157 157
         unset($items);
158 158
     }
159
-    $search_url = $helper->url('search.php?' . $paras);
159
+    $search_url = $helper->url('search.php?'.$paras);
160 160
 
161 161
     if (count($results)) {
162 162
         $next = $start + $limit;
163 163
         $queries = implode(',', $queries);
164
-        $search_url_next = $search_url . "&start={$next}";
165
-        $search_next = '<a href="' . htmlspecialchars($search_url_next) . '">' . XoopsLocale::NEXT . '</a>';
164
+        $search_url_next = $search_url."&start={$next}";
165
+        $search_next = '<a href="'.htmlspecialchars($search_url_next).'">'.XoopsLocale::NEXT.'</a>';
166 166
         $xoopsTpl->assign('search_next', $search_next);
167 167
     }
168 168
     if ($start > 0) {
169 169
         $prev = $start - $limit;
170
-        $search_url_prev = $search_url . "&start={$prev}";
171
-        $search_prev = '<a href="' . htmlspecialchars($search_url_prev) . '">' . XoopsLocale::PREVIOUS . '</a>';
170
+        $search_url_prev = $search_url."&start={$prev}";
171
+        $search_prev = '<a href="'.htmlspecialchars($search_url_prev).'">'.XoopsLocale::PREVIOUS.'</a>';
172 172
         $xoopsTpl->assign('search_prev', $search_prev);
173 173
     }
174 174
 
175 175
     unset($results);
176
-    $search_info = XoopsLocale::KEYWORDS . ': ' . $myts->htmlSpecialChars($term);
176
+    $search_info = XoopsLocale::KEYWORDS.': '.$myts->htmlSpecialChars($term);
177 177
     if ($uname_required) {
178 178
         if ($search_info) {
179 179
             $search_info .= '<br>';
180 180
         }
181
-        $search_info .= _CO_PUBLISHER_UID . ': ' . $myts->htmlSpecialChars($search_username);
181
+        $search_info .= _CO_PUBLISHER_UID.': '.$myts->htmlSpecialChars($search_username);
182 182
     }
183 183
     $xoopsTpl->assign('search_info', $search_info);
184 184
 }
@@ -189,17 +189,17 @@  discard block
 block discarded – undo
189 189
 if ('OR' === $andor) {
190 190
     $type_select .= ' selected="selected"';
191 191
 }
192
-$type_select .= '>' . XoopsLocale::ANY_OR . '</option>';
192
+$type_select .= '>'.XoopsLocale::ANY_OR.'</option>';
193 193
 $type_select .= '<option value="AND"';
194 194
 if ('AND' === $andor) {
195 195
     $type_select .= ' selected="selected"';
196 196
 }
197
-$type_select .= '>' . XoopsLocale::ALL . '</option>';
197
+$type_select .= '>'.XoopsLocale::ALL.'</option>';
198 198
 $type_select .= '<option value="EXACT"';
199 199
 if ('EXACT' === $andor) {
200 200
     $type_select .= ' selected="selected"';
201 201
 }
202
-$type_select .= '>' . XoopsLocale::EXACT_MATCH . '</option>';
202
+$type_select .= '>'.XoopsLocale::EXACT_MATCH.'</option>';
203 203
 $type_select .= '</select>';
204 204
 
205 205
 /* category */
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 if (empty($category) || 0 == count($category)) {
211 211
     $select_category .= 'selected="selected"';
212 212
 }
213
-$select_category .= '>' . XoopsLocale::ALL . '</option>';
213
+$select_category .= '>'.XoopsLocale::ALL.'</option>';
214 214
 foreach ($categories as $id => $cat) {
215
-    $select_category .= '<option value="' . $id . '"';
215
+    $select_category .= '<option value="'.$id.'"';
216 216
     if (in_array($id, $category)) {
217 217
         $select_category .= 'selected="selected"';
218 218
     }
219
-    $select_category .= '>' . $cat . '</option>';
219
+    $select_category .= '>'.$cat.'</option>';
220 220
 }
221 221
 $select_category .= '</select>';
222 222
 
@@ -226,32 +226,32 @@  discard block
 block discarded – undo
226 226
 if (in_array('title', $searchin)) {
227 227
     $searchin_select .= ' checked';
228 228
 }
229
-$searchin_select .= '>' . _CO_PUBLISHER_TITLE . '&nbsp;&nbsp;';
229
+$searchin_select .= '>'._CO_PUBLISHER_TITLE.'&nbsp;&nbsp;';
230 230
 $searchin_select .= '<input type="checkbox" name="searchin[]" value="subtitle"';
231 231
 if (in_array('subtitle', $searchin)) {
232 232
     $searchin_select .= ' checked';
233 233
 }
234
-$searchin_select .= '>' . _CO_PUBLISHER_SUBTITLE . '&nbsp;&nbsp;';
234
+$searchin_select .= '>'._CO_PUBLISHER_SUBTITLE.'&nbsp;&nbsp;';
235 235
 $searchin_select .= '<input type="checkbox" name="searchin[]" value="summary"';
236 236
 if (in_array('summary', $searchin)) {
237 237
     $searchin_select .= ' checked';
238 238
 }
239
-$searchin_select .= '>' . _CO_PUBLISHER_SUMMARY . '&nbsp;&nbsp;';
239
+$searchin_select .= '>'._CO_PUBLISHER_SUMMARY.'&nbsp;&nbsp;';
240 240
 $searchin_select .= '<input type="checkbox" name="searchin[]" value="text"';
241 241
 if (in_array('body', $searchin)) {
242 242
     $searchin_select .= ' checked';
243 243
 }
244
-$searchin_select .= '>' . _CO_PUBLISHER_BODY . '&nbsp;&nbsp;';
244
+$searchin_select .= '>'._CO_PUBLISHER_BODY.'&nbsp;&nbsp;';
245 245
 $searchin_select .= '<input type="checkbox" name="searchin[]" value="keywords"';
246 246
 if (in_array('meta_keywords', $searchin)) {
247 247
     $searchin_select .= ' checked';
248 248
 }
249
-$searchin_select .= '>' . _CO_PUBLISHER_ITEM_META_KEYWORDS . '&nbsp;&nbsp;';
249
+$searchin_select .= '>'._CO_PUBLISHER_ITEM_META_KEYWORDS.'&nbsp;&nbsp;';
250 250
 $searchin_select .= '<input type="checkbox" name="searchin[]" value="all"';
251 251
 if (in_array('all', $searchin) || empty($searchin)) {
252 252
     $searchin_select .= ' checked';
253 253
 }
254
-$searchin_select .= '>' . XoopsLocale::ALL . '&nbsp;&nbsp;';
254
+$searchin_select .= '>'.XoopsLocale::ALL.'&nbsp;&nbsp;';
255 255
 
256 256
 /* sortby */
257 257
 $sortby_select = '<select name="sortby">';
@@ -259,22 +259,22 @@  discard block
 block discarded – undo
259 259
 if ('itemid' === $sortby || empty($sortby)) {
260 260
     $sortby_select .= ' selected="selected"';
261 261
 }
262
-$sortby_select .= '>' . XoopsLocale::NONE . '</option>';
262
+$sortby_select .= '>'.XoopsLocale::NONE.'</option>';
263 263
 $sortby_select .= '<option value="datesub"';
264 264
 if ('datesub' === $sortby) {
265 265
     $sortby_select .= ' selected="selected"';
266 266
 }
267
-$sortby_select .= '>' . _CO_PUBLISHER_DATESUB . '</option>';
267
+$sortby_select .= '>'._CO_PUBLISHER_DATESUB.'</option>';
268 268
 $sortby_select .= '<option value="title"';
269 269
 if ('title' === $sortby) {
270 270
     $sortby_select .= ' selected="selected"';
271 271
 }
272
-$sortby_select .= '>' . _CO_PUBLISHER_TITLE . '</option>';
272
+$sortby_select .= '>'._CO_PUBLISHER_TITLE.'</option>';
273 273
 $sortby_select .= '<option value="categoryid"';
274 274
 if ('categoryid' === $sortby) {
275 275
     $sortby_select .= ' selected="selected"';
276 276
 }
277
-$sortby_select .= '>' . _CO_PUBLISHER_CATEGORY . '</option>';
277
+$sortby_select .= '>'._CO_PUBLISHER_CATEGORY.'</option>';
278 278
 $sortby_select .= '</select>';
279 279
 
280 280
 $xoopsTpl->assign('type_select', $type_select);
Please login to merge, or discard this patch.
htdocs/modules/publisher/rate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * @author          trabis <[email protected]>
21 21
  * @version         $Id$
22 22
  */
23
-require_once __DIR__ . '/header.php';
23
+require_once __DIR__.'/header.php';
24 24
 
25 25
 $xoops = Xoops::getInstance();
26 26
 
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 //Checking permissions
37 37
 if (!$helper->getConfig('perm_rating')
38 38
     || !$gpermHandler->checkRight('global', _PUBLISHER_RATE, $groups, $module_id)) {
39
-    $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
39
+    $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
40 40
 }
41 41
 
42 42
 if ($rating > 5 || $rating < 1) {
43
-    $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_BAD);
43
+    $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_BAD);
44 44
 }
45 45
 
46 46
 $criteria = new Criteria('itemid', $itemid);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 }
62 62
 
63 63
 if ($voted) {
64
-    $xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_ALREADY);
64
+    $xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_ALREADY);
65 65
 }
66 66
 
67 67
 $newRatingObj = $helper->getRatingHandler()->create();
@@ -78,4 +78,4 @@  discard block
 block discarded – undo
78 78
 $helper->getItemHandler()->updateAll('rating', number_format($current_rating / $count, 4), $criteria, true);
79 79
 $helper->getItemHandler()->updateAll('votes', $count, $criteria, true);
80 80
 
81
-$xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_THANKS);
81
+$xoops->redirect(PUBLISHER_URL.'/item.php?itemid='.$itemid, 2, _MD_PUBLISHER_VOTE_THANKS);
Please login to merge, or discard this patch.
htdocs/modules/publisher/footer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@
 block discarded – undo
23 23
  * @author          The SmartFactory <www.smartfactory.ca>
24 24
  * @version         $Id$
25 25
  */
26
-require_once __DIR__ . '/include/common.php';
26
+require_once __DIR__.'/include/common.php';
27 27
 
28 28
 $helper = Helper::getInstance();
29 29
 
30 30
 $xoops = Xoops::getInstance();
31
-$xoops->theme()->addStylesheet(PUBLISHER_URL . '/css/publisher.css');
31
+$xoops->theme()->addStylesheet(PUBLISHER_URL.'/css/publisher.css');
32 32
 
33 33
 $xoopsTpl = $xoops->tpl();
34
-$xoopsTpl->assign('xoops_module_header', '<link rel="alternate" type="application/rss+xml" title="' . $helper->getModule()->getVar('name') . '" href="' . $helper->url('backend.php') . '">' . @$xoopsTpl->getTemplateVars('xoops_module_header'));
34
+$xoopsTpl->assign('xoops_module_header', '<link rel="alternate" type="application/rss+xml" title="'.$helper->getModule()->getVar('name').'" href="'.$helper->url('backend.php').'">'.@$xoopsTpl->getTemplateVars('xoops_module_header'));
35 35
 
36
-$xoopsTpl->assign('publisher_adminpage', "<a href='" . $helper->url('admin/index.php') . "'>" . _MD_PUBLISHER_ADMIN_PAGE . '</a>');
36
+$xoopsTpl->assign('publisher_adminpage', "<a href='".$helper->url('admin/index.php')."'>"._MD_PUBLISHER_ADMIN_PAGE.'</a>');
37 37
 $xoopsTpl->assign('isAdmin', Publisher\Utils::IsUserAdmin());
38 38
 $xoopsTpl->assign('publisher_url', $helper->url());
39 39
 $xoopsTpl->assign('publisher_images_url', $helper->url('images'));
Please login to merge, or discard this patch.
htdocs/modules/publisher/print.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author          trabis <[email protected]>
23 23
  * @author          The SmartFactory <www.smartfactory.ca>
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
 
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 
59 59
 $mainImage = $itemObj->getMainImage();
60 60
 if ('' != $mainImage['image_path']) {
61
-    $item['image'] = '<img src="' . $mainImage['image_path'] . '" alt="' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '">';
61
+    $item['image'] = '<img src="'.$mainImage['image_path'].'" alt="'.$myts->undoHtmlSpecialChars($mainImage['image_name']).'">';
62 62
 }
63 63
 $xoopsTpl->assign('item', $item);
64
-$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename') . ' - ' . Publisher\Utils::html2text($categoryObj->getCategoryPath()) . ' > ' . $myts->displayTarea($itemObj->title()));
64
+$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename').' - '.Publisher\Utils::html2text($categoryObj->getCategoryPath()).' > '.$myts->displayTarea($itemObj->title()));
65 65
 $xoopsTpl->assign('printlogourl', $helper->getConfig('print_logourl'));
66 66
 $xoopsTpl->assign('printheader', $myts->displayTarea($helper->getConfig('print_header'), 1));
67 67
 $xoopsTpl->assign('lang_category', _CO_PUBLISHER_CATEGORY);
Please login to merge, or discard this patch.
htdocs/modules/publisher/src/Item.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
  * @author          The SmartFactory <www.smartfactory.ca>
38 38
  * @version         $Id$
39 39
  */
40
-require_once \dirname(__DIR__) . '/include/common.php';
40
+require_once \dirname(__DIR__).'/include/common.php';
41 41
 
42 42
 /**
43 43
  * Class Item
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     public function wrappage($file_name): string
204 204
     {
205 205
         $content = '';
206
-        $page = Publisher\Utils::getUploadDir(true, 'content') . $file_name;
206
+        $page = Publisher\Utils::getUploadDir(true, 'content').$file_name;
207 207
         if (XoopsLoad::fileExists($page)) {
208 208
             // this page uses smarty template
209 209
             \ob_start();
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         if ($this->helper->getConfig('item_disp_blocks_summary')) {
258 258
             $summary = $this->summary($maxLength, $format, $stripTags);
259 259
             if ($summary) {
260
-                $ret = $this->summary() . '<br><br>' . $ret;
260
+                $ret = $this->summary().'<br><br>'.$ret;
261 261
             }
262 262
         }
263 263
         if (!empty($stripTags)) {
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 
389 389
     public function getCategoryImagePath(): string
390 390
     {
391
-        return Publisher\Utils::getImageDir('category', false) . $this->category()->image();
391
+        return Publisher\Utils::getImageDir('category', false).$this->category()->image();
392 392
     }
393 393
 
394 394
     /**
@@ -407,35 +407,35 @@  discard block
 block discarded – undo
407 407
             if (Publisher\Utils::IsUserAdmin() || Publisher\Utils::IsUserAuthor($this) || Publisher\Utils::IsUserModerator($this)) {
408 408
                 if ($this->helper->getConfig('perm_edit') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) {
409 409
                     // Edit button
410
-                    $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/edit.gif'" . " title='" . _CO_PUBLISHER_EDIT . "' alt='" . _CO_PUBLISHER_EDIT . "'></a>";
410
+                    $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/edit.gif'"." title='"._CO_PUBLISHER_EDIT."' alt='"._CO_PUBLISHER_EDIT."'></a>";
411 411
                     $adminLinks .= ' ';
412 412
                 }
413 413
                 if ($this->helper->getConfig('perm_delete') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) {
414 414
                     // Delete button
415
-                    $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?op=del&amp;itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/delete.png'" . " title='" . _CO_PUBLISHER_DELETE . "' alt='" . _CO_PUBLISHER_DELETE . "'></a>";
415
+                    $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?op=del&amp;itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/delete.png'"." title='"._CO_PUBLISHER_DELETE."' alt='"._CO_PUBLISHER_DELETE."'></a>";
416 416
                     $adminLinks .= ' ';
417 417
                 }
418 418
             }
419 419
             if ($this->helper->getConfig('perm_clone') || Publisher\Utils::IsUserModerator($this) || Publisher\Utils::IsUserAdmin()) {
420 420
                 // Duplicate button
421
-                $adminLinks .= "<a href='" . \PUBLISHER_URL . '/submit.php?op=clone&amp;itemid=' . $this->getVar('itemid') . "'><img src='" . \PUBLISHER_URL . "/images/links/clone.gif'" . " title='" . _CO_PUBLISHER_CLONE . "' alt='" . _CO_PUBLISHER_CLONE . "'></a>";
421
+                $adminLinks .= "<a href='".\PUBLISHER_URL.'/submit.php?op=clone&amp;itemid='.$this->getVar('itemid')."'><img src='".\PUBLISHER_URL."/images/links/clone.gif'"." title='"._CO_PUBLISHER_CLONE."' alt='"._CO_PUBLISHER_CLONE."'></a>";
422 422
                 $adminLinks .= ' ';
423 423
             }
424 424
         }
425 425
         // PDF button
426 426
         if ($xoops->service('htmltopdf')->isAvailable()) {
427
-            $adminLinks .= "<a href='" . \PUBLISHER_URL . '/makepdf.php?itemid=' . $this->getVar('itemid') . "' rel='nofollow' target='_blank'><img src='" . \PUBLISHER_URL . "/images/links/pdf.gif' title='" . _CO_PUBLISHER_PDF . "' alt='" . _CO_PUBLISHER_PDF . "'></a>";
427
+            $adminLinks .= "<a href='".\PUBLISHER_URL.'/makepdf.php?itemid='.$this->getVar('itemid')."' rel='nofollow' target='_blank'><img src='".\PUBLISHER_URL."/images/links/pdf.gif' title='"._CO_PUBLISHER_PDF."' alt='"._CO_PUBLISHER_PDF."'></a>";
428 428
             $adminLinks .= ' ';
429 429
         }
430 430
         // Print button
431
-        $adminLinks .= "<a href='" . Publisher\Utils::seoGenUrl('print', $this->getVar('itemid'), $this->getVar('short_url')) . "' rel='nofollow' target='_blank'><img src='" . \PUBLISHER_URL . "/images/links/print.gif' title='" . _CO_PUBLISHER_PRINT . "' alt='" . _CO_PUBLISHER_PRINT . "'></a>";
431
+        $adminLinks .= "<a href='".Publisher\Utils::seoGenUrl('print', $this->getVar('itemid'), $this->getVar('short_url'))."' rel='nofollow' target='_blank'><img src='".\PUBLISHER_URL."/images/links/print.gif' title='"._CO_PUBLISHER_PRINT."' alt='"._CO_PUBLISHER_PRINT."'></a>";
432 432
         $adminLinks .= ' ';
433 433
         // Email button
434 434
         if ($xoops->isActiveModule('tellafriend')) {
435 435
             $subject = \sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename'));
436 436
             $subject = $this->_convert_for_japanese($subject);
437 437
             $maillink = Publisher\Utils::tellafriend($subject);
438
-            $adminLinks .= '<a href="' . $maillink . '"><img src="' . \PUBLISHER_URL . '/images/links/friend.gif" title="' . _CO_PUBLISHER_MAIL . '" alt="' . _CO_PUBLISHER_MAIL . '"></a>';
438
+            $adminLinks .= '<a href="'.$maillink.'"><img src="'.\PUBLISHER_URL.'/images/links/friend.gif" title="'._CO_PUBLISHER_MAIL.'" alt="'._CO_PUBLISHER_MAIL.'"></a>';
439 439
             $adminLinks .= ' ';
440 440
         }
441 441
 
@@ -454,19 +454,19 @@  discard block
 block discarded – undo
454 454
             $tags['MODULE_NAME'] = $this->helper->getModule()->getVar('name');
455 455
             $tags['ITEM_NAME'] = $this->title();
456 456
             $tags['CATEGORY_NAME'] = $this->getCategoryName();
457
-            $tags['CATEGORY_URL'] = \PUBLISHER_URL . '/category.php?categoryid=' . $this->getVar('categoryid');
457
+            $tags['CATEGORY_URL'] = \PUBLISHER_URL.'/category.php?categoryid='.$this->getVar('categoryid');
458 458
             $tags['ITEM_BODY'] = $this->body();
459 459
             $tags['DATESUB'] = $this->datesub();
460 460
             foreach ($notifications as $notification) {
461 461
                 switch ($notification) {
462 462
                     case \_PUBLISHER_NOT_ITEM_PUBLISHED:
463
-                        $tags['ITEM_URL'] = \PUBLISHER_URL . '/item.php?itemid=' . $this->getVar('itemid');
463
+                        $tags['ITEM_URL'] = \PUBLISHER_URL.'/item.php?itemid='.$this->getVar('itemid');
464 464
                         $notificationHandler->triggerEvent('global', 0, 'published', $tags, [], $this->helper->getModule()->getVar('mid'));
465 465
                         $notificationHandler->triggerEvent('category', $this->getVar('categoryid'), 'published', $tags, [], $this->helper->getModule()->getVar('mid'));
466 466
                         $notificationHandler->triggerEvent('item', $this->getVar('itemid'), 'approved', $tags, [], $this->helper->getModule()->getVar('mid'));
467 467
                         break;
468 468
                     case \_PUBLISHER_NOT_ITEM_SUBMITTED:
469
-                        $tags['WAITINGFILES_URL'] = \PUBLISHER_URL . '/admin/item.php?itemid=' . $this->getVar('itemid');
469
+                        $tags['WAITINGFILES_URL'] = \PUBLISHER_URL.'/admin/item.php?itemid='.$this->getVar('itemid');
470 470
                         $notificationHandler->triggerEvent('global', 0, 'submitted', $tags, [], $this->helper->getModule()->getVar('mid'));
471 471
                         $notificationHandler->triggerEvent('category', $this->getVar('categoryid'), 'submitted', $tags, [], $this->helper->getModule()->getVar('mid'));
472 472
                         break;
@@ -500,10 +500,10 @@  discard block
 block discarded – undo
500 500
     public function getItemLink($class = false, $maxsize = 0): ?string
501 501
     {
502 502
         if ($class) {
503
-            return '<a class=' . $class . ' href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>';
503
+            return '<a class='.$class.' href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>';
504 504
         }
505 505
 
506
-        return '<a href="' . $this->getItemUrl() . '">' . $this->title($maxsize) . '</a>';
506
+        return '<a href="'.$this->getItemUrl().'">'.$this->title($maxsize).'</a>';
507 507
     }
508 508
 
509 509
     public function getWhoAndWhen(): string
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
             $imageObjs = [];
584 584
             if (\count($images_ids) > 0) {
585 585
                 $imageHandler = Images::getInstance()->getHandlerImages();
586
-                $criteria = new CriteriaCompo(new Criteria('image_id', '(' . \implode(',', $images_ids) . ')', 'IN'));
586
+                $criteria = new CriteriaCompo(new Criteria('image_id', '('.\implode(',', $images_ids).')', 'IN'));
587 587
                 $imageObjs = $imageHandler->getObjects($criteria, true);
588 588
                 unset($criteria);
589 589
             }
@@ -698,12 +698,12 @@  discard block
 block discarded – undo
698 698
         if (\is_object($images['main'])) {
699 699
             /* @var \ImagesImage $image */
700 700
             $image = $images['main'];
701
-            $dimensions = \getimagesize(XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name'));
701
+            $dimensions = \getimagesize(XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name'));
702 702
             $item['image_width'] = $dimensions[0];
703 703
             $item['image_height'] = $dimensions[1];
704
-            $item['image_path'] = XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name');
704
+            $item['image_path'] = XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name');
705 705
             // pass this on since some consumers build custom thumbnails
706
-            $item['image_vpath'] = 'uploads/' . $image->getVar('image_name');
706
+            $item['image_vpath'] = 'uploads/'.$image->getVar('image_name');
707 707
             $item['image_thumb'] = Xoops::getInstance()->service('thumbnail')->getImgUrl($item['image_vpath'], 0, 180)->getValue();
708 708
             $item['image_name'] = $image->getVar('image_nicename');
709 709
         }
@@ -722,11 +722,11 @@  discard block
 block discarded – undo
722 722
         $i = 0;
723 723
         /* @var \ImagesImage $image */
724 724
         foreach ($images['others'] as $image) {
725
-            $dimensions = \getimagesize(XoopsBaseConfig::get('root-path') . '/uploads/' . $image->getVar('image_name'));
725
+            $dimensions = \getimagesize(XoopsBaseConfig::get('root-path').'/uploads/'.$image->getVar('image_name'));
726 726
             $item['images'][$i]['width'] = $dimensions[0];
727 727
             $item['images'][$i]['height'] = $dimensions[1];
728
-            $item['images'][$i]['path'] = XoopsBaseConfig::get('url') . '/uploads/' . $image->getVar('image_name');
729
-            $item['images'][$i]['thumb'] = $thumbService->getImgUrl('uploads/' . $image->getVar('image_name'), 240, 0)->getValue();
728
+            $item['images'][$i]['path'] = XoopsBaseConfig::get('url').'/uploads/'.$image->getVar('image_name');
729
+            $item['images'][$i]['thumb'] = $thumbService->getImgUrl('uploads/'.$image->getVar('image_name'), 240, 0)->getValue();
730 730
             $item['images'][$i]['name'] = $image->getVar('image_nicename');
731 731
             ++$i;
732 732
         }
@@ -744,9 +744,9 @@  discard block
 block discarded – undo
744 744
     {
745 745
         $color = $this->helper->getConfig('format_highlight_color');
746 746
         if (0 !== \mb_strpos($color, '#')) {
747
-            $color = '#' . $color;
747
+            $color = '#'.$color;
748 748
         }
749
-        $pre = '<span style="font-weight: bolder; background-color: ' . $color . ';">';
749
+        $pre = '<span style="font-weight: bolder; background-color: '.$color.';">';
750 750
         $post = '</span>';
751 751
 
752 752
         return Highlighter::apply($keywords, $content, $pre, $post);
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.