Completed
Push — master ( a50592...10bab4 )
by Michael
01:56
created
include/form.blog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
28 28
 
29
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
29
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
30 30
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
31 31
 
32 32
 $form = new XoopsThemeForm(_EDIT, 'formblog', xoops_getenv('PHP_SELF'), 'POST', true);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
77 77
 $button_tray->addElement($butt_save);
78 78
 $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
79
-$butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . (int)$blog_id . "\"'");
79
+$butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.(int) $blog_id."\"'");
80 80
 $button_tray->addElement($butt_cancel);
81 81
 $form->addElement($button_tray);
82 82
 $form->display();
Please login to merge, or discard this patch.
include/plugin.transfer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
16 16
 
17
-if (!@require_once XOOPS_ROOT_PATH . '/Frameworks/transfer/transfer.php') {
17
+if (!@require_once XOOPS_ROOT_PATH.'/Frameworks/transfer/transfer.php') {
18 18
     return null;
19 19
 }
20 20
 
Please login to merge, or discard this patch.
include/action.module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
29 29
 
30
-include __DIR__ . '/vars.php';
30
+include __DIR__.'/vars.php';
31 31
 //mod_loadFunctions('', $GLOBALS['moddirname']);
32 32
 
33 33
 PlanetUtility::planetParseFunction('
Please login to merge, or discard this patch.
view.article.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 /**
32 32
  * The comment detection scripts should be removed once absolute url is used in comment_view.php
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
  *
35 35
  */
36 36
 if (preg_match("/(\/comment_[^\.]*\.php\?.*=.*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {//$_SERVER['REQUEST_URI']
37
-    header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]);
37
+    header('location: '.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].$matches[1]);
38 38
     exit();
39 39
 }
40 40
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
41
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
41
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
42 42
     exit();
43 43
 }
44 44
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
     $args['blog']    = @$args['blog'];
48 48
 }
49 49
 
50
-$article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
51
-$blog_id    = Request::getInt('blog', @$args['blog'], 'POST');//(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
50
+$article_id = Request::getInt('article', @$args['article'], 'POST'); //(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
51
+$blog_id    = Request::getInt('blog', @$args['blog'], 'POST'); //(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
52 52
 
53 53
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
54 54
 $blogHandler    = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 
58 58
 // restore $_SERVER['REQUEST_URI']
59 59
 if (!empty($REQUEST_URI_parsed)) {
60
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id);
60
+    $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.(empty($article_id) ? '' : '?article='.$article_id);
61 61
 }
62 62
 
63
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . $article_obj->getVar('art_title');
63
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.$article_obj->getVar('art_title');
64 64
 $xoopsOption['template_main']   = PlanetUtility::planetGetTemplate('article');
65
-require_once XOOPS_ROOT_PATH . '/header.php';
66
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
65
+require_once XOOPS_ROOT_PATH.'/header.php';
66
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
67 67
 
68 68
 $article_data = [
69 69
     'id'       => $article_id,
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 if (!empty($xoopsModuleConfig['do_sibling'])) {
83 83
     $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id);
84 84
     if (!empty($articles_sibling['previous'])) {
85
-        $articles_sibling['previous']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id;
85
+        $articles_sibling['previous']['url']   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['previous']['id'].'/b'.$blog_id;
86 86
         $articles_sibling['previous']['title'] = $articles_sibling['previous']['title'];
87 87
     }
88 88
     if (!empty($articles_sibling['next'])) {
89
-        $articles_sibling['next']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id;
89
+        $articles_sibling['next']['url']   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['next']['id'].'/b'.$blog_id;
90 90
         $articles_sibling['next']['title'] = $articles_sibling['next']['title'];
91 91
     }
92 92
 }
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 
99 99
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
100 100
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
101
-} else {
101
+}else {
102 102
     $xoopsTpl->assign('canrate', 1);
103 103
 }
104 104
 
105
-if ($transferbar = @include XOOPS_ROOT_PATH . '/Frameworks/transfer/bar.transfer.php') {
105
+if ($transferbar = @include XOOPS_ROOT_PATH.'/Frameworks/transfer/bar.transfer.php') {
106 106
     $xoopsTpl->assign('transfer', $transferbar);
107 107
 }
108 108
 
@@ -112,6 +112,6 @@  discard block
 block discarded – undo
112 112
 // for comment and notification
113 113
 //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php";
114 114
 $_GET['article'] = $article_id;
115
-include XOOPS_ROOT_PATH . '/include/comment_view.php';
115
+include XOOPS_ROOT_PATH.'/include/comment_view.php';
116 116
 
117
-require_once __DIR__ . '/footer.php';
117
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
view.archive.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
32 32
     $args['year']  = @$args_num[0];
@@ -45,26 +45,26 @@  discard block
 block discarded – undo
45 45
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
46 46
 $blogHandler    = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
47 47
 
48
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_ACHIVE');
48
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_ACHIVE');
49 49
 $xoopsOption['template_main']   = PlanetUtility::planetGetTemplate('archive');
50
-require_once XOOPS_ROOT_PATH . '/header.php';
51
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
50
+require_once XOOPS_ROOT_PATH.'/header.php';
51
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
52 52
 
53 53
 $year = empty($year) ? date('Y') : $year;
54
-if ($month < 1) {
54
+if ($month<1) {
55 55
     $month        = $day = 0;
56 56
     $page['time'] = sprintf(planet_constant('MD_TIME_Y'), $year);
57
-} elseif ($day < 1) {
57
+} elseif ($day<1) {
58 58
     $day          = 0;
59 59
     $page['time'] = sprintf(planet_constant('MD_TIME_YM'), $year, $month);
60
-} else {
60
+}else {
61 61
     $page['time'] = sprintf(planet_constant('MD_TIME_YMD'), $year, $month, $day);
62 62
 }
63 63
 $time = ['year' => $year, 'month' => $month, 'day' => $day];
64 64
 if ($xoopsUser) {
65
-    $timeoffset = ($xoopsUser->getVar('timezone_offset') - $xoopsConfig['server_TZ']) * 3600;
66
-} else {
67
-    $timeoffset = ($xoopsConfig['default_TZ'] - $xoopsConfig['server_TZ']) * 3600;
65
+    $timeoffset = ($xoopsUser->getVar('timezone_offset')-$xoopsConfig['server_TZ'])*3600;
66
+}else {
67
+    $timeoffset = ($xoopsConfig['default_TZ']-$xoopsConfig['server_TZ'])*3600;
68 68
 }
69 69
 
70 70
 $criteria = new CriteriaCompo();
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 $articles = [];
88 88
 $blogs_id = [];
89 89
 foreach ($articles_obj as $id => $article) {
90
-    $articles[]                            = [
90
+    $articles[] = [
91 91
         'id'      => $id,
92 92
         'blog'    => ['id' => $article->getVar('blog_id'), 'title' => ''],
93 93
         'title'   => $article->getVar('art_title'),
@@ -98,20 +98,20 @@  discard block
 block discarded – undo
98 98
     $blogs_id[$article->getVar('blog_id')] = 1;
99 99
     unset($_article);
100 100
 }
101
-$criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
101
+$criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN');
102 102
 $blogs         = $blogHandler->getList($criteria_blog);
103 103
 foreach (array_keys($articles) as $key) {
104 104
     $articles[$key]['blog']['title'] = $blogs[$articles[$key]['blog']['id']];
105 105
 }
106
-if ($blog_id > 0) {
106
+if ($blog_id>0) {
107 107
     $page['blog'] = $blogs[$blog_id];
108 108
 }
109 109
 
110
-if ($articles_count > $xoopsModuleConfig['articles_perpage']) {
111
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
112
-    $nav     = new XoopsPageNav($articles_count, $xoopsModuleConfig['articles_perpage'], $start, 'start', 'month=' . $month . '&amp;day=' . $day . '&amp;year=' . $year . '&amp;blog=' . (int)$blog_id);
110
+if ($articles_count>$xoopsModuleConfig['articles_perpage']) {
111
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
112
+    $nav     = new XoopsPageNav($articles_count, $xoopsModuleConfig['articles_perpage'], $start, 'start', 'month='.$month.'&amp;day='.$day.'&amp;year='.$year.'&amp;blog='.(int) $blog_id);
113 113
     $pagenav = $nav->renderNav(4);
114
-} else {
114
+}else {
115 115
     $pagenav = '';
116 116
 }
117 117
 
@@ -120,43 +120,43 @@  discard block
 block discarded – undo
120 120
 $months   = null;
121 121
 if (empty($start)) {
122 122
     if ($blog_id) {
123
-        $blog_criteria = ' AND blog_id=' . $blog_id;
124
-    } else {
123
+        $blog_criteria = ' AND blog_id='.$blog_id;
124
+    }else {
125 125
         $blog_criteria = '';
126 126
     }
127 127
     // Get monthly list
128 128
     if (empty($month)) {
129
-        $sql    = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count
130
-            FROM " . planet_DB_prefix('article') . "
129
+        $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count
130
+            FROM ".planet_DB_prefix('article')."
131 131
             WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year
132
-            " . $blog_criteria . '
132
+            ".$blog_criteria.'
133 133
             GROUP BY mon
134 134
             ';
135 135
         $result = $xoopsDB->query($sql);
136 136
         $months = [];
137 137
         while ($myrow = $xoopsDB->fetchArray($result)) {
138 138
             $months[] = [
139
-                'title' => planet_constant('MD_MONTH_' . (int)$myrow['mon']) . ' (' . (int)$myrow['count'] . ')',
140
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $year . '/' . $myrow['mon'] . '/b' . $blog_id
139
+                'title' => planet_constant('MD_MONTH_'.(int) $myrow['mon']).' ('.(int) $myrow['count'].')',
140
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$year.'/'.$myrow['mon'].'/b'.$blog_id
141 141
             ];
142 142
         }
143 143
         $timenav['prev'] = [
144
-            'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . ($year - 1) . '/b' . $blog_id,
145
-            'title' => sprintf(planet_constant('MD_TIME_Y'), $year - 1)
144
+            'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.($year-1).'/b'.$blog_id,
145
+            'title' => sprintf(planet_constant('MD_TIME_Y'), $year-1)
146 146
         ];
147
-        if ($year < date('Y')) {
147
+        if ($year<date('Y')) {
148 148
             $timenav['next'] = [
149
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . ($year + 1) . '/b' . $blog_id,
150
-                'title' => sprintf(planet_constant('MD_TIME_Y'), $year + 1)
149
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.($year+1).'/b'.$blog_id,
150
+                'title' => sprintf(planet_constant('MD_TIME_Y'), $year+1)
151 151
             ];
152 152
         }
153 153
     } // Get daily list
154 154
     elseif (empty($day)) {
155
-        $sql    = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count
156
-            FROM " . planet_DB_prefix('article') . "
155
+        $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count
156
+            FROM ".planet_DB_prefix('article')."
157 157
             WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year
158 158
             AND MONTH(FROM_UNIXTIME(art_time - $timeoffset)) = $month
159
-            " . $blog_criteria . '
159
+            ".$blog_criteria.'
160 160
             GROUP BY day
161 161
             ';
162 162
         $result = $xoopsDB->query($sql);
@@ -164,35 +164,35 @@  discard block
 block discarded – undo
164 164
         while ($myrow = $xoopsDB->fetchArray($result)) {
165 165
             $days[$myrow['day']]['count'] = $myrow['count'];
166 166
         }
167
-        for ($i = 1; $i <= 31; ++$i) {
167
+        for ($i = 1; $i<=31; ++$i) {
168 168
             if (!isset($days[$i])) {
169 169
                 continue;
170 170
             }
171 171
             $days[$i] = [
172 172
                 'title' => $days[$i]['count'],
173
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $year . '/' . $month . '/' . $i . '/b' . $blog_id
173
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$year.'/'.$month.'/'.$i.'/b'.$blog_id
174 174
             ];
175 175
         }
176 176
         $calendar   = planet_getCalendar($year, $month, $days);
177
-        $month_next = $month + 1;
178
-        $month_prev = $month - 1;
177
+        $month_next = $month+1;
178
+        $month_prev = $month-1;
179 179
         $_year      = $year;
180 180
         if (12 == $month) {
181 181
             $month_next = 1;
182
-            $_year      = $year + 1;
182
+            $_year      = $year+1;
183 183
         }
184 184
         if (1 == $month) {
185 185
             $month_pre = 12;
186
-            $_year     = $year - 1;
186
+            $_year     = $year-1;
187 187
         }
188 188
         $timenav['prev'] = [
189
-            'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $_year . '/' . $month_prev . '/b' . $blog_id,
190
-            'title' => planet_constant('MD_MONTH_' . $month_prev)
189
+            'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$_year.'/'.$month_prev.'/b'.$blog_id,
190
+            'title' => planet_constant('MD_MONTH_'.$month_prev)
191 191
         ];
192
-        if ($year < date('Y') || $month < date('n')) {
192
+        if ($year<date('Y') || $month<date('n')) {
193 193
             $timenav['next'] = [
194
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . '' . $_year . '/' . $month_next . '/b' . $blog_id,
195
-                'title' => planet_constant('MD_MONTH_' . $month_next)
194
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''.$_year.'/'.$month_next.'/b'.$blog_id,
195
+                'title' => planet_constant('MD_MONTH_'.$month_next)
196 196
             ];
197 197
         }
198 198
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 $xoopsTpl->assign('timenav', $timenav);
213 213
 $xoopsTpl->assign('pagenav', $pagenav);
214 214
 
215
-require_once __DIR__ . '/footer.php';
215
+require_once __DIR__.'/footer.php';
216 216
 
217 217
 /**
218 218
  * @param null $year
@@ -229,24 +229,24 @@  discard block
 block discarded – undo
229 229
     ob_start();
230 230
     echo '<table id="calendar">';
231 231
     echo '<caption>';
232
-    printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_' . $month));
232
+    printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_'.$month));
233 233
     echo '</caption>';
234 234
 
235
-    for ($i = 1; $i <= 7; ++$i) {
236
-        echo "\n\t\t<th abbr=\"" . planet_constant('MD_WEEK_' . $i) . "\" scope=\"col\" title=\"" . planet_constant('MD_WEEK_' . $i) . "\">" . planet_constant('MD_WEEK_' . $i) . '</th>';
235
+    for ($i = 1; $i<=7; ++$i) {
236
+        echo "\n\t\t<th abbr=\"".planet_constant('MD_WEEK_'.$i)."\" scope=\"col\" title=\"".planet_constant('MD_WEEK_'.$i)."\">".planet_constant('MD_WEEK_'.$i).'</th>';
237 237
     }
238 238
 
239 239
     echo '<tr>';
240 240
 
241 241
     // See how much we should pad in the beginning
242 242
     $week_begins = 1;
243
-    $pad         = planet_calendar_week_mod(date('w', $unixmonth) - $week_begins);
243
+    $pad         = planet_calendar_week_mod(date('w', $unixmonth)-$week_begins);
244 244
     if (0 != $pad) {
245
-        echo "\n\t\t" . '<td colspan="' . $pad . '">&nbsp;</td>';
245
+        echo "\n\t\t".'<td colspan="'.$pad.'">&nbsp;</td>';
246 246
     }
247 247
 
248
-    $daysinmonth = (int)date('t', $unixmonth);
249
-    for ($day = 1; $day <= $daysinmonth; ++$day) {
248
+    $daysinmonth = (int) date('t', $unixmonth);
249
+    for ($day = 1; $day<=$daysinmonth; ++$day) {
250 250
         if (isset($newrow) && $newrow) {
251 251
             echo "\n\t</tr>\n\t<tr>\n\t\t";
252 252
         }
@@ -255,26 +255,26 @@  discard block
 block discarded – undo
255 255
         echo '<td>';
256 256
 
257 257
         if (!empty($days[$day]['url'])) {
258
-            echo '<a href="' . $days[$day]['url'] . "\"";
258
+            echo '<a href="'.$days[$day]['url']."\"";
259 259
             if (!empty($days[$day]['title'])) {
260
-                echo "title=\"" . $days[$day]['title'] . "\"";
260
+                echo "title=\"".$days[$day]['title']."\"";
261 261
             }
262 262
             echo ">$day</a>";
263 263
         } elseif (!empty($days[$day]['title'])) {
264
-            echo "<acronym title=\"" . $days[$day]['title'] . "\">$day</acronym>";
265
-        } else {
264
+            echo "<acronym title=\"".$days[$day]['title']."\">$day</acronym>";
265
+        }else {
266 266
             echo $day;
267 267
         }
268 268
         echo '</td>';
269 269
 
270
-        if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins)) {
270
+        if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins)) {
271 271
             $newrow = true;
272 272
         }
273 273
     }
274 274
 
275
-    $pad = 7 - planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins);
275
+    $pad = 7-planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins);
276 276
     if (0 != $pad && 7 != $pad) {
277
-        echo "\n\t\t" . '<td class="pad" colspan="' . $pad . '">&nbsp;</td>';
277
+        echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';
278 278
     }
279 279
 
280 280
     echo "\n\t</tr>\n\t</tbody>\n\t</table>";
@@ -293,5 +293,5 @@  discard block
 block discarded – undo
293 293
 {
294 294
     $base = 7;
295 295
 
296
-    return ($num - $base * floor($num / $base));
296
+    return ($num-$base*floor($num/$base));
297 297
 }
Please login to merge, or discard this patch.
action.blog.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31
-$op      = Request::getString('op', Request::getString('op', '', 'POST'), 'GET');//!empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
32
-$blog_id = Request::getArray('blog', Request::getArray('blog', [], 'POST'), 'GET');//!empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
33
-$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int)$blog_id;
31
+$op      = Request::getString('op', Request::getString('op', '', 'POST'), 'GET'); //!empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
32
+$blog_id = Request::getArray('blog', Request::getArray('blog', [], 'POST'), 'GET'); //!empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
33
+$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int) $blog_id;
34 34
 
35 35
 if (empty($xoopsModuleConfig['newblog_submit']) && (!is_object($xoopsUser) || !$xoopsUser->isAdmin())) {
36 36
     redirect_header('index.php', 2, _NOPERM);
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 }
42 42
 
43 43
 if ('save' === $op && !$GLOBALS['xoopsSecurity']->check()) {
44
-    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID') . ': security check failed');
44
+    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID').': security check failed');
45 45
 }
46
-include XOOPS_ROOT_PATH . '/header.php';
47
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
46
+include XOOPS_ROOT_PATH.'/header.php';
47
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
48 48
 
49 49
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
50 50
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         if ($blog_id) {
57 57
             $blog_obj = $blogHandler->get($blog_id);
58 58
             if ($xoopsUser->isAdmin()) {
59
-                $blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST'));// @$_POST['blog_status']);
59
+                $blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST')); // @$_POST['blog_status']);
60 60
             }
61
-        } else {
61
+        }else {
62 62
             if ($blog_exists = $blogHandler->getCount(new Criteria('blog_feed', $myts->addSlashes(trim(Request::getText('blog_feed', '', 'POST')))))  //$_POST['blog_feed']))))
63 63
             ) {
64 64
                 redirect_header('index.php', 2, planet_constant('MD_BLOGEXISTS'));
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 case 2:
72 72
                     if (!is_object($xoopsUser)) {
73 73
                         $status = 0;
74
-                    } else {
74
+                    }else {
75 75
                         $status = 1;
76 76
                     }
77 77
                     break;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 default:
84 84
                     if (!is_object($xoopsUser) || !$xoopsUser->isAdmin()) {
85 85
                         $status = 0;
86
-                    } else {
86
+                    }else {
87 87
                         $status = 1;
88 88
                     }
89 89
                     break;
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
             $blog_obj->setVar('blog_status', $status);
93 93
         }
94 94
 
95
-        $blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST'));//$_POST['blog_title']);
96
-        $blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST'));//$_POST['blog_desc']);
97
-        $blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST'));//$_POST['blog_image']);
98
-        $blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST'));//$_POST['blog_feed']);
99
-        $blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST'));//$_POST['blog_link']);
100
-        $blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST'));//$_POST['blog_language']);
101
-        $blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST'));//$_POST['blog_charset']);
102
-        $blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST'));//$_POST['blog_trackback']);
95
+        $blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST')); //$_POST['blog_title']);
96
+        $blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST')); //$_POST['blog_desc']);
97
+        $blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST')); //$_POST['blog_image']);
98
+        $blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST')); //$_POST['blog_feed']);
99
+        $blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST')); //$_POST['blog_link']);
100
+        $blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST')); //$_POST['blog_language']);
101
+        $blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST')); //$_POST['blog_charset']);
102
+        $blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST')); //$_POST['blog_trackback']);
103 103
         if ($blog_obj->isNew()) {
104 104
             $blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
105 105
         }
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
             if (in_array(0, $_POST['categories'])) {
111 111
                 $_POST['categories'] = [];
112 112
             }
113
-            $blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST'));//$_POST['categories']);
113
+            $blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST')); //$_POST['categories']);
114 114
         }
115 115
         $message = planet_constant('MD_DBUPDATED');
116
-        redirect_header('index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
116
+        redirect_header('index.php'.URL_DELIMITER.'b'.$blog_id, 2, $message);
117 117
 
118 118
     /* edit a single blog */
119 119
     // no break
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
         if (!empty(Request::getString('fetch', '', 'POST'))) {
123 123
             $blog_obj = $blogHandler->fetch(Request::getText('blog_feed', '', 'POST'));
124 124
             $blog_obj->setVar('blog_id', $blog_id);
125
-        } else {
125
+        }else {
126 126
             $blog_obj = $blogHandler->get($blog_id);
127 127
         }
128
-        $categories = Request::getArray('categories', [], 'POST');//isset($_POST['categories']) ? $_POST['categories'] : array();
128
+        $categories = Request::getArray('categories', [], 'POST'); //isset($_POST['categories']) ? $_POST['categories'] : array();
129 129
         if (in_array('-1', $categories)) {
130 130
             $categories = [];
131 131
         }
132
-        if (empty($categories) && $blog_id > 0) {
132
+        if (empty($categories) && $blog_id>0) {
133 133
             $crit       = new Criteria('bc.blog_id', $blog_id);
134 134
             $categories = array_keys($categoryHandler->getByBlog($crit));
135 135
         }
@@ -137,23 +137,23 @@  discard block
 block discarded – undo
137 137
             $categories = [0 => _NONE];
138 138
         }
139 139
 
140
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
140
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
141 141
         echo '<br>';
142 142
         if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
143 143
             $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
144 144
             $blogs_obj = $blogHandler->getList($criteria);
145
-            if (count($blogs_obj) > 0) {
146
-                echo "<div class=\"errorMsg\">" . planet_constant('MD_BLOGEXISTS');
145
+            if (count($blogs_obj)>0) {
146
+                echo "<div class=\"errorMsg\">".planet_constant('MD_BLOGEXISTS');
147 147
                 foreach (array_keys($blogs_obj) as $bid) {
148
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
148
+                    echo "<br><a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$bid."\" target=\"_blank\">".$blogs_obj[$bid].'</a>';
149 149
                 }
150 150
                 echo '</div>';
151 151
                 unset($blogs_obj, $criteria);
152 152
             }
153 153
         }
154
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
154
+        include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/form.blog.php';
155 155
         echo '</fieldset>';
156 156
         break;
157 157
 }
158 158
 
159
-include XOOPS_ROOT_PATH . '/footer.php';
159
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
trackback.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 // trackback is done by a POST
32 32
 $art_id     = explode('/', Request::getString('REQUEST_URI', '', 'SERVER'));
33
-$article_id = (int)$art_id[count($art_id) - 1];
34
-$url        = Request::getString('url', '', 'POST');//$_POST['url'];
35
-$title      = Request::getString('title', '', 'POST');//$_POST['title'];
36
-$excerpt    = Request::getString('excerpt', '', 'POST');//$_POST['excerpt'];
37
-$blog_name  = Request::getString('blog_name', '', 'POST');//$_POST['blog_name'];
38
-$charset    = trim(Request::getString('charset', '', 'POST'));//trim($_POST['charset']);
33
+$article_id = (int) $art_id[count($art_id)-1];
34
+$url        = Request::getString('url', '', 'POST'); //$_POST['url'];
35
+$title      = Request::getString('title', '', 'POST'); //$_POST['title'];
36
+$excerpt    = Request::getString('excerpt', '', 'POST'); //$_POST['excerpt'];
37
+$blog_name  = Request::getString('blog_name', '', 'POST'); //$_POST['blog_name'];
38
+$charset    = trim(Request::getString('charset', '', 'POST')); //trim($_POST['charset']);
39 39
 
40 40
 if (empty($xoopsModuleConfig['trackback_option'])) {
41 41
     PlanetUtility::planetRespondToTrackback(1, 'Trackback is closed');
42 42
 }
43
-if (!strlen($title . $url . $blog_name)) {
43
+if (!strlen($title.$url.$blog_name)) {
44 44
     PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
45 45
 }
46 46
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     $trackbackHandler = xoops_getModuleHandler('trackback', $GLOBALS['moddirname']);
49 49
     $criteria         = new CriteriaCompo(new Criteria('art_id', $article_id));
50 50
     $criteria->add(new Criteria('tb_url', $url));
51
-    if ($trackbackHandler->getCount($criteria) > 0) {
51
+    if ($trackbackHandler->getCount($criteria)>0) {
52 52
         PlanetUtility::planetRespondToTrackback(1, 'We already have a ping from that URI for this article.');
53 53
     }
54 54
 
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
     $title     = XoopsLocal::convert_encoding($title, _CHARSET, $charset);
57 57
     $excerpt   = XoopsLocal::convert_encoding($excerpt, _CHARSET, $charset);
58 58
     $blog_name = XoopsLocal::convert_encoding($blog_name, _CHARSET, $charset);
59
-    $tb_status = (int)$xoopsModuleConfig['trackback_option'];
59
+    $tb_status = (int) $xoopsModuleConfig['trackback_option'];
60 60
 
61 61
     $com_pid    = 0;
62 62
     $com_itemid = $article_id;
63 63
     $com_rootid = 0;
64 64
     $com_title  = $title;
65 65
     $com_text   = $excerpt;
66
-    $com_text   .= "\n\n[TRACKBACK]" . _POSTEDBY . ': ';
66
+    $com_text .= "\n\n[TRACKBACK]"._POSTEDBY.': ';
67 67
     if (!empty($url)) {
68
-        $com_text .= '[url=' . $url . ']' . $blog_name . '[/url]';
69
-    } else {
68
+        $com_text .= '[url='.$url.']'.$blog_name.'[/url]';
69
+    }else {
70 70
         $com_text .= $blog_name;
71 71
     }
72 72
     $com_modid = $xoopsModule->getVar('mid');
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
                 if (isset($comment_config['callbackFile'])) {
123 123
                     $callbackfile = trim($comment_config['callbackFile']);
124 124
                     if ('' != $callbackfile
125
-                        && file_exists(XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile)) {
126
-                        require_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile;
125
+                        && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
126
+                        require_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
127 127
                     }
128 128
                     if (!function_exists($comment_config['callback']['approve'])) {
129 129
                         $skip = true;
130 130
                     }
131
-                } else {
131
+                }else {
132 132
                     $skip = true;
133 133
                 }
134 134
             }
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
                 if (isset($comment_config['callbackFile'])) {
146 146
                     $callbackfile = trim($comment_config['callbackFile']);
147 147
                     if ('' != $callbackfile
148
-                        && file_exists(XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile)) {
149
-                        require_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile;
148
+                        && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
149
+                        require_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
150 150
                     }
151 151
                     if (!function_exists($comment_config['callback']['update'])) {
152 152
                         $skip = true;
153 153
                     }
154
-                } else {
154
+                }else {
155 155
                     $skip = true;
156 156
                 }
157 157
             }
@@ -181,16 +181,16 @@  discard block
 block discarded – undo
181 181
             $not_module   = $xoopsModule;
182 182
             if (!isset($comment_url)) {
183 183
                 $com_config  = $not_module->getInfo('comments');
184
-                $comment_url = $com_config['pageName'] . '?';
184
+                $comment_url = $com_config['pageName'].'?';
185 185
                 $comment_url .= $com_config['itemName'];
186 186
             }
187
-            $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/' . $comment_url . '=' . $com_itemid . '&amp;com_id=' . $newcid . '&amp;com_rootid=' . $com_rootid . '&amp;com_mode=' . $com_mode . '&amp;com_order=' . $com_order . '#comment' . $newcid;
187
+            $comment_tags['X_COMMENT_URL'] = XOOPS_URL.'/modules/'.$not_module->getVar('dirname').'/'.$comment_url.'='.$com_itemid.'&amp;com_id='.$newcid.'&amp;com_rootid='.$com_rootid.'&amp;com_mode='.$com_mode.'&amp;com_order='.$com_order.'#comment'.$newcid;
188 188
             $notificationHandler           = xoops_getHandler('notification');
189 189
             $notificationHandler->triggerEvent($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid);
190 190
         }
191 191
 
192 192
         PlanetUtility::planetRespondToTrackback(0);
193
-    } else {
193
+    }else {
194 194
         PlanetUtility::planetRespondToTrackback(1, xoops_error($comment->getHtmlErrors()));
195 195
     }
196 196
 }
Please login to merge, or discard this patch.
view.blogs.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
32
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
32
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
33 33
     exit();
34 34
 }
35 35
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 }
67 67
 */
68 68
 
69
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_BLOGS');
69
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_BLOGS');
70 70
 $xoopsOption['template_main']   = PlanetUtility::planetGetTemplate('blogs');
71
-require_once XOOPS_ROOT_PATH . '/header.php';
72
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
71
+require_once XOOPS_ROOT_PATH.'/header.php';
72
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
73 73
 
74 74
 // Following part will not be executed after cache
75 75
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 $criteria    = new CriteriaCompo();
82 82
 $blog_prefix = '';
83 83
 /* Specific category */
84
-if ($category_id > 0) {
84
+if ($category_id>0) {
85 85
     $category_obj = $categoryHandler->get($category_id);
86 86
     $criteria->add(new Criteria('bc.cat_id', $category_id));
87 87
     $uid           = 0;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 }
93 93
 
94 94
 /* User bookmarks(favorites) */
95
-if ($uid > 0) {
95
+if ($uid>0) {
96 96
     $criteria->add(new Criteria('bm.bm_uid', $uid));
97 97
     $category_id     = 0;
98 98
     $blog_id         = 0;
@@ -106,25 +106,25 @@  discard block
 block discarded – undo
106 106
     $blog_prefix     = 'b.';
107 107
 }
108 108
 
109
-$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
109
+$criteria->add(new Criteria($blog_prefix.'blog_status', 0, '>'));
110 110
 
111 111
 /* Sort */
112 112
 $order = 'DESC';
113 113
 $sort  = empty($sort) ? 'default' : $sort;
114 114
 switch ($sort) {
115 115
     case 'marks':
116
-        $sortby = $blog_prefix . 'blog_marks';
116
+        $sortby = $blog_prefix.'blog_marks';
117 117
         break;
118 118
     case 'rating':
119
-        $sortby = $blog_prefix . 'blog_rating';
119
+        $sortby = $blog_prefix.'blog_rating';
120 120
         break;
121 121
     case 'time':
122
-        $sortby = $blog_prefix . 'blog_time';
122
+        $sortby = $blog_prefix.'blog_time';
123 123
         break;
124 124
     case 'default':
125 125
     default:
126 126
         $sort   = 'default';
127
-        $sortby = $blog_prefix . 'blog_id';
127
+        $sortby = $blog_prefix.'blog_id';
128 128
         break;
129 129
 }
130 130
 $criteria->setSort($sortby);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 $criteria->setStart($start);
133 133
 $criteria->setLimit($limit);
134 134
 
135
-$tags = empty($list) ? '' : [$blog_prefix . 'blog_title', $blog_prefix . 'blog_time'];
135
+$tags = empty($list) ? '' : [$blog_prefix.'blog_title', $blog_prefix.'blog_time'];
136 136
 switch ($query_type) {
137 137
     case 'category':
138 138
         $blogs_obj  = $blogHandler->getByCategory($criteria, $tags);
@@ -172,31 +172,31 @@  discard block
 block discarded – undo
172 172
 }
173 173
 unset($blogs_obj);
174 174
 
175
-if ($count_blog > $limit) {
176
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
175
+if ($count_blog>$limit) {
176
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
177 177
     $start_link = [];
178 178
     if ($sort) {
179
-        $start_link[] = 'sort=' . $sort;
179
+        $start_link[] = 'sort='.$sort;
180 180
     }
181 181
     if ($category_id) {
182
-        $start_link[] = 'category=' . $category_id;
182
+        $start_link[] = 'category='.$category_id;
183 183
     }
184 184
     if ($list) {
185
-        $start_link[] = 'list=' . $list;
185
+        $start_link[] = 'list='.$list;
186 186
     }
187 187
     $nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&amp;', $start_link));
188 188
     $pagenav = $nav->renderNav(4);
189
-} else {
189
+}else {
190 190
     $pagenav = '';
191 191
 }
192 192
 
193 193
 $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']);
194
-$xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>');
194
+$xoopsTpl->assign('link_home', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_HOME')."\" target=\"_self\">".planet_constant('MD_HOME').'</a>');
195 195
 
196 196
 if ($category_id || $uid) {
197
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
197
+    $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/view.blogs.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
198 198
 
199
-    $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>';
199
+    $link_articles = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_ARTICLES')."\">".planet_constant('MD_ARTICLES').'</a>';
200 200
     $xoopsTpl->assign('link_articles', $link_articles);
201 201
 }
202 202
 
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
                . '/modules/'
206 206
                . $GLOBALS['moddirname']
207 207
                . '/view.blogs.php'
208
-               . (empty($category_id) ? '' : '/c' . $category_id)
209
-               . (empty($uid) ? '' : '/u' . $uid)
208
+               . (empty($category_id) ? '' : '/c'.$category_id)
209
+               . (empty($uid) ? '' : '/u'.$uid)
210 210
                . (empty($list) ? '/l1' : '')
211 211
                . "\" title=\""
212 212
                . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
 $xoopsTpl->assign('link_switch', $link_switch);
217 217
 
218 218
 if (empty($uid) && is_object($xoopsUser)) {
219
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
219
+    $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>');
220 220
 }
221 221
 
222 222
 if (1 == $xoopsModuleConfig['newblog_submit'] || is_object($xoopsUser)) {
223
-    $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
223
+    $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>');
224 224
 }
225 225
 
226
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS'));
226
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_BLOGS'));
227 227
 $xoopsTpl->assign('category', @$category_data);
228 228
 $xoopsTpl->assign('user', @$user_data);
229 229
 $xoopsTpl->assign('blogs', $blogs);
@@ -237,19 +237,19 @@  discard block
 block discarded – undo
237 237
     $xoopsTpl->assign('canrate', 1);
238 238
 }
239 239
 
240
-$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER;
240
+$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER;
241 241
 $vars      = [];
242 242
 if (!empty($category_id)) {
243
-    $vars[] = 'c' . $category_id;
243
+    $vars[] = 'c'.$category_id;
244 244
 }
245 245
 if (!empty($uid)) {
246
-    $vars[] = 'u' . $uid;
246
+    $vars[] = 'u'.$uid;
247 247
 }
248 248
 if (!empty($list)) {
249 249
     $vars[] = 'li';
250 250
 }
251 251
 if (!empty($vars)) {
252
-    $sort_link .= implode('/', $vars) . '/';
252
+    $sort_link .= implode('/', $vars).'/';
253 253
 }
254 254
 $sortlinks   = [];
255 255
 $valid_sorts = [
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
     if ($val == $sort) {
263 263
         continue;
264 264
     }
265
-    $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
265
+    $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name.'</a>';
266 266
 }
267 267
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
268 268
 
269
-require_once __DIR__ . '/footer.php';
269
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/header.php';
27
+include __DIR__.'/header.php';
28 28
 
29 29
 if (preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)) {
30
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
30
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
31 31
     exit();
32 32
 }
33 33
 
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 }
38 38
 
39 39
 /* Start */
40
-$start = (int)(empty($_GET['start']) ? @$args['start'] : $_GET['start']);
40
+$start = (int) (empty($_GET['start']) ? @$args['start'] : $_GET['start']);
41 41
 /* Specified Category */
42
-$category_id = (int)(empty($_GET['category']) ? @$args['category'] : $_GET['category']);
42
+$category_id = (int) (empty($_GET['category']) ? @$args['category'] : $_GET['category']);
43 43
 /* Specified Blog */
44
-$blog_id = (int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
44
+$blog_id = (int) (empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
45 45
 /* Specified Bookmar(Favorite) UID */
46
-$uid = (int)(empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
46
+$uid = (int) (empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
47 47
 /* Sort by term */
48 48
 $sort = empty($_GET['sort']) ? @$args['sort'] : $_GET['sort'];
49 49
 /* Display as list */
50
-$list = (int)(empty($_GET['list']) ? @$args['list'] : $_GET['list']);
50
+$list = (int) (empty($_GET['list']) ? @$args['list'] : $_GET['list']);
51 51
 
52 52
 // restore $_SERVER['REQUEST_URI']
53 53
 if (!empty($REQUEST_URI_parsed)) {
@@ -55,28 +55,28 @@  discard block
 block discarded – undo
55 55
     $_args            = ['start', 'sort', 'uid', 'list'];
56 56
     foreach ($_args as $arg) {
57 57
         if (!empty(${$arg})) {
58
-            $args_REQUEST_URI[] = $arg . '=' . ${$arg};
58
+            $args_REQUEST_URI[] = $arg.'='.${$arg};
59 59
         }
60 60
     }
61 61
     if (!empty($blog_id)) {
62
-        $args_REQUEST_URI[] = 'blog=' . $blog_id;
62
+        $args_REQUEST_URI[] = 'blog='.$blog_id;
63 63
     }
64 64
     if (!empty($category_id)) {
65
-        $args_REQUEST_URI[] = 'category=' . $category_id;
65
+        $args_REQUEST_URI[] = 'category='.$category_id;
66 66
     }
67
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI));
67
+    $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($args_REQUEST_URI) ? '' : '?'.implode('&', $args_REQUEST_URI));
68 68
 }
69 69
 
70 70
 $GLOBALS['xoopsOption']['template_main'] = PlanetUtility::planetGetTemplate('index');
71 71
 $xoops_module_header                     = '
72
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rss" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rss/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
73
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rdf" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rdf/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
74
-    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name') . ' atom" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."atom/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
72
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rss" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rss/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
73
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rdf" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rdf/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
74
+    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name').' atom" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."atom/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
75 75
     ';
76 76
 
77 77
 $xoopsOption['xoops_module_header'] = $xoops_module_header;
78
-require_once XOOPS_ROOT_PATH . '/header.php';
79
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
78
+require_once XOOPS_ROOT_PATH.'/header.php';
79
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
80 80
 
81 81
 // Following part will not be executed after cache
82 82
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 $criteria       = new CriteriaCompo();
89 89
 $article_prefix = '';
90 90
 /* Specific category */
91
-if ($category_id > 0) {
91
+if ($category_id>0) {
92 92
     $category_obj = $categoryHandler->get($category_id);
93 93
     $criteria->add(new Criteria('bc.cat_id', $category_id));
94 94
     $uid            = 0;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     $article_prefix = 'a.';
99 99
 }
100 100
 /* Specific blog */
101
-if ($blog_id > 0) {
101
+if ($blog_id>0) {
102 102
     $blog_obj = $blogHandler->get($blog_id);
103 103
     if ($blog_obj->getVar('blog_status')
104 104
         || (is_object($xoopsUser)
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     $article_prefix = '';
126 126
 }
127 127
 /* User bookmarks(favorites) */
128
-if ($uid > 0) {
128
+if ($uid>0) {
129 129
     $criteria->add(new Criteria('bm.bm_uid', $uid));
130 130
     $category_id     = 0;
131 131
     $blog_id         = 0;
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 $sort  = empty($sort) ? 'time' : $sort;
145 145
 switch ($sort) {
146 146
     case 'views':
147
-        $sortby = $article_prefix . 'art_views';
147
+        $sortby = $article_prefix.'art_views';
148 148
         break;
149 149
     case 'rating':
150
-        $sortby = $article_prefix . 'art_rating';
150
+        $sortby = $article_prefix.'art_rating';
151 151
         break;
152 152
     case 'time':
153
-        $sortby = $article_prefix . 'art_time';
153
+        $sortby = $article_prefix.'art_time';
154 154
         break;
155 155
     case 'default':
156 156
     default:
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 $criteria->setLimit($limit);
164 164
 
165 165
 $tags = empty($list) ? '' : [
166
-    $article_prefix . 'art_title',
167
-    $article_prefix . 'blog_id',
168
-    $article_prefix . 'art_time'
166
+    $article_prefix.'art_title',
167
+    $article_prefix.'blog_id',
168
+    $article_prefix.'art_time'
169 169
 ];
170 170
 switch ($query_type) {
171 171
     case 'category':
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 
185 185
 if (!empty($blog_data)) {
186 186
     $blogs[$blog_data['id']] = $blog_data['title'];
187
-} else {
187
+}else {
188 188
     $blog_array = [];
189 189
     foreach (array_keys($articles_obj) as $id) {
190 190
         $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1;
191 191
     }
192
-    $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
192
+    $criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN');
193 193
     $blogs         = $blogHandler->getList($criteria_blog);
194 194
 }
195 195
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         ]);
216 216
         if (!empty($xoopsModuleConfig['display_summary'])) {
217 217
             $_article['content'] = $articles_obj[$id]->getSummary();
218
-        } else {
218
+        }else {
219 219
             $_article['content'] = $articles_obj[$id]->getVar('art_content');
220 220
         }
221 221
     }
@@ -224,24 +224,24 @@  discard block
 block discarded – undo
224 224
 }
225 225
 unset($articles_obj);
226 226
 
227
-if ($count_article > $limit) {
228
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
227
+if ($count_article>$limit) {
228
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
229 229
     $start_link = [];
230 230
     if ($sort) {
231
-        $start_link[] = 'sort=' . $sort;
231
+        $start_link[] = 'sort='.$sort;
232 232
     }
233 233
     if ($category_id) {
234
-        $start_link[] = 'category=' . $category_id;
234
+        $start_link[] = 'category='.$category_id;
235 235
     }
236 236
     if ($blog_id) {
237
-        $start_link[] = 'blog=' . $blog_id;
237
+        $start_link[] = 'blog='.$blog_id;
238 238
     }
239 239
     if ($list) {
240
-        $start_link[] = 'list=' . $list;
240
+        $start_link[] = 'list='.$list;
241 241
     }
242 242
     $nav     = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&amp;', $start_link));
243 243
     $pagenav = $nav->renderNav(4);
244
-} else {
244
+}else {
245 245
     $pagenav = '';
246 246
 }
247 247
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 $xoopsTpl->assign('dirname', $GLOBALS['moddirname']);
250 250
 
251 251
 if ($category_id || $blog_id || $uid) {
252
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
252
+    $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
253 253
 }
254 254
 
255 255
 $link_switch = "<a href=\""
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
                . '/modules/'
258 258
                . $GLOBALS['moddirname']
259 259
                . '/index.php'
260
-               . (empty($category_id) ? '' : '/c' . $category_id)
261
-               . (empty($uid) ? '' : '/u' . $uid)
262
-               . (empty($blog_id) ? '' : '/b' . $blog_id)
260
+               . (empty($category_id) ? '' : '/c'.$category_id)
261
+               . (empty($uid) ? '' : '/u'.$uid)
262
+               . (empty($blog_id) ? '' : '/b'.$blog_id)
263 263
                . (empty($list) ? '/l1' : '')
264 264
                . "\" title=\""
265 265
                . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
@@ -268,18 +268,18 @@  discard block
 block discarded – undo
268 268
                . '</a>';
269 269
 $xoopsTpl->assign('link_switch', $link_switch);
270 270
 
271
-$link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>';
271
+$link_blogs = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_BLOGS')."\">".planet_constant('MD_BLOGS').'</a>';
272 272
 $xoopsTpl->assign('link_blogs', $link_blogs);
273 273
 
274 274
 if (empty($uid) && is_object($xoopsUser)) {
275
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
275
+    $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>');
276 276
 }
277 277
 
278 278
 if (1 == $xoopsModuleConfig['newblog_submit'] || is_object($xoopsUser)) {
279
-    $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
279
+    $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>');
280 280
 }
281 281
 
282
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES'));
282
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_ARTICLES'));
283 283
 $xoopsTpl->assign('category', @$category_data);
284 284
 $xoopsTpl->assign('blog', @$blog_data);
285 285
 $xoopsTpl->assign('user', @$user_data);
@@ -289,23 +289,23 @@  discard block
 block discarded – undo
289 289
 
290 290
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
291 291
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
292
-} elseif ($blog_id > 0) {
292
+} elseif ($blog_id>0) {
293 293
     $xoopsTpl->assign('canrate', 1);
294 294
 }
295 295
 
296
-$sort_link   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1');
296
+$sort_link   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid).(empty($blog_id) ? '' : '/b'.$blog_id).(empty($list) ? '' : '/l1');
297 297
 $valid_sorts = [
298 298
     'views'   => planet_constant('MD_VIEWS'),
299 299
     'rating'  => planet_constant('MD_RATING'),
300 300
     'time'    => planet_constant('MD_TIME'),
301 301
     'default' => planet_constant('MD_DEFAULT')
302 302
 ];
303
-$sortlinks   = [];
303
+$sortlinks = [];
304 304
 foreach ($valid_sorts as $val => $name) {
305 305
     if ($val == $sort) {
306 306
         continue;
307 307
     }
308
-    $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>';
308
+    $sortlinks[] = "<a href=\"".$sort_link.'/'.$val."\">".$name.'</a>';
309 309
 }
310 310
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
311 311
 $xoopsTpl->assign('version', $xoopsModule->getVar('version'));
@@ -318,4 +318,4 @@  discard block
 block discarded – undo
318 318
     $_GET['blog'] = $blog_id;
319 319
 }
320 320
 
321
-require_once __DIR__ . '/footer.php';
321
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.