Passed
Pull Request — master (#585)
by
unknown
17:41
created
htdocs/modules/publisher/submit.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include_once __DIR__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 $publisher = Publisher::getInstance();
28 28
 $publisher->loadLanguage('admin');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $xoops->redirect("index.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
48 48
     }
49 49
     if (!PublisherUtils::IsUserAdmin() || !PublisherUtils::IsUserModerator($itemObj)) {
50
-        if (isset($_GET['op']) && $_GET['op']  === 'del' && !$publisher->getConfig('perm_delete')) {
50
+        if (isset($_GET['op']) && $_GET['op'] === 'del' && !$publisher->getConfig('perm_delete')) {
51 51
             $xoops->redirect("index.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
52 52
         } elseif (!$publisher->getConfig('perm_edit')) {
53 53
             $xoops->redirect("index.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     'dohtml', 'dosmiley', 'doxcode', 'doimage', 'dolinebreak',
99 99
     'notify', 'subtitle', 'author_alias');
100 100
 foreach ($elements as $element) {
101
-    if (isset($_REQUEST[$element]) && !in_array(constant('_PUBLISHER_' . strtoupper($element)), $form_view)) {
101
+    if (isset($_REQUEST[$element]) && !in_array(constant('_PUBLISHER_'.strtoupper($element)), $form_view)) {
102 102
         $xoops->redirect("index.php", 1, _MD_PUBLISHER_SUBMIT_ERROR);
103 103
     }
104 104
 }
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
         if ($confirm) {
114 114
             if (!$publisher->getItemHandler()->delete($itemObj)) {
115
-                $xoops->redirect("index.php", 2, _AM_PUBLISHER_ITEM_DELETE_ERROR . PublisherUtils::formatErrors($itemObj->getErrors()));
115
+                $xoops->redirect("index.php", 2, _AM_PUBLISHER_ITEM_DELETE_ERROR.PublisherUtils::formatErrors($itemObj->getErrors()));
116 116
             }
117 117
             $xoops->redirect("index.php", 2, sprintf(_AM_PUBLISHER_ITEMISDELETED, $itemObj->title()));
118 118
         } else {
119 119
             $xoops->header();
120
-            echo $xoops->confirm(array('op' => 'del', 'itemid' => $itemObj->getVar('itemid'), 'confirm' => 1, 'name' => $itemObj->title()), 'submit.php', _AM_PUBLISHER_DELETETHISITEM . " <br />'" . $itemObj->title() . "'. <br /> <br />", _AM_PUBLISHER_DELETE);
120
+            echo $xoops->confirm(array('op' => 'del', 'itemid' => $itemObj->getVar('itemid'), 'confirm' => 1, 'name' => $itemObj->title()), 'submit.php', _AM_PUBLISHER_DELETETHISITEM." <br />'".$itemObj->title()."'. <br /> <br />", _AM_PUBLISHER_DELETE);
121 121
             $xoops->footer();
122 122
         }
123 123
         break;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $xoops->header('module:publisher/publisher_submit.tpl');
212 212
         $xoopsTpl = $xoops->tpl();
213 213
         $xoTheme = $xoops->theme();
214
-        $xoTheme->addScript(PUBLISHER_URL . '/js/publisher.js');
214
+        $xoTheme->addScript(PUBLISHER_URL.'/js/publisher.js');
215 215
         XoopsLoad::loadFile($publisher->path('footer.php'));
216 216
 
217 217
         $itemObj->setVarsFromRequest();
Please login to merge, or discard this patch.
htdocs/modules/publisher/print.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @author          The SmartFactory <www.smartfactory.ca>
22 22
  */
23 23
 
24
-include_once __DIR__ . '/header.php';
24
+include_once __DIR__.'/header.php';
25 25
 $xoops = Xoops::getInstance();
26 26
 $xoops->disableErrorReporting();
27 27
 
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 
58 58
 $mainImage = $itemObj->getMainImage();
59 59
 if ($mainImage['image_path'] != '') {
60
-    $item['image'] = '<img src="' . $mainImage['image_path'] . '" alt="'
61
-                    . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '"/>';
60
+    $item['image'] = '<img src="'.$mainImage['image_path'].'" alt="'
61
+                    . $myts->undoHtmlSpecialChars($mainImage['image_name']).'"/>';
62 62
 }
63 63
 $xoopsTpl->assign('item', $item);
64
-$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename') . " - " . PublisherUtils::html2text($categoryObj->getCategoryPath()) . " > " . $myts->displayTarea($itemObj->title()));
64
+$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename')." - ".PublisherUtils::html2text($categoryObj->getCategoryPath())." > ".$myts->displayTarea($itemObj->title()));
65 65
 $xoopsTpl->assign('printlogourl', $publisher->getConfig('print_logourl'));
66 66
 $xoopsTpl->assign('printheader', $myts->displayTarea($publisher->getConfig('print_header'), 1));
67 67
 $xoopsTpl->assign('lang_category', _CO_PUBLISHER_CATEGORY);
Please login to merge, or discard this patch.
htdocs/modules/publisher/search.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include_once __DIR__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 
28 28
 $publisher = Publisher::getInstance();
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 //Checking general permissions
33 33
 $xoopsConfigSearch = $xoops->getConfigs();
34 34
 if (empty($xoopsConfigSearch["enable_search"])) {
35
-    $xoops->redirect(PUBLISHER_URL . "/index.php", 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
35
+    $xoops->redirect(PUBLISHER_URL."/index.php", 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
36 36
 }
37 37
 
38 38
 $groups = $xoops->getUserGroups();
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
         if (count($queries) == 0) {
97 97
             $xoops->redirect(
98
-                PUBLISHER_URL . "/search.php",
98
+                PUBLISHER_URL."/search.php",
99 99
                 2,
100 100
                 sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch["keyword_min"])
101 101
             );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     } else {
105 105
         if (strlen($query) < $xoopsConfigSearch["keyword_min"]) {
106 106
             $xoops->redirect(
107
-                PUBLISHER_URL . "/search.php",
107
+                PUBLISHER_URL."/search.php",
108 108
                 2,
109 109
                 sprintf(XoopsLocale::EF_KEYWORDS_MUST_BE_GREATER_THAN, $xoopsConfigSearch["keyword_min"])
110 110
             );
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
         $uname_required = true;
121 121
         $search_username = $search_username;
122 122
         if (!$result = $xoopsDB->query(
123
-            "SELECT uid FROM " . $xoopsDB->prefix("users") .
124
-            " WHERE uname LIKE " . $xoopsDB->quoteString("%$search_username%")
123
+            "SELECT uid FROM ".$xoopsDB->prefix("users").
124
+            " WHERE uname LIKE ".$xoopsDB->quoteString("%$search_username%")
125 125
         )) {
126
-            $xoops->redirect(PUBLISHER_URL . "/search.php", 1, _CO_PUBLISHER_ERROR);
126
+            $xoops->redirect(PUBLISHER_URL."/search.php", 1, _CO_PUBLISHER_ERROR);
127 127
             exit();
128 128
         }
129 129
         $uid = array();
@@ -169,29 +169,29 @@  discard block
 block discarded – undo
169 169
         unset($next_search);
170 170
         unset($items);
171 171
     }
172
-    $search_url = $publisher->url("search.php?" . $paras);
172
+    $search_url = $publisher->url("search.php?".$paras);
173 173
 
174 174
     if (count($results)) {
175 175
         $next = $start + $limit;
176 176
         $queries = implode(",", $queries);
177
-        $search_url_next = $search_url . "&start={$next}";
178
-        $search_next = "<a href=\"" . htmlspecialchars($search_url_next) . "\">" . XoopsLocale::NEXT . "</a>";
177
+        $search_url_next = $search_url."&start={$next}";
178
+        $search_next = "<a href=\"".htmlspecialchars($search_url_next)."\">".XoopsLocale::NEXT."</a>";
179 179
         $xoopsTpl->assign("search_next", $search_next);
180 180
     }
181 181
     if ($start > 0) {
182 182
         $prev = $start - $limit;
183
-        $search_url_prev = $search_url . "&start={$prev}";
184
-        $search_prev = "<a href=\"" . htmlspecialchars($search_url_prev) . "\">" . XoopsLocale::PREVIOUS . "</a>";
183
+        $search_url_prev = $search_url."&start={$prev}";
184
+        $search_prev = "<a href=\"".htmlspecialchars($search_url_prev)."\">".XoopsLocale::PREVIOUS."</a>";
185 185
         $xoopsTpl->assign("search_prev", $search_prev);
186 186
     }
187 187
 
188 188
     unset($results);
189
-    $search_info = XoopsLocale::KEYWORDS . ": " . $myts->htmlSpecialChars($term);
189
+    $search_info = XoopsLocale::KEYWORDS.": ".$myts->htmlSpecialChars($term);
190 190
     if ($uname_required) {
191 191
         if ($search_info) {
192 192
             $search_info .= "<br />";
193 193
         }
194
-        $search_info .= _CO_PUBLISHER_UID . ": " . $myts->htmlSpecialChars($search_username);
194
+        $search_info .= _CO_PUBLISHER_UID.": ".$myts->htmlSpecialChars($search_username);
195 195
     }
196 196
     $xoopsTpl->assign("search_info", $search_info);
197 197
 }
@@ -202,17 +202,17 @@  discard block
 block discarded – undo
202 202
 if ("OR" === $andor) {
203 203
     $type_select .= " selected=\"selected\"";
204 204
 }
205
-$type_select .= ">" . XoopsLocale::ANY_OR . "</option>";
205
+$type_select .= ">".XoopsLocale::ANY_OR."</option>";
206 206
 $type_select .= "<option value=\"AND\"";
207 207
 if ("AND" === $andor) {
208 208
     $type_select .= " selected=\"selected\"";
209 209
 }
210
-$type_select .= ">" . XoopsLocale::ALL . "</option>";
210
+$type_select .= ">".XoopsLocale::ALL."</option>";
211 211
 $type_select .= "<option value=\"EXACT\"";
212 212
 if ("EXACT" === $andor) {
213 213
     $type_select .= " selected=\"selected\"";
214 214
 }
215
-$type_select .= ">" . XoopsLocale::EXACT_MATCH . "</option>";
215
+$type_select .= ">".XoopsLocale::EXACT_MATCH."</option>";
216 216
 $type_select .= "</select>";
217 217
 
218 218
 /* category */
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
 if (empty($category) || count($category) == 0) {
224 224
     $select_category .= "selected=\"selected\"";
225 225
 }
226
-$select_category .= ">" . XoopsLocale::ALL . "</option>";
226
+$select_category .= ">".XoopsLocale::ALL."</option>";
227 227
 foreach ($categories as $id => $cat) {
228
-    $select_category .= "<option value=\"" . $id . "\"";
228
+    $select_category .= "<option value=\"".$id."\"";
229 229
     if (in_array($id, $category)) {
230 230
         $select_category .= "selected=\"selected\"";
231 231
     }
232
-    $select_category .= ">" . $cat . "</option>";
232
+    $select_category .= ">".$cat."</option>";
233 233
 }
234 234
 $select_category .= "</select>";
235 235
 
@@ -239,32 +239,32 @@  discard block
 block discarded – undo
239 239
 if (in_array("title", $searchin)) {
240 240
     $searchin_select .= " checked";
241 241
 }
242
-$searchin_select .= " />" . _CO_PUBLISHER_TITLE . "&nbsp;&nbsp;";
242
+$searchin_select .= " />"._CO_PUBLISHER_TITLE."&nbsp;&nbsp;";
243 243
 $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"subtitle\"";
244 244
 if (in_array("subtitle", $searchin)) {
245 245
     $searchin_select .= " checked";
246 246
 }
247
-$searchin_select .= " />" . _CO_PUBLISHER_SUBTITLE . "&nbsp;&nbsp;";
247
+$searchin_select .= " />"._CO_PUBLISHER_SUBTITLE."&nbsp;&nbsp;";
248 248
 $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"summary\"";
249 249
 if (in_array("summary", $searchin)) {
250 250
     $searchin_select .= " checked";
251 251
 }
252
-$searchin_select .= " />" . _CO_PUBLISHER_SUMMARY . "&nbsp;&nbsp;";
252
+$searchin_select .= " />"._CO_PUBLISHER_SUMMARY."&nbsp;&nbsp;";
253 253
 $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"text\"";
254 254
 if (in_array("body", $searchin)) {
255 255
     $searchin_select .= " checked";
256 256
 }
257
-$searchin_select .= " />" . _CO_PUBLISHER_BODY . "&nbsp;&nbsp;";
257
+$searchin_select .= " />"._CO_PUBLISHER_BODY."&nbsp;&nbsp;";
258 258
 $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"keywords\"";
259 259
 if (in_array("meta_keywords", $searchin)) {
260 260
     $searchin_select .= " checked";
261 261
 }
262
-$searchin_select .= " />" . _CO_PUBLISHER_ITEM_META_KEYWORDS . "&nbsp;&nbsp;";
262
+$searchin_select .= " />"._CO_PUBLISHER_ITEM_META_KEYWORDS."&nbsp;&nbsp;";
263 263
 $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"all\"";
264 264
 if (in_array("all", $searchin) || empty($searchin)) {
265 265
     $searchin_select .= " checked";
266 266
 }
267
-$searchin_select .= " />" . XoopsLocale::ALL . "&nbsp;&nbsp;";
267
+$searchin_select .= " />".XoopsLocale::ALL."&nbsp;&nbsp;";
268 268
 
269 269
 /* sortby */
270 270
 $sortby_select = "<select name=\"sortby\">";
@@ -272,22 +272,22 @@  discard block
 block discarded – undo
272 272
 if ("itemid" === $sortby || empty($sortby)) {
273 273
     $sortby_select .= " selected=\"selected\"";
274 274
 }
275
-$sortby_select .= ">" . XoopsLocale::NONE . "</option>";
275
+$sortby_select .= ">".XoopsLocale::NONE."</option>";
276 276
 $sortby_select .= "<option value=\"datesub\"";
277 277
 if ("datesub" === $sortby) {
278 278
     $sortby_select .= " selected=\"selected\"";
279 279
 }
280
-$sortby_select .= ">" . _CO_PUBLISHER_DATESUB . "</option>";
280
+$sortby_select .= ">"._CO_PUBLISHER_DATESUB."</option>";
281 281
 $sortby_select .= "<option value=\"title\"";
282 282
 if ("title" === $sortby) {
283 283
     $sortby_select .= " selected=\"selected\"";
284 284
 }
285
-$sortby_select .= ">" . _CO_PUBLISHER_TITLE . "</option>";
285
+$sortby_select .= ">"._CO_PUBLISHER_TITLE."</option>";
286 286
 $sortby_select .= "<option value=\"categoryid\"";
287 287
 if ("categoryid" === $sortby) {
288 288
     $sortby_select .= " selected=\"selected\"";
289 289
 }
290
-$sortby_select .= ">" . _CO_PUBLISHER_CATEGORY . "</option>";
290
+$sortby_select .= ">"._CO_PUBLISHER_CATEGORY."</option>";
291 291
 $sortby_select .= "</select>";
292 292
 
293 293
 $xoopsTpl->assign("type_select", $type_select);
Please login to merge, or discard this patch.
htdocs/modules/publisher/item.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include_once __DIR__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 $publisher = Publisher::getInstance();
28 28
 $myts = \Xoops\Core\Text\Sanitizer::getInstance();
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 $xoops->header('module:publisher/publisher_item.tpl');
47 47
 $xoopsTpl = $xoops->tpl();
48 48
 $xoTheme = $xoops->theme();
49
-$xoTheme->addStylesheet(PUBLISHER_URL . '/css/jquery.popeye.style.css');
49
+$xoTheme->addStylesheet(PUBLISHER_URL.'/css/jquery.popeye.style.css');
50 50
 $xoTheme->addBaseScriptAssets('@jquery');
51
-$xoTheme->addScript(PUBLISHER_URL . '/js/jquery.popeye-2.0.4.js');
51
+$xoTheme->addScript(PUBLISHER_URL.'/js/jquery.popeye-2.0.4.js');
52 52
 $xoTheme->addBaseScriptAssets('modules/publisher/js/publisher.js');
53 53
 
54 54
 XoopsLoad::loadFile($publisher->path('footer.php'));
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $theitem['titlelink'] = $theitemObj->getItemLink();
119 119
         $theitem['datesub'] = $theitemObj->datesub();
120 120
         $theitem['counter'] = $theitemObj->getVar('counter');
121
-        if ($theitemObj->getVar('itemid')== $itemObj->getVar('itemid')) {
121
+        if ($theitemObj->getVar('itemid') == $itemObj->getVar('itemid')) {
122 122
             $theitem['titlelink'] = $theitemObj->title();
123 123
         }
124 124
         $items[] = $theitem;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     if ($item_page_id == -1) {
137 137
         $item_page_id = 0;
138 138
     }
139
-    $pagenav = new XoopsPageNav($itemObj->getVar('pagescount'), 1, $item_page_id, 'page', 'itemid=' . $itemObj->getVar('itemid'));
139
+    $pagenav = new XoopsPageNav($itemObj->getVar('pagescount'), 1, $item_page_id, 'page', 'itemid='.$itemObj->getVar('itemid'));
140 140
     $xoopsTpl->assign('pagenav', $pagenav->renderNav());
141 141
 }
142 142
 
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
 foreach ($filesObj as $fileObj) {
157 157
     $file = array();
158 158
     $file['mod'] = false;
159
-    if ($hasFilePermissions || ($xoops->isUser() && $fileObj->getVar('uid') == $xoops->user->getVar('uid') )) {
159
+    if ($hasFilePermissions || ($xoops->isUser() && $fileObj->getVar('uid') == $xoops->user->getVar('uid'))) {
160 160
         $file['mod'] = true;
161 161
     }
162 162
 
163 163
     if ($fileObj->getVar('mimetype') === 'application/x-shockwave-flash') {
164 164
         $file['content'] = $fileObj->displayFlash();
165
-        if (strpos($item['maintext'], '[flash-' . $fileObj->getVar('fileid') . ']')) {
166
-            $item['maintext'] = str_replace('[flash-' . $fileObj->getVar('fileid') . ']', $file['content'], $item['maintext']);
165
+        if (strpos($item['maintext'], '[flash-'.$fileObj->getVar('fileid').']')) {
166
+            $item['maintext'] = str_replace('[flash-'.$fileObj->getVar('fileid').']', $file['content'], $item['maintext']);
167 167
         } else {
168 168
             $embeded_files[] = $file;
169 169
         }
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 unset($file, $embeded_files, $filesObj, $fileObj);
185 185
 
186 186
 // Language constants
187
-$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $xoops->getConfig('sitename')) . '&amp;body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $xoops->getConfig('sitename')) . ': ' . $itemObj->getItemUrl());
187
+$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 188
 $xoopsTpl->assign('itemid', $itemObj->getVar('itemid'));
189 189
 $xoopsTpl->assign('sectionname', $publisher->getModule()->getVar('name'));
190 190
 $xoopsTpl->assign('modulename', $publisher->getModule()->getVar('dirname'));
191 191
 $xoopsTpl->assign('module_home', PublisherUtils::moduleHome($publisher->getConfig('format_linked_path')));
192
-$xoopsTpl->assign('categoryPath', $item['categoryPath'] . " > " . $item['title']);
192
+$xoopsTpl->assign('categoryPath', $item['categoryPath']." > ".$item['title']);
193 193
 $xoopsTpl->assign('commentatarticlelevel', $publisher->getConfig('perm_com_art_level'));
194 194
 $xoopsTpl->assign('com_rule', $publisher->getConfig('com_rule'));
195 195
 $xoopsTpl->assign('other_items', $publisher->getConfig('item_other_items_type'));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
 // tags support
200 200
 if ($xoops->isActiveModule('tag')) {
201
-    include_once \XoopsBaseConfig::get('root-path') . '/modules/tag/include/tagbar.php';
201
+    include_once \XoopsBaseConfig::get('root-path').'/modules/tag/include/tagbar.php';
202 202
     $xoopsTpl->assign('tagbar', tagBar($itemid, $catid = 0));
203 203
 }
204 204
 
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
 if ($publisher->getConfig('perm_rating')) {
227 227
     $xoopsTpl->assign('rating_enabled', true);
228 228
     $item['ratingbar'] = PublisherUtils::ratingBar($itemid);
229
-    $xoTheme->addScript(PUBLISHER_URL . '/js/behavior.js');
230
-    $xoTheme->addScript(PUBLISHER_URL . '/js/rating.js');
229
+    $xoTheme->addScript(PUBLISHER_URL.'/js/behavior.js');
230
+    $xoTheme->addScript(PUBLISHER_URL.'/js/rating.js');
231 231
 }
232 232
 
233 233
 $xoopsTpl->assign('item', $item);
Please login to merge, or discard this patch.
htdocs/modules/publisher/preloads/preload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
     {
33 33
         $path = dirname(__DIR__);
34 34
         XoopsLoad::addMap(array(
35
-            'publishermetagen' => $path . '/class/metagen.php',
36
-            'publisher' => $path . '/class/helper.php',
37
-            'publisherutils' => $path . '/class/utils.php',
38
-            'publisherblockform' => $path . '/class/blockform.php',
35
+            'publishermetagen' => $path.'/class/metagen.php',
36
+            'publisher' => $path.'/class/helper.php',
37
+            'publisherutils' => $path.'/class/utils.php',
38
+            'publisherblockform' => $path.'/class/blockform.php',
39 39
         ));
40 40
     }
41 41
 }
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
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include_once __DIR__ . '/header.php';
25
+include_once __DIR__.'/header.php';
26 26
 
27 27
 $xoops = Xoops::getInstance();
28 28
 $publisher = Publisher::getInstance();
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 // Added by skalpa: custom template support
60 60
 if (!$template = $categoryObj->template()) {
61
-    $template = 'module:publisher/publisher_display_' . $publisher->getConfig('idxcat_items_display_type') . '.tpl';
61
+    $template = 'module:publisher/publisher_display_'.$publisher->getConfig('idxcat_items_display_type').'.tpl';
62 62
 }
63 63
 
64 64
 $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', $publisher->getConfig('item_title_size'));
183 183
         $item['categoryname'] = $categoryObj->getVar('name');
184
-        $item['categorylink'] = "<a href='" . PublisherUtils::seoGenUrl('category', $itemsObj[$i]->getVar('categoryid'), $categoryObj->getVar('short_url')) . "'>" . $categoryObj->getVar('name') . "</a>";
184
+        $item['categorylink'] = "<a href='".PublisherUtils::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, $publisher->getConfig('idxcat_index_perpage'), $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid'));
214
+$pagenav = new XoopsPageNav($thiscategory_itemcount, $publisher->getConfig('idxcat_index_perpage'), $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid'));
215 215
 if ($publisher->getConfig('format_image_nav') == 1) {
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 ($publisher->getConfig('idxcat_show_rss_link') == 1) {
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/include/ajax_rating.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  * @version         $Id$
33 33
  */
34 34
 
35
-include_once dirname(__DIR__) . '/header.php';
35
+include_once dirname(__DIR__).'/header.php';
36 36
 
37 37
 $xoops = Xoops::getInstance();
38 38
 $xoops->disableErrorReporting();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 //Checking permissions
56 56
 if (!$publisher->getConfig('perm_rating') || !$gperm_handler->checkRight('global', _PUBLISHER_RATE, $groups, $module_id)) {
57
-    $output = "unit_long$itemid|" . XoopsLocale::E_NO_ACCESS_PERMISSION . "\n";
57
+    $output = "unit_long$itemid|".XoopsLocale::E_NO_ACCESS_PERMISSION."\n";
58 58
     echo $output;
59 59
     exit();
60 60
 }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 $units = 5;
64 64
 
65 65
 if ($rating > 5 || $rating < 1) {
66
-    $output = "unit_long$itemid|" . _MD_PUBLISHER_VOTE_BAD . "\n";
66
+    $output = "unit_long$itemid|"._MD_PUBLISHER_VOTE_BAD."\n";
67 67
     echo $output;
68 68
     exit();
69 69
 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 }
86 86
 
87 87
 if ($voted) {
88
-    $output = "unit_long$itemid|" . _MD_PUBLISHER_VOTE_ALREADY . "\n";
88
+    $output = "unit_long$itemid|"._MD_PUBLISHER_VOTE_ALREADY."\n";
89 89
     echo $output;
90 90
     exit();
91 91
 }
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 // $new_back is what gets 'drawn' on your page after a successful 'AJAX/Javascript' vote
110 110
 $new_back = array();
111 111
 
112
-$new_back[] .= '<div class="publisher_unit-rating" style="width:' . $units * $rating_unitwidth . 'px;">';
113
-$new_back[] .= '<div class="publisher_current-rating" style="width:' . @number_format($current_rating / $count, 2) * $rating_unitwidth . 'px;">' . _MD_PUBLISHER_VOTE_RATING . '</div>';
112
+$new_back[] .= '<div class="publisher_unit-rating" style="width:'.$units * $rating_unitwidth.'px;">';
113
+$new_back[] .= '<div class="publisher_current-rating" style="width:'.@number_format($current_rating / $count, 2) * $rating_unitwidth.'px;">'._MD_PUBLISHER_VOTE_RATING.'</div>';
114 114
 $new_back[] .= '<div class="publisher_r1-unit">1</div>';
115 115
 $new_back[] .= '<div class="publisher_r2-unit">2</div>';
116 116
 $new_back[] .= '<div class="publisher_r3-unit">3</div>';
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 $new_back[] .= '<div class="publisher_r9-unit">9</div>';
123 123
 $new_back[] .= '<div class="publisher_r10-unit">10</div>';
124 124
 $new_back[] .= '</div>';
125
-$new_back[] .= '<div class="publisher_voted">' . _MD_PUBLISHER_VOTE_RATING . ' <strong>' . @number_format($current_rating / $count, 2) . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ')</div>';
126
-$new_back[] .= '<div class="publisher_thanks">' . _MD_PUBLISHER_VOTE_THANKS . '</div>';
125
+$new_back[] .= '<div class="publisher_voted">'._MD_PUBLISHER_VOTE_RATING.' <strong>'.@number_format($current_rating / $count, 2).'</strong>/'.$units.' ('.$count.' '.$tense.')</div>';
126
+$new_back[] .= '<div class="publisher_thanks">'._MD_PUBLISHER_VOTE_THANKS.'</div>';
127 127
 
128 128
 $allnewback = join("\n", $new_back);
129 129
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/ajax_upload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 
28 28
 use Xoops\Core\FixedGroups;
29 29
 
30
-include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
31
-include_once __DIR__ . '/common.php';
30
+include dirname(dirname(dirname(__DIR__))).'/mainfile.php';
31
+include_once __DIR__.'/common.php';
32 32
 
33 33
 $xoops = Xoops::getInstance();
34 34
 $xoops->disableErrorReporting();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 $image = null;
74 74
 if ($error == false) {
75
-    $uploader = new XoopsMediaUploader(\XoopsBaseConfig::get('uploads-path') . '/images', array(
75
+    $uploader = new XoopsMediaUploader(\XoopsBaseConfig::get('uploads-path').'/images', array(
76 76
         'image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'
77 77
     ), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight'));
78 78
     $uploader->setPrefix('img');
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             }
102 102
         }
103 103
     } else {
104
-        $error = sprintf(_CO_PUBLISHER_FAILSAVEIMG, $filename) . "<br>" . implode("<br>", $uploader->getErrors(false));
104
+        $error = sprintf(_CO_PUBLISHER_FAILSAVEIMG, $filename)."<br>".implode("<br>", $uploader->getErrors(false));
105 105
     }
106 106
 }
107 107
 
Please login to merge, or discard this patch.
htdocs/modules/publisher/include/seo.inc.php 1 patch
Spacing   +4 added lines, -4 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
 
22
-include_once dirname(__DIR__) . '/include/common.php';
22
+include_once dirname(__DIR__).'/include/common.php';
23 23
 
24 24
 $publisher = Publisher::getInstance();
25 25
 
@@ -54,21 +54,21 @@  discard block
 block discarded – undo
54 54
     // per their requirements.
55 55
 
56 56
     $url_arr = explode('/modules/', $_SERVER['PHP_SELF']);
57
-    $newUrl = $url_arr[0] . '/modules/' . PUBLISHER_DIRNAME . '/' . $seoMap[$seoOp];
57
+    $newUrl = $url_arr[0].'/modules/'.PUBLISHER_DIRNAME.'/'.$seoMap[$seoOp];
58 58
 
59 59
     $_ENV['PHP_SELF'] = $newUrl;
60 60
     $_SERVER['SCRIPT_NAME'] = $newUrl;
61 61
     $_SERVER['PHP_SELF'] = $newUrl;
62 62
     switch ($seoOp) {
63 63
         case 'category':
64
-            $_SERVER['REQUEST_URI'] = $newUrl . '?categoryid=' . $seoArg;
64
+            $_SERVER['REQUEST_URI'] = $newUrl.'?categoryid='.$seoArg;
65 65
             $_GET['categoryid'] = $seoArg;
66 66
             $_REQUEST['categoryid'] = $seoArg;
67 67
             break;
68 68
         case 'item':
69 69
         case 'print':
70 70
         default:
71
-            $_SERVER['REQUEST_URI'] = $newUrl . '?itemid=' . $seoArg;
71
+            $_SERVER['REQUEST_URI'] = $newUrl.'?itemid='.$seoArg;
72 72
             $_GET['itemid'] = $seoArg;
73 73
             $_REQUEST['itemid'] = $seoArg;
74 74
     }
Please login to merge, or discard this patch.