Completed
Push — master ( 15a86c...ff0242 )
by Michael
03:23
created
index.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 // URL: http://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,35 +55,35 @@  discard block
 block discarded – undo
55 55
     $_args            = array('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'
68
-                              . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI));
67
+    $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'
68
+                              . (empty($args_REQUEST_URI) ? '' : '?'.implode('&', $args_REQUEST_URI));
69 69
 }
70 70
 
71 71
 $xoopsOption['template_main'] = planet_getTemplate('index');
72 72
 $xoops_module_header          = '
73
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rss" href="'
74
-                                . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rss/c'
75
-                                . $category_id . '/b' . $blog_id . '/u' . $uid . '" />
76
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rdf" href="'
77
-                                . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rdf/c'
78
-                                . $category_id . '/b' . $blog_id . '/u' . $uid . '" />
79
-    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name') . ' atom" href="'
80
-                                . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."atom/c'
81
-                                . $category_id . '/b' . $blog_id . '/u' . $uid . '" />
73
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rss" href="'
74
+                                . XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rss/c'
75
+                                . $category_id.'/b'.$blog_id.'/u'.$uid.'" />
76
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rdf" href="'
77
+                                . XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rdf/c'
78
+                                . $category_id.'/b'.$blog_id.'/u'.$uid.'" />
79
+    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name').' atom" href="'
80
+                                . XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."atom/c'
81
+                                . $category_id.'/b'.$blog_id.'/u'.$uid.'" />
82 82
     ';
83 83
 
84 84
 $xoopsOption['xoops_module_header'] = $xoops_module_header;
85
-include_once XOOPS_ROOT_PATH . '/header.php';
86
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
85
+include_once XOOPS_ROOT_PATH.'/header.php';
86
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
87 87
 
88 88
 // Following part will not be executed after cache
89 89
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 $criteria       = new CriteriaCompo();
96 96
 $article_prefix = '';
97 97
 /* Specific category */
98
-if ($category_id > 0) {
98
+if ($category_id>0) {
99 99
     $category_obj = $category_handler->get($category_id);
100 100
     $criteria->add(new Criteria('bc.cat_id', $category_id));
101 101
     $uid            = 0;
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     $article_prefix = 'a.';
106 106
 }
107 107
 /* Specific blog */
108
-if ($blog_id > 0) {
109
-    $blog_obj =& $blog_handler->get($blog_id);
108
+if ($blog_id>0) {
109
+    $blog_obj = & $blog_handler->get($blog_id);
110 110
     if ($blog_obj->getVar('blog_status')
111 111
         || (is_object($xoopsUser)
112 112
             && $xoopsUser->getVar('uid') == $blog_obj->getVar('blog_submitter'))
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     $article_prefix = '';
134 134
 }
135 135
 /* User bookmarks(favorites) */
136
-if ($uid > 0) {
136
+if ($uid>0) {
137 137
     $criteria->add(new Criteria('bm.bm_uid', $uid));
138 138
     $category_id      = 0;
139 139
     $blog_id          = 0;
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 $sort  = empty($sort) ? 'time' : $sort;
153 153
 switch ($sort) {
154 154
     case 'views':
155
-        $sortby = $article_prefix . 'art_views';
155
+        $sortby = $article_prefix.'art_views';
156 156
         break;
157 157
     case 'rating':
158
-        $sortby = $article_prefix . 'art_rating';
158
+        $sortby = $article_prefix.'art_rating';
159 159
         break;
160 160
     case 'time':
161
-        $sortby = $article_prefix . 'art_time';
161
+        $sortby = $article_prefix.'art_time';
162 162
         break;
163 163
     case 'default':
164 164
     default:
@@ -171,33 +171,33 @@  discard block
 block discarded – undo
171 171
 $criteria->setLimit($limit);
172 172
 
173 173
 $tags = empty($list) ? '' : array(
174
-    $article_prefix . 'art_title',
175
-    $article_prefix . 'blog_id',
176
-    $article_prefix . 'art_time'
174
+    $article_prefix.'art_title',
175
+    $article_prefix.'blog_id',
176
+    $article_prefix.'art_time'
177 177
 );
178 178
 switch ($query_type) {
179 179
     case 'category':
180
-        $articles_obj  =& $article_handler->getByCategory($criteria, $tags);
180
+        $articles_obj  = & $article_handler->getByCategory($criteria, $tags);
181 181
         $count_article = $article_handler->getCountByCategory($criteria);
182 182
         break;
183 183
     case 'bookmark':
184
-        $articles_obj  =& $article_handler->getByBookmark($criteria, $tags);
184
+        $articles_obj  = & $article_handler->getByBookmark($criteria, $tags);
185 185
         $count_article = $article_handler->getCountByBookmark($criteria);
186 186
         break;
187 187
     default:
188
-        $articles_obj  =& $article_handler->getAll($criteria, $tags);
188
+        $articles_obj  = & $article_handler->getAll($criteria, $tags);
189 189
         $count_article = $article_handler->getCount($criteria);
190 190
         break;
191 191
 }
192 192
 
193 193
 if (!empty($blog_data)) {
194 194
     $blogs[$blog_data['id']] = $blog_data['title'];
195
-} else {
195
+}else {
196 196
     $blog_array = array();
197 197
     foreach (array_keys($articles_obj) as $id) {
198 198
         $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1;
199 199
     }
200
-    $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
200
+    $criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN');
201 201
     $blogs         = $blog_handler->getList($criteria_blog);
202 202
 }
203 203
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         ));
224 224
         if (!empty($xoopsModuleConfig['display_summary'])) {
225 225
             $_article['content'] = $articles_obj[$id]->getSummary();
226
-        } else {
226
+        }else {
227 227
             $_article['content'] = $articles_obj[$id]->getVar('art_content');
228 228
         }
229 229
     }
@@ -232,24 +232,24 @@  discard block
 block discarded – undo
232 232
 }
233 233
 unset($articles_obj);
234 234
 
235
-if ($count_article > $limit) {
236
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
235
+if ($count_article>$limit) {
236
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
237 237
     $start_link = array();
238 238
     if ($sort) {
239
-        $start_link[] = 'sort=' . $sort;
239
+        $start_link[] = 'sort='.$sort;
240 240
     }
241 241
     if ($category_id) {
242
-        $start_link[] = 'category=' . $category_id;
242
+        $start_link[] = 'category='.$category_id;
243 243
     }
244 244
     if ($blog_id) {
245
-        $start_link[] = 'blog=' . $blog_id;
245
+        $start_link[] = 'blog='.$blog_id;
246 246
     }
247 247
     if ($list) {
248
-        $start_link[] = 'list=' . $list;
248
+        $start_link[] = 'list='.$list;
249 249
     }
250 250
     $nav     = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&amp;', $start_link));
251 251
     $pagenav = $nav->renderNav(4);
252
-} else {
252
+}else {
253 253
     $pagenav = '';
254 254
 }
255 255
 
@@ -258,36 +258,36 @@  discard block
 block discarded – undo
258 258
 
259 259
 if ($category_id || $blog_id || $uid) {
260 260
     $xoopsTpl->assign('link_index',
261
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\""
262
-                      . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
261
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\""
262
+                      . planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
263 263
 }
264 264
 
265
-$link_switch = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
266
-               . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid)
267
-               . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '/l1' : '') . "\" title=\""
268
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) . "\">"
269
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) . '</a>';
265
+$link_switch = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'
266
+               . (empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)
267
+               . (empty($blog_id) ? '' : '/b'.$blog_id).(empty($list) ? '/l1' : '')."\" title=\""
268
+               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))."\">"
269
+               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')).'</a>';
270 270
 $xoopsTpl->assign('link_switch', $link_switch);
271 271
 
272
-$link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php'
273
-              . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\""
274
-              . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>';
272
+$link_blogs = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'
273
+              . (empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\""
274
+              . planet_constant('MD_BLOGS')."\">".planet_constant('MD_BLOGS').'</a>';
275 275
 $xoopsTpl->assign('link_blogs', $link_blogs);
276 276
 
277 277
 if (empty($uid) && is_object($xoopsUser)) {
278 278
     $xoopsTpl->assign('link_bookmark',
279
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER
280
-                      . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS')
281
-                      . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
279
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER
280
+                      . 'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')
281
+                      . "\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>');
282 282
 }
283 283
 
284 284
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
285 285
     $xoopsTpl->assign('link_submit',
286
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\""
287
-                      . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
286
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""
287
+                      . _SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>');
288 288
 }
289 289
 
290
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES'));
290
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_ARTICLES'));
291 291
 $xoopsTpl->assign('category', @$category_data);
292 292
 $xoopsTpl->assign('blog', @$blog_data);
293 293
 $xoopsTpl->assign('user', @$user_data);
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
 
298 298
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
299 299
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
300
-} elseif ($blog_id > 0) {
300
+} elseif ($blog_id>0) {
301 301
     $xoopsTpl->assign('canrate', 1);
302 302
 }
303 303
 
304
-$sort_link   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c'
304
+$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'
305 305
                                                                                                              . $category_id)
306
-               . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id)
306
+               . (empty($uid) ? '' : '/u'.$uid).(empty($blog_id) ? '' : '/b'.$blog_id)
307 307
                . (empty($list) ? '' : '/l1');
308 308
 $valid_sorts = array(
309 309
     'views'   => planet_constant('MD_VIEWS'),
@@ -311,12 +311,12 @@  discard block
 block discarded – undo
311 311
     'time'    => planet_constant('MD_TIME'),
312 312
     'default' => planet_constant('MD_DEFAULT')
313 313
 );
314
-$sortlinks   = array();
314
+$sortlinks = array();
315 315
 foreach ($valid_sorts as $val => $name) {
316 316
     if ($val == $sort) {
317 317
         continue;
318 318
     }
319
-    $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>';
319
+    $sortlinks[] = "<a href=\"".$sort_link.'/'.$val."\">".$name.'</a>';
320 320
 }
321 321
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
322 322
 $xoopsTpl->assign('version', $xoopsModule->getVar('version'));
@@ -329,4 +329,4 @@  discard block
 block discarded – undo
329 329
     $_GET['blog'] = $blog_id;
330 330
 }
331 331
 
332
-include_once __DIR__ . '/footer.php';
332
+include_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
action.blog.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-include __DIR__ . '/header.php';
28
+include __DIR__.'/header.php';
29 29
 
30 30
 $op      = !empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
31 31
 $blog_id = !empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
32
-$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int)$blog_id;
32
+$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int) $blog_id;
33 33
 
34 34
 if (empty($xoopsModuleConfig['newblog_submit']) && (!is_object($xoopsUser) || !$xoopsUser->isAdmin())) {
35 35
     redirect_header('index.php', 2, _NOPERM);
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 if ($op === 'save' && !$GLOBALS['xoopsSecurity']->check()) {
43
-    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID') . ': security check failed');
43
+    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID').': security check failed');
44 44
 }
45
-include XOOPS_ROOT_PATH . '/header.php';
46
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
45
+include XOOPS_ROOT_PATH.'/header.php';
46
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
47 47
 
48 48
 $blog_handler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
49 49
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -53,25 +53,25 @@  discard block
 block discarded – undo
53 53
     case 'save':
54 54
 
55 55
         if ($blog_id) {
56
-            $blog_obj =& $blog_handler->get($blog_id);
56
+            $blog_obj = & $blog_handler->get($blog_id);
57 57
             if ($xoopsUser->isAdmin()) {
58 58
                 $blog_obj->setVar('blog_status', @$_POST['blog_status']);
59 59
             }
60
-        } else {
60
+        }else {
61 61
             if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed',
62 62
                                                                     $myts->addSlashes(trim($_POST['blog_feed']))))
63 63
             ) {
64 64
                 redirect_header('index.php', 2, planet_constant('MD_BLOGEXISTS'));
65 65
             }
66 66
 
67
-            $blog_obj =& $blog_handler->create();
67
+            $blog_obj = & $blog_handler->create();
68 68
             $blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : planet_getIP(true));
69 69
 
70 70
             switch ($xoopsModuleConfig['newblog_submit']) {
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;
@@ -113,22 +113,22 @@  discard block
 block discarded – undo
113 113
             $blog_handler->setCategories($blog_id, $_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
     case 'edit':
120 120
     default:
121 121
         if (!empty($_POST['fetch'])) {
122
-            $blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
122
+            $blog_obj = & $blog_handler->fetch($_POST['blog_feed']);
123 123
             $blog_obj->setVar('blog_id', $blog_id);
124
-        } else {
125
-            $blog_obj =& $blog_handler->get($blog_id);
124
+        }else {
125
+            $blog_obj = & $blog_handler->get($blog_id);
126 126
         }
127 127
         $categories = isset($_POST['categories']) ? $_POST['categories'] : array();
128 128
         if (in_array('-1', $categories)) {
129 129
             $categories = array();
130 130
         }
131
-        if (empty($categories) && $blog_id > 0) {
131
+        if (empty($categories) && $blog_id>0) {
132 132
             $crit       = new Criteria('bc.blog_id', $blog_id);
133 133
             $categories = array_keys($category_handler->getByBlog($crit));
134 134
         }
@@ -136,24 +136,24 @@  discard block
 block discarded – undo
136 136
             $categories = array(0 => _NONE);
137 137
         }
138 138
 
139
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
139
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
140 140
         echo '<br>';
141 141
         if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
142 142
             $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
143
-            $blogs_obj =& $blog_handler->getList($criteria);
144
-            if (count($blogs_obj) > 0) {
145
-                echo "<div class=\"errorMsg\">" . planet_constant('MD_BLOGEXISTS');
143
+            $blogs_obj = & $blog_handler->getList($criteria);
144
+            if (count($blogs_obj)>0) {
145
+                echo "<div class=\"errorMsg\">".planet_constant('MD_BLOGEXISTS');
146 146
                 foreach (array_keys($blogs_obj) as $bid) {
147
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
148
-                         . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
147
+                    echo "<br><a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'
148
+                         . 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   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-include __DIR__ . '/header.php';
28
+include __DIR__.'/header.php';
29 29
 
30 30
 // trackback is done by a POST
31 31
 $art_id     = explode('/', $_SERVER['REQUEST_URI']);
32
-$article_id = (int)$art_id[count($art_id) - 1];
32
+$article_id = (int) $art_id[count($art_id)-1];
33 33
 $url        = $_POST['url'];
34 34
 $title      = $_POST['title'];
35 35
 $excerpt    = $_POST['excerpt'];
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 if (empty($xoopsModuleConfig['trackback_option'])) {
40 40
     planet_trackback_response(1, 'Trackback is closed');
41 41
 }
42
-if (!strlen($title . $url . $blog_name)) {
42
+if (!strlen($title.$url.$blog_name)) {
43 43
     planet_trackback_response(1, planet_constant('MD_INVALID'));
44 44
 }
45 45
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $trackback_handler = xoops_getModuleHandler('trackback', $GLOBALS['moddirname']);
48 48
     $criteria          = new CriteriaCompo(new Criteria('art_id', $article_id));
49 49
     $criteria->add(new Criteria('tb_url', $url));
50
-    if ($trackback_handler->getCount($criteria) > 0) {
50
+    if ($trackback_handler->getCount($criteria)>0) {
51 51
         planet_trackback_response(1, 'We already have a ping from that URI for this article.');
52 52
     }
53 53
 
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
     $title     = XoopsLocal::convert_encoding($title, _CHARSET, $charset);
56 56
     $excerpt   = XoopsLocal::convert_encoding($excerpt, _CHARSET, $charset);
57 57
     $blog_name = XoopsLocal::convert_encoding($blog_name, _CHARSET, $charset);
58
-    $tb_status = (int)$xoopsModuleConfig['trackback_option'];
58
+    $tb_status = (int) $xoopsModuleConfig['trackback_option'];
59 59
 
60 60
     $com_pid    = 0;
61 61
     $com_itemid = $article_id;
62 62
     $com_rootid = 0;
63 63
     $com_title  = $title;
64 64
     $com_text   = $excerpt;
65
-    $com_text .= "\n\n[TRACKBACK]" . _POSTEDBY . ': ';
65
+    $com_text .= "\n\n[TRACKBACK]"._POSTEDBY.': ';
66 66
     if (!empty($url)) {
67
-        $com_text .= '[url=' . $url . ']' . $blog_name . '[/url]';
68
-    } else {
67
+        $com_text .= '[url='.$url.']'.$blog_name.'[/url]';
68
+    }else {
69 69
         $com_text .= $blog_name;
70 70
     }
71 71
     $com_modid = $xoopsModule->getVar('mid');
@@ -122,14 +122,14 @@  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)
125
+                        && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)
126 126
                     ) {
127
-                        include_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile;
127
+                        include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
128 128
                     }
129 129
                     if (!function_exists($comment_config['callback']['approve'])) {
130 130
                         $skip = true;
131 131
                     }
132
-                } else {
132
+                }else {
133 133
                     $skip = true;
134 134
                 }
135 135
             }
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
                 if (isset($comment_config['callbackFile'])) {
148 148
                     $callbackfile = trim($comment_config['callbackFile']);
149 149
                     if ($callbackfile != ''
150
-                        && file_exists(XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile)
150
+                        && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)
151 151
                     ) {
152
-                        include_once XOOPS_ROOT_PATH . '/modules/' . $moddir . '/' . $callbackfile;
152
+                        include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
153 153
                     }
154 154
                     if (!function_exists($comment_config['callback']['update'])) {
155 155
                         $skip = true;
156 156
                     }
157
-                } else {
157
+                }else {
158 158
                     $skip = true;
159 159
                 }
160 160
             }
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
         // trigger notification event if necessary
173 173
         if ($notify_event) {
174 174
             $not_modid = $com_modid;
175
-            include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
176
-            $not_catinfo  =& notificationCommentCategoryInfo($not_modid);
175
+            include_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
176
+            $not_catinfo  = & notificationCommentCategoryInfo($not_modid);
177 177
             $not_category = $not_catinfo['name'];
178 178
             $not_itemid   = $com_itemid;
179 179
             $not_event    = $notify_event;
@@ -181,23 +181,23 @@  discard block
 block discarded – undo
181 181
             // point to a viewable page (i.e. not the system administration
182 182
             // module).
183 183
             $comment_tags = array();
184
-            $not_module   =& $xoopsModule;
184
+            $not_module   = & $xoopsModule;
185 185
             if (!isset($comment_url)) {
186
-                $com_config  =& $not_module->getInfo('comments');
187
-                $comment_url = $com_config['pageName'] . '?';
186
+                $com_config  = & $not_module->getInfo('comments');
187
+                $comment_url = $com_config['pageName'].'?';
188 188
                 $comment_url .= $com_config['itemName'];
189 189
             }
190
-            $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/'
191
-                                             . $comment_url . '=' . $com_itemid . '&amp;com_id=' . $newcid
192
-                                             . '&amp;com_rootid=' . $com_rootid . '&amp;com_mode=' . $com_mode
193
-                                             . '&amp;com_order=' . $com_order . '#comment' . $newcid;
194
-            $notification_handler          = xoops_getHandler('notification');
190
+            $comment_tags['X_COMMENT_URL'] = XOOPS_URL.'/modules/'.$not_module->getVar('dirname').'/'
191
+                                             . $comment_url.'='.$com_itemid.'&amp;com_id='.$newcid
192
+                                             . '&amp;com_rootid='.$com_rootid.'&amp;com_mode='.$com_mode
193
+                                             . '&amp;com_order='.$com_order.'#comment'.$newcid;
194
+            $notification_handler = xoops_getHandler('notification');
195 195
             $notification_handler->triggerEvent($not_category, $not_itemid, $not_event, $comment_tags, false,
196 196
                                                 $not_modid);
197 197
         }
198 198
 
199 199
         planet_trackback_response(0);
200
-    } else {
200
+    }else {
201 201
         planet_trackback_response(1, xoops_error($comment->getHtmlErrors()));
202 202
     }
203 203
 }
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
29 29
 
30
-include __DIR__ . '/include/vars.php';
30
+include __DIR__.'/include/vars.php';
31 31
 
32
-$modversion                 = array(
32
+$modversion = array(
33 33
     'name'        => planet_constant('MI_NAME'),
34 34
     'version'     => 2.10,
35 35
     'description' => planet_constant('MI_DESC'),
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
     'image'       => 'assets/images/logo.png',
38 38
     'dirname'     => $GLOBALS['moddirname'],
39 39
     'author'      => 'D.J. (phppp)',
40
-    'help'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
40
+    'help'        => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/readme.html'
41 41
 );
42 42
 $modversion['help']         = 'page=help';
43 43
 $modversion['license']      = 'GNU see LICENSE';
44
-$modversion['license_file'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/gpl.txt';
44
+$modversion['license_file'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/gpl.txt';
45 45
 $modversion['author_word']  = '';
46 46
 $modversion['module_team']  = '';
47 47
 
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 // database tables
65 65
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
66 66
 $modversion['tables']           = array(
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
71
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
72
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
67
+    $GLOBALS['MOD_DB_PREFIX'].'_category',
68
+    $GLOBALS['MOD_DB_PREFIX'].'_article',
69
+    $GLOBALS['MOD_DB_PREFIX'].'_blog',
70
+    $GLOBALS['MOD_DB_PREFIX'].'_blogcat',
71
+    $GLOBALS['MOD_DB_PREFIX'].'_bookmark',
72
+    $GLOBALS['MOD_DB_PREFIX'].'_rate'
73 73
 );
74 74
 
75 75
 // Admin things
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 /**
96 96
  * Templates
97 97
  */
98
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => '');
99
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => '');
100
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => '');
101
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => '');
102
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => '');
98
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => '');
99
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => '');
100
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => '');
101
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => '');
102
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_search.tpl', 'description' => '');
103 103
 
104 104
 //module css
105 105
 $modversion['css'] = 'templates/style.css';
@@ -111,31 +111,31 @@  discard block
 block discarded – undo
111 111
 $modversion['blocks'][$i]['file']        = 'block.php';
112 112
 $modversion['blocks'][$i]['name']        = planet_constant('MI_ARTICLE');
113 113
 $modversion['blocks'][$i]['description'] = planet_constant('MI_ARTICLE_DESC');
114
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_article_show';
114
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_article_show';
115 115
 $modversion['blocks'][$i]['options']     = 'time|10|0|0'; // type|MaxItems|TitleLength|SummaryLength
116
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_article_edit';
117
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_article.tpl';
116
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_article_edit';
117
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_article.tpl';
118 118
 
119 119
 ++$i;
120 120
 $modversion['blocks'][$i]['file']        = 'block.php';
121 121
 $modversion['blocks'][$i]['name']        = planet_constant('MI_CATEGORY');
122 122
 $modversion['blocks'][$i]['description'] = planet_constant('MI_CATEGORY_DESC');
123
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_category_show';
124
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_category.tpl';
123
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_category_show';
124
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_category.tpl';
125 125
 
126 126
 ++$i;
127 127
 $modversion['blocks'][$i]['file']        = 'block.php';
128 128
 $modversion['blocks'][$i]['name']        = planet_constant('MI_BLOG');
129 129
 $modversion['blocks'][$i]['description'] = planet_constant('MI_BLOG_DESC');
130
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_show';
130
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_blog_show';
131 131
 $modversion['blocks'][$i]['options']     = 'feature|10|0|1'; // type|MaxItems|TitleLength|ShowDesc
132
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_edit';
133
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_blog.tpl';
132
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_blog_edit';
133
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_blog.tpl';
134 134
 
135 135
 // Search
136 136
 $modversion['hasSearch']      = 1;
137 137
 $modversion['search']['file'] = 'include/search.inc.php';
138
-$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'] . '_search';
138
+$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'].'_search';
139 139
 
140 140
 // Comments
141 141
 $modversion['hasComments'] = 1;
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 
146 146
 // Comment callback functions
147 147
 $modversion['comments']['callbackFile']        = 'include/comment.inc.php';
148
-$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'] . '_com_approve';
149
-$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'] . '_com_update';
148
+$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'].'_com_approve';
149
+$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'].'_com_update';
150 150
 
151 151
 // Configs
152 152
 // Config items
153 153
 $modversion['config'][] = array(
154 154
     'name'        => 'do_debug',
155
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
156
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG',
156
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC',
157 157
     'formtype'    => 'yesno',
158 158
     'valuetype'   => 'int',
159 159
     'default'     => 1
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 
162 162
 $modversion['config'][] = array(
163 163
     'name'        => 'do_urw',
164
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
165
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE',
165
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC',
166 166
     'formtype'    => 'yesno',
167 167
     'valuetype'   => 'int',
168 168
     'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 
171 171
 $modversion['config'][] = array(
172 172
     'name'        => 'theme_set',
173
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
174
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET',
174
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC',
175 175
     'formtype'    => 'select',
176 176
     'valuetype'   => 'text',
177 177
     'options'     => array(_NONE => '0'),
@@ -180,23 +180,23 @@  discard block
 block discarded – undo
180 180
 
181 181
 $modversion['config'][] = array(
182 182
     'name'        => 'timeformat',
183
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
184
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT',
184
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC',
185 185
     'formtype'    => 'select',
186 186
     'valuetype'   => 'text',
187 187
     'options'     => array(
188 188
         _DATESTRING                                       => 'l',
189 189
         _MEDIUMDATESTRING                                 => 'm',
190 190
         _SHORTDATESTRING                                  => 's',
191
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
191
+        $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM' => 'c'
192 192
     ),
193 193
     'default'     => 'c'
194 194
 );
195 195
 
196 196
 $modversion['config'][] = array(
197 197
     'name'        => 'articles_perpage',
198
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
199
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE',
199
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC',
200 200
     'formtype'    => 'textbox',
201 201
     'valuetype'   => 'int',
202 202
     'default'     => 10
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 
205 205
 $modversion['config'][] = array(
206 206
     'name'        => 'list_perpage',
207
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
208
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE',
208
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC',
209 209
     'formtype'    => 'textbox',
210 210
     'valuetype'   => 'int',
211 211
     'default'     => 20
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
 
214 214
 $modversion['config'][] = array(
215 215
     'name'        => 'blogs_perupdate',
216
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
217
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE',
217
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC',
218 218
     'formtype'    => 'textbox',
219 219
     'valuetype'   => 'int',
220 220
     'default'     => 10
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 
223 223
 $modversion['config'][] = array(
224 224
     'name'        => 'article_expire',
225
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
226
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE',
226
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC',
227 227
     'formtype'    => 'textbox',
228 228
     'valuetype'   => 'int',
229 229
     'default'     => 30
@@ -231,8 +231,8 @@  discard block
 block discarded – undo
231 231
 
232 232
 $modversion['config'][] = array(
233 233
     'name'        => 'display_summary',
234
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
235
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY',
235
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC',
236 236
     'formtype'    => 'textbox',
237 237
     'valuetype'   => 'int',
238 238
     'default'     => 0
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
 
241 241
 $modversion['config'][] = array(
242 242
     'name'        => 'do_sibling',
243
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
244
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING',
244
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC',
245 245
     'formtype'    => 'yesno',
246 246
     'valuetype'   => 'int',
247 247
     'default'     => 1
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
 
250 250
 $modversion['config'][] = array(
251 251
     'name'        => 'pings',
252
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
253
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PING',
253
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC',
254 254
     'formtype'    => 'textarea',
255 255
     'valuetype'   => 'text',
256 256
     'default'     => ''
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 
259 259
 $modversion['config'][] = array(
260 260
     'name'        => 'trackback_option',
261
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
262
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION',
262
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC',
263 263
     'formtype'    => 'select',
264 264
     'valuetype'   => 'int',
265 265
     'default'     => 0,
@@ -268,17 +268,17 @@  discard block
 block discarded – undo
268 268
 
269 269
 $modversion['config'][] = array(
270 270
     'name'        => 'copyright',
271
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
272
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT',
272
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC',
273 273
     'formtype'    => 'textbox',
274 274
     'valuetype'   => 'text',
275
-    'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
275
+    'default'     => 'Copyright&copy; %s & '.$xoopsConfig['sitename']
276 276
 );
277 277
 
278 278
 $modversion['config'][] = array(
279 279
     'name'        => 'newblog_submit',
280
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
281
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT',
281
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC',
282 282
     'formtype'    => 'select',
283 283
     'valuetype'   => 'int',
284 284
     'default'     => 2,
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
 
294 294
 $modversion['config'][] = array(
295 295
     'name'        => 'anonymous_rate',
296
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
297
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE',
297
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC',
298 298
     'formtype'    => 'yesno',
299 299
     'valuetype'   => 'int',
300 300
     'default'     => 0
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 
303 303
 $modversion['config'][] = array(
304 304
     'name'        => 'do_pseudocron',
305
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
306
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON',
306
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC',
307 307
     'formtype'    => 'yesno',
308 308
     'valuetype'   => 'int',
309 309
     'default'     => 1
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 $modversion['hasNotification']             = 1;
315 315
 $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
316
-$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'] . '_notify_iteminfo';
316
+$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'].'_notify_iteminfo';
317 317
 
318 318
 $i = 0;
319 319
 ++$i;
Please login to merge, or discard this patch.
view.blogs.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 // URL: http://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,15 +37,15 @@  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 Bookmar(Favorite) UID */
44
-$uid = (int)(empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
44
+$uid = (int) (empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
45 45
 /* Sort by term */
46 46
 $sort = empty($_GET['sort']) ? @$args['sort'] : $_GET['sort'];
47 47
 /* Display as list */
48
-$list = (int)(empty($_GET['list']) ? @$args['list'] : $_GET['list']);
48
+$list = (int) (empty($_GET['list']) ? @$args['list'] : $_GET['list']);
49 49
 /*
50 50
 // restore $_SERVER['REQUEST_URI']
51 51
 if (!empty($REQUEST_URI_parsed)) {
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 }
65 65
 */
66 66
 
67
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_BLOGS');
67
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_BLOGS');
68 68
 $xoopsOption['template_main']   = planet_getTemplate('blogs');
69
-include_once XOOPS_ROOT_PATH . '/header.php';
70
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
69
+include_once XOOPS_ROOT_PATH.'/header.php';
70
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
71 71
 
72 72
 // Following part will not be executed after cache
73 73
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 $criteria    = new CriteriaCompo();
80 80
 $blog_prefix = '';
81 81
 /* Specific category */
82
-if ($category_id > 0) {
82
+if ($category_id>0) {
83 83
     $category_obj = $category_handler->get($category_id);
84 84
     $criteria->add(new Criteria('bc.cat_id', $category_id));
85 85
     $uid           = 0;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 }
91 91
 
92 92
 /* User bookmarks(favorites) */
93
-if ($uid > 0) {
93
+if ($uid>0) {
94 94
     $criteria->add(new Criteria('bm.bm_uid', $uid));
95 95
     $category_id      = 0;
96 96
     $blog_id          = 0;
@@ -104,25 +104,25 @@  discard block
 block discarded – undo
104 104
     $blog_prefix      = 'b.';
105 105
 }
106 106
 
107
-$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
107
+$criteria->add(new Criteria($blog_prefix.'blog_status', 0, '>'));
108 108
 
109 109
 /* Sort */
110 110
 $order = 'DESC';
111 111
 $sort  = empty($sort) ? 'default' : $sort;
112 112
 switch ($sort) {
113 113
     case 'marks':
114
-        $sortby = $blog_prefix . 'blog_marks';
114
+        $sortby = $blog_prefix.'blog_marks';
115 115
         break;
116 116
     case 'rating':
117
-        $sortby = $blog_prefix . 'blog_rating';
117
+        $sortby = $blog_prefix.'blog_rating';
118 118
         break;
119 119
     case 'time':
120
-        $sortby = $blog_prefix . 'blog_time';
120
+        $sortby = $blog_prefix.'blog_time';
121 121
         break;
122 122
     case 'default':
123 123
     default:
124 124
         $sort   = 'default';
125
-        $sortby = $blog_prefix . 'blog_id';
125
+        $sortby = $blog_prefix.'blog_id';
126 126
         break;
127 127
 }
128 128
 $criteria->setSort($sortby);
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
 $criteria->setStart($start);
131 131
 $criteria->setLimit($limit);
132 132
 
133
-$tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time');
133
+$tags = empty($list) ? '' : array($blog_prefix.'blog_title', $blog_prefix.'blog_time');
134 134
 switch ($query_type) {
135 135
     case 'category':
136
-        $blogs_obj  =& $blog_handler->getByCategory($criteria, $tags);
136
+        $blogs_obj  = & $blog_handler->getByCategory($criteria, $tags);
137 137
         $count_blog = $blog_handler->getCountByCategory($criteria);
138 138
         break;
139 139
     case 'bookmark':
140
-        $blogs_obj  =& $blog_handler->getByBookmark($criteria, $tags);
140
+        $blogs_obj  = & $blog_handler->getByBookmark($criteria, $tags);
141 141
         $count_blog = $blog_handler->getCountByBookmark($criteria);
142 142
         break;
143 143
     default:
144
-        $blogs_obj  =& $blog_handler->getAll($criteria, $tags);
144
+        $blogs_obj  = & $blog_handler->getAll($criteria, $tags);
145 145
         $count_blog = $blog_handler->getCount($criteria);
146 146
         break;
147 147
 }
@@ -170,62 +170,62 @@  discard block
 block discarded – undo
170 170
 }
171 171
 unset($blogs_obj);
172 172
 
173
-if ($count_blog > $limit) {
174
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
173
+if ($count_blog>$limit) {
174
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
175 175
     $start_link = array();
176 176
     if ($sort) {
177
-        $start_link[] = 'sort=' . $sort;
177
+        $start_link[] = 'sort='.$sort;
178 178
     }
179 179
     if ($category_id) {
180
-        $start_link[] = 'category=' . $category_id;
180
+        $start_link[] = 'category='.$category_id;
181 181
     }
182 182
     if ($list) {
183
-        $start_link[] = 'list=' . $list;
183
+        $start_link[] = 'list='.$list;
184 184
     }
185 185
     $nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&amp;', $start_link));
186 186
     $pagenav = $nav->renderNav(4);
187
-} else {
187
+}else {
188 188
     $pagenav = '';
189 189
 }
190 190
 
191 191
 $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']);
192
-$xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\""
193
-                               . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME')
192
+$xoopsTpl->assign('link_home', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\""
193
+                               . planet_constant('MD_HOME')."\" target=\"_self\">".planet_constant('MD_HOME')
194 194
                                . '</a>');
195 195
 
196 196
 if ($category_id || $uid) {
197 197
     $xoopsTpl->assign('link_index',
198
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\""
199
-                      . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
198
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/view.blogs.php\" title=\""
199
+                      . planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
200 200
 
201
-    $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
202
-                     . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid)
203
-                     . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>';
201
+    $link_articles = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'
202
+                     . (empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)
203
+                     . "\" title=\"".planet_constant('MD_ARTICLES')."\">".planet_constant('MD_ARTICLES').'</a>';
204 204
     $xoopsTpl->assign('link_articles', $link_articles);
205 205
 }
206 206
 
207
-$link_switch = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php'
208
-               . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid)
209
-               . (empty($list) ? '/l1' : '') . "\" title=\""
210
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) . "\">"
211
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')) . '</a>';
207
+$link_switch = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'
208
+               . (empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)
209
+               . (empty($list) ? '/l1' : '')."\" title=\""
210
+               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))."\">"
211
+               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW')).'</a>';
212 212
 $xoopsTpl->assign('link_switch', $link_switch);
213 213
 
214 214
 if (empty($uid) && is_object($xoopsUser)) {
215 215
     $xoopsTpl->assign('link_bookmark',
216
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php'
217
-                      . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\""
218
-                      . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS')
216
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'
217
+                      . URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\""
218
+                      . planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS')
219 219
                       . '</a>');
220 220
 }
221 221
 
222 222
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
223 223
     $xoopsTpl->assign('link_submit',
224
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\""
225
-                      . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
224
+                      "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""
225
+                      . _SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>');
226 226
 }
227 227
 
228
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS'));
228
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_BLOGS'));
229 229
 $xoopsTpl->assign('category', @$category_data);
230 230
 $xoopsTpl->assign('user', @$user_data);
231 231
 $xoopsTpl->assign('blogs', $blogs);
@@ -239,19 +239,19 @@  discard block
 block discarded – undo
239 239
     $xoopsTpl->assign('canrate', 1);
240 240
 }
241 241
 
242
-$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER;
242
+$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER;
243 243
 $vars      = array();
244 244
 if (!empty($category_id)) {
245
-    $vars[] = 'c' . $category_id;
245
+    $vars[] = 'c'.$category_id;
246 246
 }
247 247
 if (!empty($uid)) {
248
-    $vars[] = 'u' . $uid;
248
+    $vars[] = 'u'.$uid;
249 249
 }
250 250
 if (!empty($list)) {
251 251
     $vars[] = 'li';
252 252
 }
253 253
 if (!empty($vars)) {
254
-    $sort_link .= implode('/', $vars) . '/';
254
+    $sort_link .= implode('/', $vars).'/';
255 255
 }
256 256
 $sortlinks   = array();
257 257
 $valid_sorts = array(
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
     if ($val == $sort) {
265 265
         continue;
266 266
     }
267
-    $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
267
+    $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name.'</a>';
268 268
 }
269 269
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
270 270
 
271
-include_once __DIR__ . '/footer.php';
271
+include_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
comment_new.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 // URL: http://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/header.php';
28
-$com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0;
29
-if ($com_itemid > 0) {
27
+include __DIR__.'/header.php';
28
+$com_itemid = isset($_GET['com_itemid']) ? (int) $_GET['com_itemid'] : 0;
29
+if ($com_itemid>0) {
30 30
     $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
31
-    $article_obj     =& $article_handler->get($com_itemid);
31
+    $article_obj     = & $article_handler->get($com_itemid);
32 32
     $com_replytitle  = $article_obj->getVar('art_title');
33
-    include_once XOOPS_ROOT_PATH . '/include/comment_new.php';
33
+    include_once XOOPS_ROOT_PATH.'/include/comment_new.php';
34 34
 }
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28 28
 error_reporting(0);
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 error_reporting(0);
31 31
 
32 32
 if (empty($_POST['print_data'])) {
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
         $args['article'] = @$args_num[0];
35 35
     }
36 36
 
37
-    $article_id = (int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
37
+    $article_id = (int) (empty($_GET['article']) ? @$args['article'] : $_GET['article']);
38 38
 
39 39
     $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
40
-    $article_obj     =& $article_handler->get($article_id);
40
+    $article_obj     = & $article_handler->get($article_id);
41 41
 
42 42
     $article_data = array();
43 43
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     $article_data['time'] = $article_obj->getTime('l');
54 54
 
55 55
     // summary
56
-    $article_data['summary'] =& $article_obj->getSummary();
56
+    $article_data['summary'] = & $article_obj->getSummary();
57 57
 
58 58
     // text of page
59 59
     $article_data['text'] = $article_obj->getVar('art_content');
@@ -61,28 +61,28 @@  discard block
 block discarded – undo
61 61
     $print_data['title']   = $article_data['title'];
62 62
     $print_data['author']  = $article_data['author'];
63 63
     $print_data['date']    = $article_data['time'];
64
-    $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': '
64
+    $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY').': '
65 65
                                                                     . $article_data['summary'];
66 66
     $print_data['content'] = $article_data['text'];
67
-    $print_data['url']     = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/view.article.php'
68
-                             . URL_DELIMITER . 'c' . $category_id . '/' . $article_id . '/p' . $page;
69
-} else {
67
+    $print_data['url']     = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/view.article.php'
68
+                             . URL_DELIMITER.'c'.$category_id.'/'.$article_id.'/p'.$page;
69
+}else {
70 70
     $print_data = unserialize(base64_decode($_POST['print_data']));
71 71
 }
72 72
 
73
-$print_data['image']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/'
73
+$print_data['image']  = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'
74 74
                         . $xoopsModule->getInfo('image');
75
-$print_data['module'] = $xoopsModule->getVar('name') . ' V' . $xoopsModule->getInfo('version');
75
+$print_data['module'] = $xoopsModule->getVar('name').' V'.$xoopsModule->getInfo('version');
76 76
 
77
-header('Content-Type: text/html; charset=' . _CHARSET);
77
+header('Content-Type: text/html; charset='._CHARSET);
78 78
 echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
79 79
 echo "<html>\n<head>\n";
80
-echo '<title>' . $xoopsConfig['sitename'] . "</title>\n";
81
-echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "' />\n";
82
-echo "<meta name='AUTHOR' content='" . $myts->htmlspecialchars($xoopsConfig['sitename']) . "' />\n";
83
-echo "<meta name='COPYRIGHT' content='Copyright (c) " . date('Y') . ' by ' . $xoopsConfig['sitename'] . "' />\n";
84
-echo "<meta name='DESCRIPTION' content='" . $myts->htmlspecialchars($xoopsConfig['slogan']) . "' />\n";
85
-echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "' />\n";
80
+echo '<title>'.$xoopsConfig['sitename']."</title>\n";
81
+echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
82
+echo "<meta name='AUTHOR' content='".$myts->htmlspecialchars($xoopsConfig['sitename'])."' />\n";
83
+echo "<meta name='COPYRIGHT' content='Copyright (c) ".date('Y').' by '.$xoopsConfig['sitename']."' />\n";
84
+echo "<meta name='DESCRIPTION' content='".$myts->htmlspecialchars($xoopsConfig['slogan'])."' />\n";
85
+echo "<meta name='GENERATOR' content='".XOOPS_VERSION."' />\n";
86 86
 echo "<style type='text/css'>
87 87
             body {
88 88
                 color:#000000;
@@ -100,18 +100,18 @@  discard block
 block discarded – undo
100 100
 echo "</head>\n";
101 101
 echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n"
102 102
      . "<div style='float:center; width: 750px; border: 1px solid #000; padding: 20px;'>\n"
103
-     . "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n" . "<img src='"
104
-     . $print_data['image'] . "' border='0' alt='" . $print_data['module'] . "' />\n" . '<h2>' . $print_data['title']
105
-     . "</h2>\n" . "</div>\n"
103
+     . "<div style='text-align: center; display: block; margin: 0 0 6px 0; padding: 5px;'>\n"."<img src='"
104
+     . $print_data['image']."' border='0' alt='".$print_data['module']."' />\n".'<h2>'.$print_data['title']
105
+     . "</h2>\n"."</div>\n"
106 106
      . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n";
107
-echo (empty($print_data['author']) ? '' : '<div>' . planet_constant('MD_AUTHOR') . ': ' . $print_data['author']
108
-                                          . "</div>\n") . '<div>' . planet_constant('MD_DATE') . ': '
109
-     . $print_data['date'] . "</div>\n"
107
+echo (empty($print_data['author']) ? '' : '<div>'.planet_constant('MD_AUTHOR').': '.$print_data['author']
108
+                                          . "</div>\n").'<div>'.planet_constant('MD_DATE').': '
109
+     . $print_data['date']."</div>\n"
110 110
      . (empty($article_data['summary']) ? '' : "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n"
111
-                                               . '<div>' . $print_data['summary'] . "</div>\n")
112
-     . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n" . '<div>'
113
-     . $print_data['content'] . "</div>\n"
114
-     . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n" . '<div>'
115
-     . $print_data['module'] . "</div>\n" . '<div>URL: ' . $print_data['url'] . "</div>\n" . "</div>\n"
111
+                                               . '<div>'.$print_data['summary']."</div>\n")
112
+     . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 1px solid #ccc;'></div>\n".'<div>'
113
+     . $print_data['content']."</div>\n"
114
+     . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n".'<div>'
115
+     . $print_data['module']."</div>\n".'<div>URL: '.$print_data['url']."</div>\n"."</div>\n"
116 116
      . "</body>\n</html>\n";
117 117
 exit();
Please login to merge, or discard this patch.
comment_reply.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
 // URL: http://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include dirname(dirname(__DIR__)) . '/mainfile.php';
28
-include XOOPS_ROOT_PATH . '/include/comment_reply.php';
27
+include dirname(dirname(__DIR__)).'/mainfile.php';
28
+include XOOPS_ROOT_PATH.'/include/comment_reply.php';
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
21
-include_once __DIR__ . '/admin_header.php';
20
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
21
+include_once __DIR__.'/admin_header.php';
22 22
 
23 23
 xoops_cp_header();
24 24
 
@@ -27,4 +27,4 @@  discard block
 block discarded – undo
27 27
 echo $indexAdmin->addNavigation(basename(__FILE__));
28 28
 echo $indexAdmin->renderIndex();
29 29
 
30
-include_once __DIR__ . '/admin_footer.php';
30
+include_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.