Completed
Push — master ( adb512...260239 )
by Michael
03:10
created
xoops_version.php 2 patches
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© %s & ' . $xoopsConfig['sitename']
275
+    'default'     => 'Copyright© %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.
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 include __DIR__ . '/include/vars.php';
31 31
 
32 32
 $modversion                 = array(
33
-    'name'        => planet_constant('MI_NAME'),
34
-    'version'     => 2.10,
35
-    'description' => planet_constant('MI_DESC'),
36
-    'credits'     => 'XOOPS Project',
37
-    'image'       => 'assets/images/logoModule.png',
38
-    'dirname'     => $GLOBALS['moddirname'],
39
-    'author'      => 'D.J. (phppp)',
40
-    'help'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
33
+	'name'        => planet_constant('MI_NAME'),
34
+	'version'     => 2.10,
35
+	'description' => planet_constant('MI_DESC'),
36
+	'credits'     => 'XOOPS Project',
37
+	'image'       => 'assets/images/logoModule.png',
38
+	'dirname'     => $GLOBALS['moddirname'],
39
+	'author'      => 'D.J. (phppp)',
40
+	'help'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
41 41
 );
42 42
 $modversion['help']         = 'page=help';
43 43
 $modversion['license']      = 'GNU see LICENSE';
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 $modversion['min_xoops']           = '2.5.8';
58 58
 $modversion['min_admin']           = '1.2';
59 59
 $modversion['min_db']              = array(
60
-    'mysql'  => '5.0.7',
61
-    'mysqli' => '5.0.7'
60
+	'mysql'  => '5.0.7',
61
+	'mysqli' => '5.0.7'
62 62
 );
63 63
 
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
@@ -151,162 +151,162 @@  discard block
 block discarded – undo
151 151
 // Configs
152 152
 // Config items
153 153
 $modversion['config'][] = array(
154
-    'name'        => 'do_debug',
155
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
156
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
157
-    'formtype'    => 'yesno',
158
-    'valuetype'   => 'int',
159
-    'default'     => 1
154
+	'name'        => 'do_debug',
155
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
156
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
157
+	'formtype'    => 'yesno',
158
+	'valuetype'   => 'int',
159
+	'default'     => 1
160 160
 );
161 161
 
162 162
 $modversion['config'][] = array(
163
-    'name'        => 'do_urw',
164
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
165
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
166
-    'formtype'    => 'yesno',
167
-    'valuetype'   => 'int',
168
-    'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
163
+	'name'        => 'do_urw',
164
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
165
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
166
+	'formtype'    => 'yesno',
167
+	'valuetype'   => 'int',
168
+	'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
169 169
 );
170 170
 
171 171
 $modversion['config'][] = array(
172
-    'name'        => 'theme_set',
173
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
174
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
175
-    'formtype'    => 'select',
176
-    'valuetype'   => 'text',
177
-    'options'     => array(_NONE => '0'),
178
-    'default'     => ''
172
+	'name'        => 'theme_set',
173
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
174
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
175
+	'formtype'    => 'select',
176
+	'valuetype'   => 'text',
177
+	'options'     => array(_NONE => '0'),
178
+	'default'     => ''
179 179
 );
180 180
 
181 181
 $modversion['config'][] = array(
182
-    'name'        => 'timeformat',
183
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
184
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
185
-    'formtype'    => 'select',
186
-    'valuetype'   => 'text',
187
-    'options'     => array(
188
-        _DATESTRING                                       => 'l',
189
-        _MEDIUMDATESTRING                                 => 'm',
190
-        _SHORTDATESTRING                                  => 's',
191
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
192
-    ),
193
-    'default'     => 'c'
182
+	'name'        => 'timeformat',
183
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
184
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
185
+	'formtype'    => 'select',
186
+	'valuetype'   => 'text',
187
+	'options'     => array(
188
+		_DATESTRING                                       => 'l',
189
+		_MEDIUMDATESTRING                                 => 'm',
190
+		_SHORTDATESTRING                                  => 's',
191
+		$GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
192
+	),
193
+	'default'     => 'c'
194 194
 );
195 195
 
196 196
 $modversion['config'][] = array(
197
-    'name'        => 'articles_perpage',
198
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
199
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
200
-    'formtype'    => 'textbox',
201
-    'valuetype'   => 'int',
202
-    'default'     => 10
197
+	'name'        => 'articles_perpage',
198
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
199
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
200
+	'formtype'    => 'textbox',
201
+	'valuetype'   => 'int',
202
+	'default'     => 10
203 203
 );
204 204
 
205 205
 $modversion['config'][] = array(
206
-    'name'        => 'list_perpage',
207
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
208
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
209
-    'formtype'    => 'textbox',
210
-    'valuetype'   => 'int',
211
-    'default'     => 20
206
+	'name'        => 'list_perpage',
207
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
208
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
209
+	'formtype'    => 'textbox',
210
+	'valuetype'   => 'int',
211
+	'default'     => 20
212 212
 );
213 213
 
214 214
 $modversion['config'][] = array(
215
-    'name'        => 'blogs_perupdate',
216
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
217
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
218
-    'formtype'    => 'textbox',
219
-    'valuetype'   => 'int',
220
-    'default'     => 10
215
+	'name'        => 'blogs_perupdate',
216
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
217
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
218
+	'formtype'    => 'textbox',
219
+	'valuetype'   => 'int',
220
+	'default'     => 10
221 221
 );
222 222
 
223 223
 $modversion['config'][] = array(
224
-    'name'        => 'article_expire',
225
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
226
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
227
-    'formtype'    => 'textbox',
228
-    'valuetype'   => 'int',
229
-    'default'     => 30
224
+	'name'        => 'article_expire',
225
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
226
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
227
+	'formtype'    => 'textbox',
228
+	'valuetype'   => 'int',
229
+	'default'     => 30
230 230
 );
231 231
 
232 232
 $modversion['config'][] = array(
233
-    'name'        => 'display_summary',
234
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
235
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
236
-    'formtype'    => 'textbox',
237
-    'valuetype'   => 'int',
238
-    'default'     => 0
233
+	'name'        => 'display_summary',
234
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
235
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
236
+	'formtype'    => 'textbox',
237
+	'valuetype'   => 'int',
238
+	'default'     => 0
239 239
 );
240 240
 
241 241
 $modversion['config'][] = array(
242
-    'name'        => 'do_sibling',
243
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
244
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
245
-    'formtype'    => 'yesno',
246
-    'valuetype'   => 'int',
247
-    'default'     => 1
242
+	'name'        => 'do_sibling',
243
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
244
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
245
+	'formtype'    => 'yesno',
246
+	'valuetype'   => 'int',
247
+	'default'     => 1
248 248
 );
249 249
 
250 250
 $modversion['config'][] = array(
251
-    'name'        => 'pings',
252
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
253
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
254
-    'formtype'    => 'textarea',
255
-    'valuetype'   => 'text',
256
-    'default'     => ''
251
+	'name'        => 'pings',
252
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
253
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
254
+	'formtype'    => 'textarea',
255
+	'valuetype'   => 'text',
256
+	'default'     => ''
257 257
 );
258 258
 
259 259
 $modversion['config'][] = array(
260
-    'name'        => 'trackback_option',
261
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
262
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
263
-    'formtype'    => 'select',
264
-    'valuetype'   => 'int',
265
-    'default'     => 0,
266
-    'options'     => array(planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2)
260
+	'name'        => 'trackback_option',
261
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
262
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
263
+	'formtype'    => 'select',
264
+	'valuetype'   => 'int',
265
+	'default'     => 0,
266
+	'options'     => array(planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2)
267 267
 );
268 268
 
269 269
 $modversion['config'][] = array(
270
-    'name'        => 'copyright',
271
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
272
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
273
-    'formtype'    => 'textbox',
274
-    'valuetype'   => 'text',
275
-    'default'     => 'Copyright© %s & ' . $xoopsConfig['sitename']
270
+	'name'        => 'copyright',
271
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
272
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
273
+	'formtype'    => 'textbox',
274
+	'valuetype'   => 'text',
275
+	'default'     => 'Copyright© %s & ' . $xoopsConfig['sitename']
276 276
 );
277 277
 
278 278
 $modversion['config'][] = array(
279
-    'name'        => 'newblog_submit',
280
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
281
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
282
-    'formtype'    => 'select',
283
-    'valuetype'   => 'int',
284
-    'default'     => 2,
285
-    'options'     => array(
286
-        _NONE                            => 0,
287
-        planet_constant('MI_MODERATION') => 1,
288
-        planet_constant('MI_MEMBER')     => 2,
289
-        _ALL                             => 3
290
-    )
291
-    // 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
279
+	'name'        => 'newblog_submit',
280
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
281
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
282
+	'formtype'    => 'select',
283
+	'valuetype'   => 'int',
284
+	'default'     => 2,
285
+	'options'     => array(
286
+		_NONE                            => 0,
287
+		planet_constant('MI_MODERATION') => 1,
288
+		planet_constant('MI_MEMBER')     => 2,
289
+		_ALL                             => 3
290
+	)
291
+	// 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
292 292
 );
293 293
 
294 294
 $modversion['config'][] = array(
295
-    'name'        => 'anonymous_rate',
296
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
297
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
298
-    'formtype'    => 'yesno',
299
-    'valuetype'   => 'int',
300
-    'default'     => 0
295
+	'name'        => 'anonymous_rate',
296
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
297
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
298
+	'formtype'    => 'yesno',
299
+	'valuetype'   => 'int',
300
+	'default'     => 0
301 301
 );
302 302
 
303 303
 $modversion['config'][] = array(
304
-    'name'        => 'do_pseudocron',
305
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
306
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
307
-    'formtype'    => 'yesno',
308
-    'valuetype'   => 'int',
309
-    'default'     => 1
304
+	'name'        => 'do_pseudocron',
305
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
306
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
307
+	'formtype'    => 'yesno',
308
+	'valuetype'   => 'int',
309
+	'default'     => 1
310 310
 );
311 311
 
312 312
 // Notification
Please login to merge, or discard this patch.
view.blogs.php 2 patches
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 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';
31
-    exit();
30
+	include XOOPS_ROOT_PATH . '/include/notification_update.php';
31
+	exit();
32 32
 }
33 33
 
34 34
 if ($REQUEST_URI_parsed = planet_parse_args($args_num, $args, $args_str)) {
35
-    $args['start'] = @$args_num[0];
36
-    $args['sort']  = @$args_str[0];
35
+	$args['start'] = @$args_num[0];
36
+	$args['sort']  = @$args_str[0];
37 37
 }
38 38
 
39 39
 /* Start */
@@ -80,28 +80,28 @@  discard block
 block discarded – undo
80 80
 $blog_prefix = '';
81 81
 /* Specific category */
82 82
 if ($category_id > 0) {
83
-    $category_obj = $category_handler->get($category_id);
84
-    $criteria->add(new Criteria('bc.cat_id', $category_id));
85
-    $uid           = 0;
86
-    $blog_id       = 0;
87
-    $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
88
-    $query_type    = 'category';
89
-    $blog_prefix   = 'b.';
83
+	$category_obj = $category_handler->get($category_id);
84
+	$criteria->add(new Criteria('bc.cat_id', $category_id));
85
+	$uid           = 0;
86
+	$blog_id       = 0;
87
+	$category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
88
+	$query_type    = 'category';
89
+	$blog_prefix   = 'b.';
90 90
 }
91 91
 
92 92
 /* User bookmarks(favorites) */
93 93
 if ($uid > 0) {
94
-    $criteria->add(new Criteria('bm.bm_uid', $uid));
95
-    $category_id      = 0;
96
-    $blog_id          = 0;
97
-    $bookmark_handler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
98
-    $user_data        = array(
99
-        'uid'   => $uid,
100
-        'name'  => XoopsUser::getUnameFromId($uid),
101
-        'marks' => $bookmark_handler->getCount(new Criteria('bm_uid', $uid))
102
-    );
103
-    $query_type       = 'bookmark';
104
-    $blog_prefix      = 'b.';
94
+	$criteria->add(new Criteria('bm.bm_uid', $uid));
95
+	$category_id      = 0;
96
+	$blog_id          = 0;
97
+	$bookmark_handler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
98
+	$user_data        = array(
99
+		'uid'   => $uid,
100
+		'name'  => XoopsUser::getUnameFromId($uid),
101
+		'marks' => $bookmark_handler->getCount(new Criteria('bm_uid', $uid))
102
+	);
103
+	$query_type       = 'bookmark';
104
+	$blog_prefix      = 'b.';
105 105
 }
106 106
 
107 107
 $criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
@@ -110,20 +110,20 @@  discard block
 block discarded – undo
110 110
 $order = 'DESC';
111 111
 $sort  = empty($sort) ? 'default' : $sort;
112 112
 switch ($sort) {
113
-    case 'marks':
114
-        $sortby = $blog_prefix . 'blog_marks';
115
-        break;
116
-    case 'rating':
117
-        $sortby = $blog_prefix . 'blog_rating';
118
-        break;
119
-    case 'time':
120
-        $sortby = $blog_prefix . 'blog_time';
121
-        break;
122
-    case 'default':
123
-    default:
124
-        $sort   = 'default';
125
-        $sortby = $blog_prefix . 'blog_id';
126
-        break;
113
+	case 'marks':
114
+		$sortby = $blog_prefix . 'blog_marks';
115
+		break;
116
+	case 'rating':
117
+		$sortby = $blog_prefix . 'blog_rating';
118
+		break;
119
+	case 'time':
120
+		$sortby = $blog_prefix . 'blog_time';
121
+		break;
122
+	case 'default':
123
+	default:
124
+		$sort   = 'default';
125
+		$sortby = $blog_prefix . 'blog_id';
126
+		break;
127 127
 }
128 128
 $criteria->setSort($sortby);
129 129
 $criteria->setOrder($order);
@@ -132,97 +132,97 @@  discard block
 block discarded – undo
132 132
 
133 133
 $tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time');
134 134
 switch ($query_type) {
135
-    case 'category':
136
-        $blogs_obj  =& $blog_handler->getByCategory($criteria, $tags);
137
-        $count_blog = $blog_handler->getCountByCategory($criteria);
138
-        break;
139
-    case 'bookmark':
140
-        $blogs_obj  =& $blog_handler->getByBookmark($criteria, $tags);
141
-        $count_blog = $blog_handler->getCountByBookmark($criteria);
142
-        break;
143
-    default:
144
-        $blogs_obj  =& $blog_handler->getAll($criteria, $tags);
145
-        $count_blog = $blog_handler->getCount($criteria);
146
-        break;
135
+	case 'category':
136
+		$blogs_obj  =& $blog_handler->getByCategory($criteria, $tags);
137
+		$count_blog = $blog_handler->getCountByCategory($criteria);
138
+		break;
139
+	case 'bookmark':
140
+		$blogs_obj  =& $blog_handler->getByBookmark($criteria, $tags);
141
+		$count_blog = $blog_handler->getCountByBookmark($criteria);
142
+		break;
143
+	default:
144
+		$blogs_obj  =& $blog_handler->getAll($criteria, $tags);
145
+		$count_blog = $blog_handler->getCount($criteria);
146
+		break;
147 147
 }
148 148
 
149 149
 /* Objects to array */
150 150
 $blogs = array();
151 151
 foreach (array_keys($blogs_obj) as $id) {
152
-    $_blog = array(
153
-        'id'    => $id,
154
-        'title' => $blogs_obj[$id]->getVar('blog_title'),
155
-        'time'  => $blogs_obj[$id]->getTime()
156
-    );
157
-    if (empty($list)) {
158
-        $_blog = array_merge($_blog, array(
159
-            'image' => $blogs_obj[$id]->getImage(),
160
-            'feed'  => $blogs_obj[$id]->getVar('blog_feed'),
161
-            'link'  => $blogs_obj[$id]->getVar('blog_link'),
162
-            'desc'  => $blogs_obj[$id]->getVar('blog_desc'),
163
-            'star'  => $blogs_obj[$id]->getStar(),
164
-            'rates' => $blogs_obj[$id]->getVar('blog_rates'),
165
-            'marks' => $blogs_obj[$id]->getVar('blog_marks')
166
-        ));
167
-    }
168
-    $blogs[] = $_blog;
169
-    unset($_blog);
152
+	$_blog = array(
153
+		'id'    => $id,
154
+		'title' => $blogs_obj[$id]->getVar('blog_title'),
155
+		'time'  => $blogs_obj[$id]->getTime()
156
+	);
157
+	if (empty($list)) {
158
+		$_blog = array_merge($_blog, array(
159
+			'image' => $blogs_obj[$id]->getImage(),
160
+			'feed'  => $blogs_obj[$id]->getVar('blog_feed'),
161
+			'link'  => $blogs_obj[$id]->getVar('blog_link'),
162
+			'desc'  => $blogs_obj[$id]->getVar('blog_desc'),
163
+			'star'  => $blogs_obj[$id]->getStar(),
164
+			'rates' => $blogs_obj[$id]->getVar('blog_rates'),
165
+			'marks' => $blogs_obj[$id]->getVar('blog_marks')
166
+		));
167
+	}
168
+	$blogs[] = $_blog;
169
+	unset($_blog);
170 170
 }
171 171
 unset($blogs_obj);
172 172
 
173 173
 if ($count_blog > $limit) {
174
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
175
-    $start_link = array();
176
-    if ($sort) {
177
-        $start_link[] = 'sort=' . $sort;
178
-    }
179
-    if ($category_id) {
180
-        $start_link[] = 'category=' . $category_id;
181
-    }
182
-    if ($list) {
183
-        $start_link[] = 'list=' . $list;
184
-    }
185
-    $nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link));
186
-    $pagenav = $nav->renderNav(4);
174
+	include XOOPS_ROOT_PATH . '/class/pagenav.php';
175
+	$start_link = array();
176
+	if ($sort) {
177
+		$start_link[] = 'sort=' . $sort;
178
+	}
179
+	if ($category_id) {
180
+		$start_link[] = 'category=' . $category_id;
181
+	}
182
+	if ($list) {
183
+		$start_link[] = 'list=' . $list;
184
+	}
185
+	$nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&', $start_link));
186
+	$pagenav = $nav->renderNav(4);
187 187
 } else {
188
-    $pagenav = '';
188
+	$pagenav = '';
189 189
 }
190 190
 
191 191
 $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']);
192 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
-                               . '</a>');
193
+							   . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME')
194
+							   . '</a>');
195 195
 
196 196
 if ($category_id || $uid) {
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>');
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>');
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>';
204
-    $xoopsTpl->assign('link_articles', $link_articles);
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
+	$xoopsTpl->assign('link_articles', $link_articles);
205 205
 }
206 206
 
207 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>';
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
-    $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')
219
-                      . '</a>');
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')
219
+					  . '</a>');
220 220
 }
221 221
 
222 222
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
223
-    $xoopsTpl->assign('link_submit',
224
-                      "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\""
225
-                      . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
223
+	$xoopsTpl->assign('link_submit',
224
+					  "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\""
225
+					  . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
226 226
 }
227 227
 
228 228
 $xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS'));
@@ -236,35 +236,35 @@  discard block
 block discarded – undo
236 236
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
237 237
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
238 238
 } elseif (!$list) {
239
-    $xoopsTpl->assign('canrate', 1);
239
+	$xoopsTpl->assign('canrate', 1);
240 240
 }
241 241
 
242 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
-    $vars[] = 'li';
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(
258
-    'marks'   => planet_constant('MD_BOOKMARKS'),
259
-    'rating'  => planet_constant('MD_RATING'),
260
-    'time'    => planet_constant('MD_TIME'),
261
-    'default' => planet_constant('MD_DEFAULT')
258
+	'marks'   => planet_constant('MD_BOOKMARKS'),
259
+	'rating'  => planet_constant('MD_RATING'),
260
+	'time'    => planet_constant('MD_TIME'),
261
+	'default' => planet_constant('MD_DEFAULT')
262 262
 );
263 263
 foreach ($valid_sorts as $val => $name) {
264
-    if ($val == $sort) {
265
-        continue;
266
-    }
267
-    $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
264
+	if ($val == $sort) {
265
+		continue;
266
+	}
267
+	$sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
268 268
 }
269 269
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
270 270
 
Please login to merge, or discard this 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 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 include __DIR__ . '/header.php';
28 28
 $com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0;
29 29
 if ($com_itemid > 0) {
30
-    $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
31
-    $article_obj     =& $article_handler->get($com_itemid);
32
-    $com_replytitle  = $article_obj->getVar('art_title');
33
-    include_once XOOPS_ROOT_PATH . '/include/comment_new.php';
30
+	$article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
31
+	$article_obj     =& $article_handler->get($com_itemid);
32
+	$com_replytitle  = $article_obj->getVar('art_title');
33
+	include_once XOOPS_ROOT_PATH . '/include/comment_new.php';
34 34
 }
Please login to merge, or discard this 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 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -30,48 +30,48 @@  discard block
 block discarded – undo
30 30
 error_reporting(0);
31 31
 
32 32
 if (empty($_POST['print_data'])) {
33
-    if (planet_parse_args($args_num, $args, $args_str)) {
34
-        $args['article'] = @$args_num[0];
35
-    }
33
+	if (planet_parse_args($args_num, $args, $args_str)) {
34
+		$args['article'] = @$args_num[0];
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
-    $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
40
-    $article_obj     =& $article_handler->get($article_id);
39
+	$article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
40
+	$article_obj     =& $article_handler->get($article_id);
41 41
 
42
-    $article_data = array();
42
+	$article_data = array();
43 43
 
44
-    // title
45
-    $article_data['title'] = $article_obj->getVar('art_title');
44
+	// title
45
+	$article_data['title'] = $article_obj->getVar('art_title');
46 46
 
47
-    $article_data['author'] = $article_obj->getVar('art_author');
47
+	$article_data['author'] = $article_obj->getVar('art_author');
48 48
 
49
-    // source
50
-    $article_data['source'] = $article_obj->getVar('art_link');
49
+	// source
50
+	$article_data['source'] = $article_obj->getVar('art_link');
51 51
 
52
-    // publish time
53
-    $article_data['time'] = $article_obj->getTime('l');
52
+	// publish time
53
+	$article_data['time'] = $article_obj->getTime('l');
54 54
 
55
-    // summary
56
-    $article_data['summary'] =& $article_obj->getSummary();
55
+	// summary
56
+	$article_data['summary'] =& $article_obj->getSummary();
57 57
 
58
-    // text of page
59
-    $article_data['text'] = $article_obj->getVar('art_content');
58
+	// text of page
59
+	$article_data['text'] = $article_obj->getVar('art_content');
60 60
 
61
-    $print_data['title']   = $article_data['title'];
62
-    $print_data['author']  = $article_data['author'];
63
-    $print_data['date']    = $article_data['time'];
64
-    $print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': '
65
-                                                                    . $article_data['summary'];
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;
61
+	$print_data['title']   = $article_data['title'];
62
+	$print_data['author']  = $article_data['author'];
63
+	$print_data['date']    = $article_data['time'];
64
+	$print_data['summary'] = empty($article_data['summary']) ? '' : planet_constant('MD_SUMMARY') . ': '
65
+																	. $article_data['summary'];
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 69
 } else {
70
-    $print_data = unserialize(base64_decode($_POST['print_data']));
70
+	$print_data = unserialize(base64_decode($_POST['print_data']));
71 71
 }
72 72
 
73 73
 $print_data['image']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/'
74
-                        . $xoopsModule->getInfo('image');
74
+						. $xoopsModule->getInfo('image');
75 75
 $print_data['module'] = $xoopsModule->getVar('name') . ' V' . $xoopsModule->getInfo('version');
76 76
 
77 77
 header('Content-Type: text/html; charset=' . _CHARSET);
@@ -99,19 +99,19 @@  discard block
 block discarded – undo
99 99
             </style>\n";
100 100
 echo "</head>\n";
101 101
 echo "<body style='background-color:#ffffff; color:#000000; font-family: Arial' onload='window.print()'>\n"
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"
106
-     . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n";
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"
106
+	 . "<div style='margin-top: 12px; margin-bottom: 12px; border-top: 2px solid #ccc;'></div>\n";
107 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
-     . (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"
116
-     . "</body>\n</html>\n";
108
+										  . "</div>\n") . '<div>' . planet_constant('MD_DATE') . ': '
109
+	 . $print_data['date'] . "</div>\n"
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"
116
+	 . "</body>\n</html>\n";
117 117
 exit();
Please login to merge, or discard this 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.
admin/main.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 //echo '<label>' . '<strong>MySQL Version:</strong>' . ':</label><text>' . mysqli_get_server_info() . '</text><br>';
57 57
 echo '<label>' . '<strong>XOOPS Version:</strong>' . ':</label><text>' . XOOPS_VERSION . '</text><br>';
58 58
 echo '<label>' . '<strong>Module Version:</strong>' . ':</label><text>' . $xoopsModule->getInfo('version')
59
-     . '</text><br>';
59
+	 . '</text><br>';
60 60
 echo '</div>';
61 61
 echo "<div style='padding: 8px;'>";
62 62
 echo '<label>' . planet_constant('AM_SAFEMODE') . ':</label><text>';
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 echo '</text><br>';
107 107
 echo '<label>' . planet_constant('AM_TOTAL_BLOGS') . ':</label><text>' . $blog_count;
108 108
 if ($blog_count_pending > 0) {
109
-    echo " (<font color=\"red\">" . $blog_count_pending . '</font>)';
109
+	echo " (<font color=\"red\">" . $blog_count_pending . '</font>)';
110 110
 }
111 111
 echo '</text><br>';
112 112
 echo '<label>' . planet_constant('AM_TOTAL_ARTICLES') . ':</label><text>' . $article_count;
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // URL: http://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include_once __DIR__ . '/admin_header.php';
27
+include_once __DIR__.'/admin_header.php';
28 28
 
29 29
 xoops_cp_header();
30 30
 $indexAdmin = new ModuleAdmin();
@@ -50,49 +50,49 @@  discard block
 block discarded – undo
50 50
     </style>
51 51
 ";
52 52
 
53
-echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_PREFERENCES') . '</legend>';
53
+echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_PREFERENCES').'</legend>';
54 54
 echo "<div style='padding: 8px;'>";
55
-echo '<label>' . '<strong>PHP Version:</strong>' . ':</label><text>' . phpversion() . '</text><br>';
55
+echo '<label>'.'<strong>PHP Version:</strong>'.':</label><text>'.phpversion().'</text><br>';
56 56
 //echo '<label>' . '<strong>MySQL Version:</strong>' . ':</label><text>' . mysqli_get_server_info() . '</text><br>';
57
-echo '<label>' . '<strong>XOOPS Version:</strong>' . ':</label><text>' . XOOPS_VERSION . '</text><br>';
58
-echo '<label>' . '<strong>Module Version:</strong>' . ':</label><text>' . $xoopsModule->getInfo('version')
57
+echo '<label>'.'<strong>XOOPS Version:</strong>'.':</label><text>'.XOOPS_VERSION.'</text><br>';
58
+echo '<label>'.'<strong>Module Version:</strong>'.':</label><text>'.$xoopsModule->getInfo('version')
59 59
      . '</text><br>';
60 60
 echo '</div>';
61 61
 echo "<div style='padding: 8px;'>";
62
-echo '<label>' . planet_constant('AM_SAFEMODE') . ':</label><text>';
62
+echo '<label>'.planet_constant('AM_SAFEMODE').':</label><text>';
63 63
 echo ini_get('safe_mode') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
64 64
 echo '</text><br>';
65
-echo '<label>' . planet_constant('AM_REGISTERGLOBALS') . ':</label><text>';
65
+echo '<label>'.planet_constant('AM_REGISTERGLOBALS').':</label><text>';
66 66
 echo ini_get('register_globals') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
67 67
 echo '</text><br>';
68
-echo '<label>' . planet_constant('AM_MAGICQUOTESGPC') . ':</label><text>';
68
+echo '<label>'.planet_constant('AM_MAGICQUOTESGPC').':</label><text>';
69 69
 echo ini_get('magic_quotes_gpc') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
70 70
 echo '</text><br>';
71
-echo '<label>' . planet_constant('AM_MAXPOSTSIZE') . ':</label><text>' . ini_get('post_max_size');
71
+echo '<label>'.planet_constant('AM_MAXPOSTSIZE').':</label><text>'.ini_get('post_max_size');
72 72
 echo '</text><br>';
73
-echo '<label>' . planet_constant('AM_MAXINPUTTIME') . ':</label><text>' . ini_get('max_input_time');
73
+echo '<label>'.planet_constant('AM_MAXINPUTTIME').':</label><text>'.ini_get('max_input_time');
74 74
 echo '</text><br>';
75
-echo '<label>' . planet_constant('AM_OUTPUTBUFFERING') . ':</label><text>' . ini_get('output_buffering');
75
+echo '<label>'.planet_constant('AM_OUTPUTBUFFERING').':</label><text>'.ini_get('output_buffering');
76 76
 echo '</text><br>';
77
-echo '<label>' . planet_constant('AM_XML_EXTENSION') . ':</label><text>';
77
+echo '<label>'.planet_constant('AM_XML_EXTENSION').':</label><text>';
78 78
 echo extension_loaded('xml') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
79 79
 echo '</text><br>';
80
-echo '<label>' . planet_constant('AM_MB_EXTENSION') . ':</label><text>';
80
+echo '<label>'.planet_constant('AM_MB_EXTENSION').':</label><text>';
81 81
 echo extension_loaded('mbstring') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
82 82
 echo '</text><br>';
83
-echo '<label>' . planet_constant('AM_CURL') . ':</label><text>';
83
+echo '<label>'.planet_constant('AM_CURL').':</label><text>';
84 84
 echo function_exists('curl_init') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
85 85
 echo '</text><br>';
86
-echo '<label>' . planet_constant('AM_FSOCKOPEN') . ':</label><text>';
86
+echo '<label>'.planet_constant('AM_FSOCKOPEN').':</label><text>';
87 87
 echo function_exists('fsockopen') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
88 88
 echo '</text><br>';
89
-echo '<label>' . planet_constant('AM_URLFOPEN') . ':</label><text>';
89
+echo '<label>'.planet_constant('AM_URLFOPEN').':</label><text>';
90 90
 echo ini_get('allow_url_fopen') ? planet_constant('AM_ON') : planet_constant('AM_OFF');
91 91
 echo '</text><br>';
92 92
 echo '</div>';
93 93
 echo '</fieldset>';
94 94
 
95
-echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_STATS') . '</legend>';
95
+echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_STATS').'</legend>';
96 96
 echo "<div style='padding: 8px;'>";
97 97
 $category_handler   = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
98 98
 $category_count     = $category_handler->getCount();
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
 $article_count      = $article_handler->getCount();
103 103
 $criteria           = new Criteria('blog_status', 0);
104 104
 $blog_count_pending = $blog_handler->getCount($criteria);
105
-echo '<label>' . planet_constant('AM_TOTAL_CATEGORIES') . ':</label><text>' . $category_count;
105
+echo '<label>'.planet_constant('AM_TOTAL_CATEGORIES').':</label><text>'.$category_count;
106 106
 echo '</text><br>';
107
-echo '<label>' . planet_constant('AM_TOTAL_BLOGS') . ':</label><text>' . $blog_count;
108
-if ($blog_count_pending > 0) {
109
-    echo " (<font color=\"red\">" . $blog_count_pending . '</font>)';
107
+echo '<label>'.planet_constant('AM_TOTAL_BLOGS').':</label><text>'.$blog_count;
108
+if ($blog_count_pending>0) {
109
+    echo " (<font color=\"red\">".$blog_count_pending.'</font>)';
110 110
 }
111 111
 echo '</text><br>';
112
-echo '<label>' . planet_constant('AM_TOTAL_ARTICLES') . ':</label><text>' . $article_count;
112
+echo '<label>'.planet_constant('AM_TOTAL_ARTICLES').':</label><text>'.$article_count;
113 113
 echo '</text><br>';
114 114
 echo '</div>';
115 115
 echo '</fieldset>';
Please login to merge, or discard this patch.
admin/admin_footer.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n"
21
-     . "    <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
22
-     . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
21
+	 . "    <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
22
+	 . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
23 23
 
24 24
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n"
20
+echo "<div class='adminfooter'>\n"."  <div style='text-align: center;'>\n"
21 21
      . "    <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
22
-     . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
22
+     . "  </div>\n".'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>';
23 23
 
24 24
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/admin.blog.php 3 patches
Indentation   +312 added lines, -312 removed lines patch added patch discarded remove patch
@@ -50,347 +50,347 @@
 block discarded – undo
50 50
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
51 51
 
52 52
 if ('save' === $op && !empty($_POST['fetch'])) {
53
-    $op = 'edit';
53
+	$op = 'edit';
54 54
 }
55 55
 
56 56
 switch ($op) {
57
-    /* save a single blog */
58
-    case 'save':
57
+	/* save a single blog */
58
+	case 'save':
59 59
 
60
-        if ($blog_id) {
61
-            $blog_obj =& $blog_handler->get($blog_id);
62
-        } else {
63
-            if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed', $_POST['blog_feed']))) {
64
-                redirect_header('admin.blog.php', 2, planet_constant('AM_BLOGEXISTS'));
65
-            }
66
-            $blog_obj =& $blog_handler->create();
67
-            $blog_obj->setVar('blog_submitter', $xoopsUser->getVar('uid'));
68
-        }
60
+		if ($blog_id) {
61
+			$blog_obj =& $blog_handler->get($blog_id);
62
+		} else {
63
+			if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed', $_POST['blog_feed']))) {
64
+				redirect_header('admin.blog.php', 2, planet_constant('AM_BLOGEXISTS'));
65
+			}
66
+			$blog_obj =& $blog_handler->create();
67
+			$blog_obj->setVar('blog_submitter', $xoopsUser->getVar('uid'));
68
+		}
69 69
 
70
-        $blog_obj->setVar('blog_title', $_POST['blog_title']);
71
-        $blog_obj->setVar('blog_desc', $_POST['blog_desc']);
72
-        $blog_obj->setVar('blog_image', $_POST['blog_image']);
73
-        $blog_obj->setVar('blog_feed', $_POST['blog_feed']);
74
-        $blog_obj->setVar('blog_link', $_POST['blog_link']);
75
-        $blog_obj->setVar('blog_language', $_POST['blog_language']);
76
-        $blog_obj->setVar('blog_charset', $_POST['blog_charset']);
77
-        $blog_obj->setVar('blog_trackback', $_POST['blog_trackback']);
78
-        $blog_obj->setVar('blog_status', $_POST['blog_status']);
70
+		$blog_obj->setVar('blog_title', $_POST['blog_title']);
71
+		$blog_obj->setVar('blog_desc', $_POST['blog_desc']);
72
+		$blog_obj->setVar('blog_image', $_POST['blog_image']);
73
+		$blog_obj->setVar('blog_feed', $_POST['blog_feed']);
74
+		$blog_obj->setVar('blog_link', $_POST['blog_link']);
75
+		$blog_obj->setVar('blog_language', $_POST['blog_language']);
76
+		$blog_obj->setVar('blog_charset', $_POST['blog_charset']);
77
+		$blog_obj->setVar('blog_trackback', $_POST['blog_trackback']);
78
+		$blog_obj->setVar('blog_status', $_POST['blog_status']);
79 79
 
80
-        if (!$blog_handler->insert($blog_obj)) {
81
-        } elseif (!empty($_POST['categories'])) {
82
-            $blog_id = $blog_obj->getVar('blog_id');
83
-            if (in_array(0, $_POST['categories'])) {
84
-                $_POST['categories'] = array();
85
-            }
86
-            $blog_handler->setCategories($blog_id, $_POST['categories']);
87
-        }
88
-        $message = planet_constant('AM_DBUPDATED');
89
-        redirect_header('admin.blog.php', 2, $message);
80
+		if (!$blog_handler->insert($blog_obj)) {
81
+		} elseif (!empty($_POST['categories'])) {
82
+			$blog_id = $blog_obj->getVar('blog_id');
83
+			if (in_array(0, $_POST['categories'])) {
84
+				$_POST['categories'] = array();
85
+			}
86
+			$blog_handler->setCategories($blog_id, $_POST['categories']);
87
+		}
88
+		$message = planet_constant('AM_DBUPDATED');
89
+		redirect_header('admin.blog.php', 2, $message);
90 90
 
91
-    /* fetch and add a list of blogs to a category */
92
-    case 'add':
93
-        $links =& planet_parseLinks($_POST['links']);
94
-        $blogs = array();
95
-        foreach ($links as $link) {
96
-            if ($blog_exist = $blog_handler->getCount(new Criteria('blog_feed', $link['url']))) {
97
-                continue;
98
-            }
99
-            $blog_obj =& $blog_handler->fetch($link['url']);
100
-            if (!empty($link['title'])) {
101
-                $blog_obj->setVar('blog_title', $link['title']);
102
-            }
103
-            $blog_handler->insert($blog_obj);
104
-            $blogs[] = $blog_obj->getVar('blog_id');
105
-            unset($blog_obj);
106
-        }
107
-        if (!empty($_POST['categories'])) {
108
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
109
-            foreach ($_POST['categories'] as $cat_id) {
110
-                $category_handler->addBlogs($cat_id, $blogs);
111
-            }
112
-        }
113
-        $message = planet_constant('AM_DBUPDATED');
114
-        redirect_header('admin.blog.php', 2, $message);
91
+	/* fetch and add a list of blogs to a category */
92
+	case 'add':
93
+		$links =& planet_parseLinks($_POST['links']);
94
+		$blogs = array();
95
+		foreach ($links as $link) {
96
+			if ($blog_exist = $blog_handler->getCount(new Criteria('blog_feed', $link['url']))) {
97
+				continue;
98
+			}
99
+			$blog_obj =& $blog_handler->fetch($link['url']);
100
+			if (!empty($link['title'])) {
101
+				$blog_obj->setVar('blog_title', $link['title']);
102
+			}
103
+			$blog_handler->insert($blog_obj);
104
+			$blogs[] = $blog_obj->getVar('blog_id');
105
+			unset($blog_obj);
106
+		}
107
+		if (!empty($_POST['categories'])) {
108
+			$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
109
+			foreach ($_POST['categories'] as $cat_id) {
110
+				$category_handler->addBlogs($cat_id, $blogs);
111
+			}
112
+		}
113
+		$message = planet_constant('AM_DBUPDATED');
114
+		redirect_header('admin.blog.php', 2, $message);
115 115
 
116
-    /* update a list of blogs */
117
-    case 'update':
118
-        foreach ($blog_id as $bid) {
119
-            $blog_obj =& $blog_handler->fetch($bid);
120
-            if (!$blog_handler->insert($blog_obj)) {
121
-            }
122
-            unset($blog_obj);
123
-        }
124
-        $message = planet_constant('AM_DBUPDATED');
125
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
116
+	/* update a list of blogs */
117
+	case 'update':
118
+		foreach ($blog_id as $bid) {
119
+			$blog_obj =& $blog_handler->fetch($bid);
120
+			if (!$blog_handler->insert($blog_obj)) {
121
+			}
122
+			unset($blog_obj);
123
+		}
124
+		$message = planet_constant('AM_DBUPDATED');
125
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
126 126
 
127
-    /* add a list of blogs to a category */
128
-    case 'register':
129
-        if (!empty($_POST['category_dest'])) {
130
-            if (!is_array($blog_id)) {
131
-                $blog_id = array($blog_id);
132
-            }
133
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
134
-            $category_handler->addBlogs($_POST['category_dest'], $blog_id);
135
-        }
136
-        $message = planet_constant('AM_DBUPDATED');
137
-        redirect_header('admin.blog.php?category=' . $_POST['category_dest'] . '&amp;start=' . $start, 2, $message);
127
+	/* add a list of blogs to a category */
128
+	case 'register':
129
+		if (!empty($_POST['category_dest'])) {
130
+			if (!is_array($blog_id)) {
131
+				$blog_id = array($blog_id);
132
+			}
133
+			$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
134
+			$category_handler->addBlogs($_POST['category_dest'], $blog_id);
135
+		}
136
+		$message = planet_constant('AM_DBUPDATED');
137
+		redirect_header('admin.blog.php?category=' . $_POST['category_dest'] . '&amp;start=' . $start, 2, $message);
138 138
 
139
-    /* remove a list of blogs from a category */
140
-    case 'remove':
141
-        if (!is_array($blog_id)) {
142
-            $blog_id = array($blog_id);
143
-        }
144
-        if (!empty($category_id)) {
145
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
146
-            $category_handler->removeBlogs($category_id, $blog_id);
147
-        }
148
-        $message = planet_constant('AM_DBUPDATED');
149
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
139
+	/* remove a list of blogs from a category */
140
+	case 'remove':
141
+		if (!is_array($blog_id)) {
142
+			$blog_id = array($blog_id);
143
+		}
144
+		if (!empty($category_id)) {
145
+			$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
146
+			$category_handler->removeBlogs($category_id, $blog_id);
147
+		}
148
+		$message = planet_constant('AM_DBUPDATED');
149
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
150 150
 
151
-    /* delete a single blog or a list blogs */
152
-    case 'del':
153
-        if (!is_array($blog_id)) {
154
-            $blog_id = array($blog_id);
155
-        }
156
-        foreach ($blog_id as $bid) {
157
-            $blog_obj =& $blog_handler->get($bid);
158
-            if (!$blog_handler->delete($blog_obj, true)) {
159
-            }
160
-            unset($blog_obj);
161
-        }
162
-        $message = planet_constant('AM_DBUPDATED');
163
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
151
+	/* delete a single blog or a list blogs */
152
+	case 'del':
153
+		if (!is_array($blog_id)) {
154
+			$blog_id = array($blog_id);
155
+		}
156
+		foreach ($blog_id as $bid) {
157
+			$blog_obj =& $blog_handler->get($bid);
158
+			if (!$blog_handler->delete($blog_obj, true)) {
159
+			}
160
+			unset($blog_obj);
161
+		}
162
+		$message = planet_constant('AM_DBUPDATED');
163
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
164 164
 
165
-    /* empty a single blog or a list blogs */
166
-    case 'empty':
167
-        if (!is_array($blog_id)) {
168
-            $blog_id = array($blog_id);
169
-        }
170
-        foreach ($blog_id as $bid) {
171
-            $blog_obj =& $blog_handler->get($bid);
172
-            if (!$blog_handler->do_empty($blog_obj)) {
173
-            }
174
-        }
175
-        $message = planet_constant('AM_DBUPDATED');
176
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
165
+	/* empty a single blog or a list blogs */
166
+	case 'empty':
167
+		if (!is_array($blog_id)) {
168
+			$blog_id = array($blog_id);
169
+		}
170
+		foreach ($blog_id as $bid) {
171
+			$blog_obj =& $blog_handler->get($bid);
172
+			if (!$blog_handler->do_empty($blog_obj)) {
173
+			}
174
+		}
175
+		$message = planet_constant('AM_DBUPDATED');
176
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
177 177
 
178
-    /* approve a single blog or a list blogs */
179
-    case 'approve':
180
-        if (!is_array($blog_id)) {
181
-            $blog_id = array($blog_id);
182
-        }
183
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
184
-        $blog_handler->updateAll('blog_status', 1, $criteria, true);
185
-        $message = planet_constant('AM_DBUPDATED');
186
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
178
+	/* approve a single blog or a list blogs */
179
+	case 'approve':
180
+		if (!is_array($blog_id)) {
181
+			$blog_id = array($blog_id);
182
+		}
183
+		$criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
184
+		$blog_handler->updateAll('blog_status', 1, $criteria, true);
185
+		$message = planet_constant('AM_DBUPDATED');
186
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
187 187
 
188
-    /* mark a single blog or a list blogs as featured */
189
-    case 'feature':
190
-        if (!is_array($blog_id)) {
191
-            $blog_id = array($blog_id);
192
-        }
193
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
194
-        $blog_handler->updateAll('blog_status', 2, $criteria, true);
195
-        $message = planet_constant('AM_DBUPDATED');
196
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
188
+	/* mark a single blog or a list blogs as featured */
189
+	case 'feature':
190
+		if (!is_array($blog_id)) {
191
+			$blog_id = array($blog_id);
192
+		}
193
+		$criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
194
+		$blog_handler->updateAll('blog_status', 2, $criteria, true);
195
+		$message = planet_constant('AM_DBUPDATED');
196
+		redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
197 197
 
198
-    /* edit a single blog */
199
-    case 'edit':
200
-        if (!empty($_POST['fetch'])) {
201
-            $blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
202
-            $blog_obj->setVar('blog_id', $blog_id);
203
-        } else {
204
-            $blog_obj =& $blog_handler->get($blog_id);
205
-        }
206
-        $categories = @$_POST['categories'];
207
-        if (empty($categories) && $blog_id > 0) {
208
-            $crit       = new Criteria('bc.blog_id', $blog_id);
209
-            $categories = array_keys($category_handler->getByBlog($crit));
210
-        }
211
-        if (empty($categories)) {
212
-            $categories = array(0 => _NONE);
213
-        }
198
+	/* edit a single blog */
199
+	case 'edit':
200
+		if (!empty($_POST['fetch'])) {
201
+			$blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
202
+			$blog_obj->setVar('blog_id', $blog_id);
203
+		} else {
204
+			$blog_obj =& $blog_handler->get($blog_id);
205
+		}
206
+		$categories = @$_POST['categories'];
207
+		if (empty($categories) && $blog_id > 0) {
208
+			$crit       = new Criteria('bc.blog_id', $blog_id);
209
+			$categories = array_keys($category_handler->getByBlog($crit));
210
+		}
211
+		if (empty($categories)) {
212
+			$categories = array(0 => _NONE);
213
+		}
214 214
 
215
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
216
-        echo '<br>';
217
-        if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
218
-            $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
219
-            $blogs_obj =& $blog_handler->getList($criteria);
220
-            if (count($blogs_obj) > 0) {
221
-                echo "<div class=\"errorMsg\">" . planet_constant('AM_BLOGEXISTS');
222
-                foreach (array_keys($blogs_obj) as $bid) {
223
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
224
-                         . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
225
-                }
226
-                echo '</div>';
227
-            }
228
-            unset($blogs_obj, $criteria);
229
-        }
230
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
231
-        echo '</fieldset>';
232
-        break;
215
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
216
+		echo '<br>';
217
+		if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
218
+			$criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
219
+			$blogs_obj =& $blog_handler->getList($criteria);
220
+			if (count($blogs_obj) > 0) {
221
+				echo "<div class=\"errorMsg\">" . planet_constant('AM_BLOGEXISTS');
222
+				foreach (array_keys($blogs_obj) as $bid) {
223
+					echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
224
+						 . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
225
+				}
226
+				echo '</div>';
227
+			}
228
+			unset($blogs_obj, $criteria);
229
+		}
230
+		include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
231
+		echo '</fieldset>';
232
+		break;
233 233
 
234
-    default:
234
+	default:
235 235
 
236
-        $crit = new Criteria('1', 1);
237
-        $crit->setSort('cat_order');
238
-        $crit->setOrder('ASC');
239
-        $categories = $category_handler->getList($crit);
236
+		$crit = new Criteria('1', 1);
237
+		$crit->setSort('cat_order');
238
+		$crit->setOrder('ASC');
239
+		$categories = $category_handler->getList($crit);
240 240
 
241
-        // Display category option form
242
-        $opform    = new XoopsSimpleForm('', 'opform', 'admin.blog.php', 'get');
243
-        $op_select = new XoopsFormSelect('', 'category', $category_id);
244
-        $op_select->setExtra('onchange="document.forms.opform.submit()"');
245
-        $options = array(
246
-            '0'  => _ALL,
247
-            '-1' => planet_constant('MD_ACTIVE'),
248
-            '-2' => planet_constant('MD_FEATURED'),
249
-            '-3' => planet_constant('MD_PENDING')
250
-        );
251
-        foreach (array_keys($categories) as $key) {
252
-            $options[$key] = $categories[$key];
253
-        }
254
-        $op_select->addOptionArray($options);
255
-        $opform->addElement($op_select);
256
-        $opform->display();
241
+		// Display category option form
242
+		$opform    = new XoopsSimpleForm('', 'opform', 'admin.blog.php', 'get');
243
+		$op_select = new XoopsFormSelect('', 'category', $category_id);
244
+		$op_select->setExtra('onchange="document.forms.opform.submit()"');
245
+		$options = array(
246
+			'0'  => _ALL,
247
+			'-1' => planet_constant('MD_ACTIVE'),
248
+			'-2' => planet_constant('MD_FEATURED'),
249
+			'-3' => planet_constant('MD_PENDING')
250
+		);
251
+		foreach (array_keys($categories) as $key) {
252
+			$options[$key] = $categories[$key];
253
+		}
254
+		$op_select->addOptionArray($options);
255
+		$opform->addElement($op_select);
256
+		$opform->display();
257 257
 
258
-        if ($category_id > 0) {
259
-            $criteria = new CriteriaCompo(new Criteria('b.blog_status', 0, '>'));
260
-            $criteria->add(new Criteria('bc.cat_id', $category_id));
261
-            $blog_count = $blog_handler->getCountByCategory($criteria);
262
-            $criteria->setStart($start);
263
-            $criteria->setLimit($xoopsModuleConfig['list_perpage']);
264
-            $blog_objs =& $blog_handler->getByCategory($criteria);
265
-        } else {
266
-            /* All active blogs */
267
-            if ($category_id == 0) {
268
-                $criteria = new Criteria('1', 1);
269
-                $criteria->setStart($start);
270
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
271
-                /* Active blogs */
272
-            } elseif ($category_id == -1) {
273
-                $criteria = new Criteria('blog_status', 1);
274
-                $criteria->setStart($start);
275
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
276
-                /* Featured blogs */
277
-            } elseif ($category_id == -2) {
278
-                $criteria = new Criteria('blog_status', 2);
279
-                $criteria->setStart($start);
280
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
281
-                /* Pending blogs */
282
-            } else {
283
-                $criteria = new Criteria('blog_status', 0);
284
-                $criteria->setStart($start);
285
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
286
-            }
287
-            $blog_count = $blog_handler->getCount($criteria);
288
-            $blog_objs  =& $blog_handler->getAll($criteria);
289
-        }
258
+		if ($category_id > 0) {
259
+			$criteria = new CriteriaCompo(new Criteria('b.blog_status', 0, '>'));
260
+			$criteria->add(new Criteria('bc.cat_id', $category_id));
261
+			$blog_count = $blog_handler->getCountByCategory($criteria);
262
+			$criteria->setStart($start);
263
+			$criteria->setLimit($xoopsModuleConfig['list_perpage']);
264
+			$blog_objs =& $blog_handler->getByCategory($criteria);
265
+		} else {
266
+			/* All active blogs */
267
+			if ($category_id == 0) {
268
+				$criteria = new Criteria('1', 1);
269
+				$criteria->setStart($start);
270
+				$criteria->setLimit($xoopsModuleConfig['list_perpage']);
271
+				/* Active blogs */
272
+			} elseif ($category_id == -1) {
273
+				$criteria = new Criteria('blog_status', 1);
274
+				$criteria->setStart($start);
275
+				$criteria->setLimit($xoopsModuleConfig['list_perpage']);
276
+				/* Featured blogs */
277
+			} elseif ($category_id == -2) {
278
+				$criteria = new Criteria('blog_status', 2);
279
+				$criteria->setStart($start);
280
+				$criteria->setLimit($xoopsModuleConfig['list_perpage']);
281
+				/* Pending blogs */
282
+			} else {
283
+				$criteria = new Criteria('blog_status', 0);
284
+				$criteria->setStart($start);
285
+				$criteria->setLimit($xoopsModuleConfig['list_perpage']);
286
+			}
287
+			$blog_count = $blog_handler->getCount($criteria);
288
+			$blog_objs  =& $blog_handler->getAll($criteria);
289
+		}
290 290
 
291
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
292
-        echo "<br style=\"clear:both\" />";
291
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
292
+		echo "<br style=\"clear:both\" />";
293 293
 
294
-        echo "<form name='list' id='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
295
-        echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
296
-        echo "<tr align='center'>";
297
-        echo "<th class='bg3' width='5%'><input name='blog_check' id='blog_check' value='1' type='checkbox'  onclick=\"xoopsCheckAll('list', 'blog_check');\" /></td>";
298
-        echo "<th class='bg3'>" . planet_constant('AM_TITLE') . '</td>';
299
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_STATUS') . '</td>';
300
-        echo "<th class='bg3' width='40%'>" . planet_constant('AM_FEED') . '</td>';
301
-        //        echo "<th class='bg3' width='5%'>" . _EDIT . "</td>";
302
-        //        echo "<th class='bg3' width='5%'>" . _DELETE . "</td>";
303
-        echo "<th class='bg3' width='10%'>" . planet_constant('AM_ACTIONS') . '</td>';
304
-        echo '</tr>';
294
+		echo "<form name='list' id='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
295
+		echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
296
+		echo "<tr align='center'>";
297
+		echo "<th class='bg3' width='5%'><input name='blog_check' id='blog_check' value='1' type='checkbox'  onclick=\"xoopsCheckAll('list', 'blog_check');\" /></td>";
298
+		echo "<th class='bg3'>" . planet_constant('AM_TITLE') . '</td>';
299
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_STATUS') . '</td>';
300
+		echo "<th class='bg3' width='40%'>" . planet_constant('AM_FEED') . '</td>';
301
+		//        echo "<th class='bg3' width='5%'>" . _EDIT . "</td>";
302
+		//        echo "<th class='bg3' width='5%'>" . _DELETE . "</td>";
303
+		echo "<th class='bg3' width='10%'>" . planet_constant('AM_ACTIONS') . '</td>';
304
+		echo '</tr>';
305 305
 
306
-        $status = array(
307
-            '0' => planet_constant('MD_PENDING'),
308
-            '1' => planet_constant('MD_ACTIVE'),
309
-            '2' => planet_constant('MD_FEATURED')
310
-        );
311
-        foreach (array_keys($blog_objs) as $bid) {
312
-            echo "<tr class='odd' align='left'>";
313
-            echo "<td align='center'><input name='blog[]' value='" . $bid . "' type='checkbox' /></td>";
314
-            echo "<td><a href='" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
315
-                 . $bid . "'>" . $blog_objs[$bid]->getVar('blog_title') . '</a></td>';
316
-            echo "<td align='center'>" . $status[$blog_objs[$bid]->getVar('blog_status')] . '</td>';
317
-            echo '<td>' . $blog_objs[$bid]->getVar('blog_feed') . '</td>';
318
-            echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=" . $bid . "' title='" . _EDIT
319
-                 . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . " title='" . _EDIT . " </a>
306
+		$status = array(
307
+			'0' => planet_constant('MD_PENDING'),
308
+			'1' => planet_constant('MD_ACTIVE'),
309
+			'2' => planet_constant('MD_FEATURED')
310
+		);
311
+		foreach (array_keys($blog_objs) as $bid) {
312
+			echo "<tr class='odd' align='left'>";
313
+			echo "<td align='center'><input name='blog[]' value='" . $bid . "' type='checkbox' /></td>";
314
+			echo "<td><a href='" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
315
+				 . $bid . "'>" . $blog_objs[$bid]->getVar('blog_title') . '</a></td>';
316
+			echo "<td align='center'>" . $status[$blog_objs[$bid]->getVar('blog_status')] . '</td>';
317
+			echo '<td>' . $blog_objs[$bid]->getVar('blog_feed') . '</td>';
318
+			echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=" . $bid . "' title='" . _EDIT
319
+				 . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . " title='" . _EDIT . " </a>
320 320
                       <a href='admin.blog.php?op=del&amp;blog=" . $bid . "' title='" . _DELETE . "'><img src='"
321
-                 . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . " title='" . _DELETE . " </a>&nbsp;
321
+				 . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . " title='" . _DELETE . " </a>&nbsp;
322 322
                       <a href='admin.blog.php?op=empty&amp;blog=" . $bid . "' title='"
323
-                 . planet_constant('MD_EMPTY_BLOG') . "'><img src='" . $pathIcon16 . "/empty.png '" . " alt='" . _EDIT
324
-                 . " title='" . planet_constant('MD_EMPTY_BLOG') . '</a></td>';
323
+				 . planet_constant('MD_EMPTY_BLOG') . "'><img src='" . $pathIcon16 . "/empty.png '" . " alt='" . _EDIT
324
+				 . " title='" . planet_constant('MD_EMPTY_BLOG') . '</a></td>';
325 325
 
326
-            echo '</tr>';
327
-        }
328
-        echo "<tr class='even' align='center'>";
329
-        echo "<td colspan='7'>";
330
-        echo "<select name='op' onChange='if (this.options[this.selectedIndex].value==\"register\") {setVisible(\"catdiv\");} else {setHidden(\"catdiv\");}'>";
331
-        echo "<option value=''>" . _SELECT . '</option>';
332
-        echo "<option value='del'>" . _DELETE . '</option>';
333
-        echo "<option value='empty'>" . planet_constant('MD_EMPTY_BLOG') . '</option>';
334
-        echo "<option value='register'>" . planet_constant('AM_REGISTER') . '</option>';
335
-        if ($category_id > 0) {
336
-            echo "<option value='remove'>" . planet_constant('AM_REMOVE') . '</option>';
337
-        }
338
-        echo "<option value='approve'>" . planet_constant('AM_APPROVE') . '</option>';
339
-        echo "<option value='feature'>" . planet_constant('AM_FEATURE') . '</option>';
340
-        echo "<option value='update'>" . planet_constant('AM_UPDATE') . '</option>';
341
-        echo '</select>';
342
-        echo "<div id='catdiv' style='visibility:hidden;display:inline;'>";
343
-        echo "<select name='category_dest'>";
344
-        echo "<option value=''>" . _SELECT . '</option>';
345
-        foreach ($categories as $cid => $name) {
346
-            echo "<option value='" . $cid . "'>" . $name . '</option>';
347
-        }
348
-        echo '</select>';
349
-        echo '</div>';
350
-        echo "<input name='start' value='" . $start . "' type='hidden' />";
351
-        echo "<input name='category' value='" . $category_id . "' type='hidden' />";
352
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit' />";
353
-        echo "<input name='' value='" . _CANCEL . "' type='reset' />";
354
-        echo '</td>';
355
-        echo '</tr>';
356
-        if ($blog_count > $xoopsModuleConfig['list_perpage']) {
357
-            include XOOPS_ROOT_PATH . '/class/pagenav.php';
358
-            $nav     = new XoopsPageNav($blog_count, $xoopsModuleConfig['list_perpage'], $start, 'start',
359
-                                        'category=' . $category_id);
360
-            $pagenav = $nav->renderNav(4);
361
-            echo "<tr align='right'><td colspan='6'>" . $pagenav . '</td></tr>';
362
-        }
363
-        echo '</table></form>';
364
-        echo "</fieldset><br style='clear:both;'>";
326
+			echo '</tr>';
327
+		}
328
+		echo "<tr class='even' align='center'>";
329
+		echo "<td colspan='7'>";
330
+		echo "<select name='op' onChange='if (this.options[this.selectedIndex].value==\"register\") {setVisible(\"catdiv\");} else {setHidden(\"catdiv\");}'>";
331
+		echo "<option value=''>" . _SELECT . '</option>';
332
+		echo "<option value='del'>" . _DELETE . '</option>';
333
+		echo "<option value='empty'>" . planet_constant('MD_EMPTY_BLOG') . '</option>';
334
+		echo "<option value='register'>" . planet_constant('AM_REGISTER') . '</option>';
335
+		if ($category_id > 0) {
336
+			echo "<option value='remove'>" . planet_constant('AM_REMOVE') . '</option>';
337
+		}
338
+		echo "<option value='approve'>" . planet_constant('AM_APPROVE') . '</option>';
339
+		echo "<option value='feature'>" . planet_constant('AM_FEATURE') . '</option>';
340
+		echo "<option value='update'>" . planet_constant('AM_UPDATE') . '</option>';
341
+		echo '</select>';
342
+		echo "<div id='catdiv' style='visibility:hidden;display:inline;'>";
343
+		echo "<select name='category_dest'>";
344
+		echo "<option value=''>" . _SELECT . '</option>';
345
+		foreach ($categories as $cid => $name) {
346
+			echo "<option value='" . $cid . "'>" . $name . '</option>';
347
+		}
348
+		echo '</select>';
349
+		echo '</div>';
350
+		echo "<input name='start' value='" . $start . "' type='hidden' />";
351
+		echo "<input name='category' value='" . $category_id . "' type='hidden' />";
352
+		echo "<input name='submit' value='" . _SUBMIT . "' type='submit' />";
353
+		echo "<input name='' value='" . _CANCEL . "' type='reset' />";
354
+		echo '</td>';
355
+		echo '</tr>';
356
+		if ($blog_count > $xoopsModuleConfig['list_perpage']) {
357
+			include XOOPS_ROOT_PATH . '/class/pagenav.php';
358
+			$nav     = new XoopsPageNav($blog_count, $xoopsModuleConfig['list_perpage'], $start, 'start',
359
+										'category=' . $category_id);
360
+			$pagenav = $nav->renderNav(4);
361
+			echo "<tr align='right'><td colspan='6'>" . $pagenav . '</td></tr>';
362
+		}
363
+		echo '</table></form>';
364
+		echo "</fieldset><br style='clear:both;'>";
365 365
 
366
-        if (empty($start) && empty($category_id)) {
367
-            $form = new XoopsThemeForm(_ADD, 'edit', xoops_getenv('PHP_SELF'));
368
-            $form->addElement(new XoopsFormText(planet_constant('AM_FEED'), 'blog_feed', 50, 255), true);
369
-            $form->addElement(new XoopsFormHidden('op', 'edit'));
370
-            $button_tray = new XoopsFormElementTray('', '');
371
-            $butt_save   = new XoopsFormButton('', 'fetch', _SUBMIT, 'submit');
372
-            $button_tray->addElement($butt_save);
373
-            $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
374
-            $button_tray->addElement($butt_cancel);
375
-            $form->addElement($button_tray);
366
+		if (empty($start) && empty($category_id)) {
367
+			$form = new XoopsThemeForm(_ADD, 'edit', xoops_getenv('PHP_SELF'));
368
+			$form->addElement(new XoopsFormText(planet_constant('AM_FEED'), 'blog_feed', 50, 255), true);
369
+			$form->addElement(new XoopsFormHidden('op', 'edit'));
370
+			$button_tray = new XoopsFormElementTray('', '');
371
+			$butt_save   = new XoopsFormButton('', 'fetch', _SUBMIT, 'submit');
372
+			$button_tray->addElement($butt_save);
373
+			$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
374
+			$button_tray->addElement($butt_cancel);
375
+			$form->addElement($button_tray);
376 376
 
377
-            $form_add = new XoopsThemeForm(_ADD, 'add', xoops_getenv('PHP_SELF'));
378
-            $form_add->addElement(new XoopsFormTextArea(planet_constant('AM_FEED'), 'links'));
379
-            $form_add->addElement(new XoopsFormHidden('op', 'add'));
380
-            $button_tray = new XoopsFormElementTray('', '');
381
-            $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
382
-            $button_tray->addElement($butt_save);
383
-            $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
384
-            $button_tray->addElement($butt_cancel);
385
-            $form_add->addElement($button_tray);
377
+			$form_add = new XoopsThemeForm(_ADD, 'add', xoops_getenv('PHP_SELF'));
378
+			$form_add->addElement(new XoopsFormTextArea(planet_constant('AM_FEED'), 'links'));
379
+			$form_add->addElement(new XoopsFormHidden('op', 'add'));
380
+			$button_tray = new XoopsFormElementTray('', '');
381
+			$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
382
+			$button_tray->addElement($butt_save);
383
+			$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
384
+			$button_tray->addElement($butt_cancel);
385
+			$form_add->addElement($button_tray);
386 386
 
387
-            echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
388
-            echo '<br>';
389
-            $form->display();
390
-            $form_add->display();
391
-            echo '</fieldset>';
392
-        }
393
-        break;
387
+			echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
388
+			echo '<br>';
389
+			$form->display();
390
+			$form_add->display();
391
+			echo '</fieldset>';
392
+		}
393
+		break;
394 394
 }
395 395
 
396 396
 xoops_cp_footer();
Please login to merge, or discard this patch.
Switch Indentation   +310 added lines, -310 removed lines patch added patch discarded remove patch
@@ -55,342 +55,342 @@
 block discarded – undo
55 55
 
56 56
 switch ($op) {
57 57
     /* save a single blog */
58
-    case 'save':
58
+    	case 'save':
59 59
 
60
-        if ($blog_id) {
61
-            $blog_obj =& $blog_handler->get($blog_id);
62
-        } else {
63
-            if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed', $_POST['blog_feed']))) {
64
-                redirect_header('admin.blog.php', 2, planet_constant('AM_BLOGEXISTS'));
65
-            }
66
-            $blog_obj =& $blog_handler->create();
67
-            $blog_obj->setVar('blog_submitter', $xoopsUser->getVar('uid'));
68
-        }
60
+        	if ($blog_id) {
61
+            	$blog_obj =& $blog_handler->get($blog_id);
62
+        	} else {
63
+            	if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed', $_POST['blog_feed']))) {
64
+                	redirect_header('admin.blog.php', 2, planet_constant('AM_BLOGEXISTS'));
65
+            	}
66
+            	$blog_obj =& $blog_handler->create();
67
+            	$blog_obj->setVar('blog_submitter', $xoopsUser->getVar('uid'));
68
+        	}
69 69
 
70
-        $blog_obj->setVar('blog_title', $_POST['blog_title']);
71
-        $blog_obj->setVar('blog_desc', $_POST['blog_desc']);
72
-        $blog_obj->setVar('blog_image', $_POST['blog_image']);
73
-        $blog_obj->setVar('blog_feed', $_POST['blog_feed']);
74
-        $blog_obj->setVar('blog_link', $_POST['blog_link']);
75
-        $blog_obj->setVar('blog_language', $_POST['blog_language']);
76
-        $blog_obj->setVar('blog_charset', $_POST['blog_charset']);
77
-        $blog_obj->setVar('blog_trackback', $_POST['blog_trackback']);
78
-        $blog_obj->setVar('blog_status', $_POST['blog_status']);
70
+        	$blog_obj->setVar('blog_title', $_POST['blog_title']);
71
+        	$blog_obj->setVar('blog_desc', $_POST['blog_desc']);
72
+        	$blog_obj->setVar('blog_image', $_POST['blog_image']);
73
+        	$blog_obj->setVar('blog_feed', $_POST['blog_feed']);
74
+        	$blog_obj->setVar('blog_link', $_POST['blog_link']);
75
+        	$blog_obj->setVar('blog_language', $_POST['blog_language']);
76
+        	$blog_obj->setVar('blog_charset', $_POST['blog_charset']);
77
+        	$blog_obj->setVar('blog_trackback', $_POST['blog_trackback']);
78
+        	$blog_obj->setVar('blog_status', $_POST['blog_status']);
79 79
 
80
-        if (!$blog_handler->insert($blog_obj)) {
81
-        } elseif (!empty($_POST['categories'])) {
82
-            $blog_id = $blog_obj->getVar('blog_id');
83
-            if (in_array(0, $_POST['categories'])) {
84
-                $_POST['categories'] = array();
85
-            }
86
-            $blog_handler->setCategories($blog_id, $_POST['categories']);
87
-        }
88
-        $message = planet_constant('AM_DBUPDATED');
89
-        redirect_header('admin.blog.php', 2, $message);
80
+        	if (!$blog_handler->insert($blog_obj)) {
81
+        	} elseif (!empty($_POST['categories'])) {
82
+            	$blog_id = $blog_obj->getVar('blog_id');
83
+            	if (in_array(0, $_POST['categories'])) {
84
+                	$_POST['categories'] = array();
85
+            	}
86
+            	$blog_handler->setCategories($blog_id, $_POST['categories']);
87
+        	}
88
+        	$message = planet_constant('AM_DBUPDATED');
89
+        	redirect_header('admin.blog.php', 2, $message);
90 90
 
91
-    /* fetch and add a list of blogs to a category */
92
-    case 'add':
93
-        $links =& planet_parseLinks($_POST['links']);
94
-        $blogs = array();
95
-        foreach ($links as $link) {
96
-            if ($blog_exist = $blog_handler->getCount(new Criteria('blog_feed', $link['url']))) {
97
-                continue;
98
-            }
99
-            $blog_obj =& $blog_handler->fetch($link['url']);
100
-            if (!empty($link['title'])) {
101
-                $blog_obj->setVar('blog_title', $link['title']);
102
-            }
103
-            $blog_handler->insert($blog_obj);
104
-            $blogs[] = $blog_obj->getVar('blog_id');
105
-            unset($blog_obj);
106
-        }
107
-        if (!empty($_POST['categories'])) {
108
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
109
-            foreach ($_POST['categories'] as $cat_id) {
110
-                $category_handler->addBlogs($cat_id, $blogs);
111
-            }
112
-        }
113
-        $message = planet_constant('AM_DBUPDATED');
114
-        redirect_header('admin.blog.php', 2, $message);
91
+    	/* fetch and add a list of blogs to a category */
92
+    	case 'add':
93
+        	$links =& planet_parseLinks($_POST['links']);
94
+        	$blogs = array();
95
+        	foreach ($links as $link) {
96
+            	if ($blog_exist = $blog_handler->getCount(new Criteria('blog_feed', $link['url']))) {
97
+                	continue;
98
+            	}
99
+            	$blog_obj =& $blog_handler->fetch($link['url']);
100
+            	if (!empty($link['title'])) {
101
+                	$blog_obj->setVar('blog_title', $link['title']);
102
+            	}
103
+            	$blog_handler->insert($blog_obj);
104
+            	$blogs[] = $blog_obj->getVar('blog_id');
105
+            	unset($blog_obj);
106
+        	}
107
+        	if (!empty($_POST['categories'])) {
108
+            	$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
109
+            	foreach ($_POST['categories'] as $cat_id) {
110
+                	$category_handler->addBlogs($cat_id, $blogs);
111
+            	}
112
+        	}
113
+        	$message = planet_constant('AM_DBUPDATED');
114
+        	redirect_header('admin.blog.php', 2, $message);
115 115
 
116
-    /* update a list of blogs */
117
-    case 'update':
118
-        foreach ($blog_id as $bid) {
119
-            $blog_obj =& $blog_handler->fetch($bid);
120
-            if (!$blog_handler->insert($blog_obj)) {
121
-            }
122
-            unset($blog_obj);
123
-        }
124
-        $message = planet_constant('AM_DBUPDATED');
125
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
116
+    	/* update a list of blogs */
117
+    	case 'update':
118
+        	foreach ($blog_id as $bid) {
119
+            	$blog_obj =& $blog_handler->fetch($bid);
120
+            	if (!$blog_handler->insert($blog_obj)) {
121
+            	}
122
+            	unset($blog_obj);
123
+        	}
124
+        	$message = planet_constant('AM_DBUPDATED');
125
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
126 126
 
127
-    /* add a list of blogs to a category */
128
-    case 'register':
129
-        if (!empty($_POST['category_dest'])) {
130
-            if (!is_array($blog_id)) {
131
-                $blog_id = array($blog_id);
132
-            }
133
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
134
-            $category_handler->addBlogs($_POST['category_dest'], $blog_id);
135
-        }
136
-        $message = planet_constant('AM_DBUPDATED');
137
-        redirect_header('admin.blog.php?category=' . $_POST['category_dest'] . '&amp;start=' . $start, 2, $message);
127
+    	/* add a list of blogs to a category */
128
+    	case 'register':
129
+        	if (!empty($_POST['category_dest'])) {
130
+            	if (!is_array($blog_id)) {
131
+                	$blog_id = array($blog_id);
132
+            	}
133
+            	$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
134
+            	$category_handler->addBlogs($_POST['category_dest'], $blog_id);
135
+        	}
136
+        	$message = planet_constant('AM_DBUPDATED');
137
+        	redirect_header('admin.blog.php?category=' . $_POST['category_dest'] . '&amp;start=' . $start, 2, $message);
138 138
 
139
-    /* remove a list of blogs from a category */
140
-    case 'remove':
141
-        if (!is_array($blog_id)) {
142
-            $blog_id = array($blog_id);
143
-        }
144
-        if (!empty($category_id)) {
145
-            $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
146
-            $category_handler->removeBlogs($category_id, $blog_id);
147
-        }
148
-        $message = planet_constant('AM_DBUPDATED');
149
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
139
+    	/* remove a list of blogs from a category */
140
+    	case 'remove':
141
+        	if (!is_array($blog_id)) {
142
+            	$blog_id = array($blog_id);
143
+        	}
144
+        	if (!empty($category_id)) {
145
+            	$category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
146
+            	$category_handler->removeBlogs($category_id, $blog_id);
147
+        	}
148
+        	$message = planet_constant('AM_DBUPDATED');
149
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
150 150
 
151
-    /* delete a single blog or a list blogs */
152
-    case 'del':
153
-        if (!is_array($blog_id)) {
154
-            $blog_id = array($blog_id);
155
-        }
156
-        foreach ($blog_id as $bid) {
157
-            $blog_obj =& $blog_handler->get($bid);
158
-            if (!$blog_handler->delete($blog_obj, true)) {
159
-            }
160
-            unset($blog_obj);
161
-        }
162
-        $message = planet_constant('AM_DBUPDATED');
163
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
151
+    	/* delete a single blog or a list blogs */
152
+    	case 'del':
153
+        	if (!is_array($blog_id)) {
154
+            	$blog_id = array($blog_id);
155
+        	}
156
+        	foreach ($blog_id as $bid) {
157
+            	$blog_obj =& $blog_handler->get($bid);
158
+            	if (!$blog_handler->delete($blog_obj, true)) {
159
+            	}
160
+            	unset($blog_obj);
161
+        	}
162
+        	$message = planet_constant('AM_DBUPDATED');
163
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
164 164
 
165
-    /* empty a single blog or a list blogs */
166
-    case 'empty':
167
-        if (!is_array($blog_id)) {
168
-            $blog_id = array($blog_id);
169
-        }
170
-        foreach ($blog_id as $bid) {
171
-            $blog_obj =& $blog_handler->get($bid);
172
-            if (!$blog_handler->do_empty($blog_obj)) {
173
-            }
174
-        }
175
-        $message = planet_constant('AM_DBUPDATED');
176
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
165
+    	/* empty a single blog or a list blogs */
166
+    	case 'empty':
167
+        	if (!is_array($blog_id)) {
168
+            	$blog_id = array($blog_id);
169
+        	}
170
+        	foreach ($blog_id as $bid) {
171
+            	$blog_obj =& $blog_handler->get($bid);
172
+            	if (!$blog_handler->do_empty($blog_obj)) {
173
+            	}
174
+        	}
175
+        	$message = planet_constant('AM_DBUPDATED');
176
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
177 177
 
178
-    /* approve a single blog or a list blogs */
179
-    case 'approve':
180
-        if (!is_array($blog_id)) {
181
-            $blog_id = array($blog_id);
182
-        }
183
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
184
-        $blog_handler->updateAll('blog_status', 1, $criteria, true);
185
-        $message = planet_constant('AM_DBUPDATED');
186
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
178
+    	/* approve a single blog or a list blogs */
179
+    	case 'approve':
180
+        	if (!is_array($blog_id)) {
181
+            	$blog_id = array($blog_id);
182
+        	}
183
+        	$criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
184
+        	$blog_handler->updateAll('blog_status', 1, $criteria, true);
185
+        	$message = planet_constant('AM_DBUPDATED');
186
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
187 187
 
188
-    /* mark a single blog or a list blogs as featured */
189
-    case 'feature':
190
-        if (!is_array($blog_id)) {
191
-            $blog_id = array($blog_id);
192
-        }
193
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
194
-        $blog_handler->updateAll('blog_status', 2, $criteria, true);
195
-        $message = planet_constant('AM_DBUPDATED');
196
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
188
+    	/* mark a single blog or a list blogs as featured */
189
+    	case 'feature':
190
+        	if (!is_array($blog_id)) {
191
+            	$blog_id = array($blog_id);
192
+        	}
193
+        	$criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
194
+        	$blog_handler->updateAll('blog_status', 2, $criteria, true);
195
+        	$message = planet_constant('AM_DBUPDATED');
196
+        	redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
197 197
 
198
-    /* edit a single blog */
199
-    case 'edit':
200
-        if (!empty($_POST['fetch'])) {
201
-            $blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
202
-            $blog_obj->setVar('blog_id', $blog_id);
203
-        } else {
204
-            $blog_obj =& $blog_handler->get($blog_id);
205
-        }
206
-        $categories = @$_POST['categories'];
207
-        if (empty($categories) && $blog_id > 0) {
208
-            $crit       = new Criteria('bc.blog_id', $blog_id);
209
-            $categories = array_keys($category_handler->getByBlog($crit));
210
-        }
211
-        if (empty($categories)) {
212
-            $categories = array(0 => _NONE);
213
-        }
198
+    	/* edit a single blog */
199
+    	case 'edit':
200
+        	if (!empty($_POST['fetch'])) {
201
+            	$blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
202
+            	$blog_obj->setVar('blog_id', $blog_id);
203
+        	} else {
204
+            	$blog_obj =& $blog_handler->get($blog_id);
205
+        	}
206
+        	$categories = @$_POST['categories'];
207
+        	if (empty($categories) && $blog_id > 0) {
208
+            	$crit       = new Criteria('bc.blog_id', $blog_id);
209
+            	$categories = array_keys($category_handler->getByBlog($crit));
210
+        	}
211
+        	if (empty($categories)) {
212
+            	$categories = array(0 => _NONE);
213
+        	}
214 214
 
215
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
216
-        echo '<br>';
217
-        if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
218
-            $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
219
-            $blogs_obj =& $blog_handler->getList($criteria);
220
-            if (count($blogs_obj) > 0) {
221
-                echo "<div class=\"errorMsg\">" . planet_constant('AM_BLOGEXISTS');
222
-                foreach (array_keys($blogs_obj) as $bid) {
223
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
224
-                         . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
225
-                }
226
-                echo '</div>';
227
-            }
228
-            unset($blogs_obj, $criteria);
229
-        }
230
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
231
-        echo '</fieldset>';
232
-        break;
215
+        	echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
216
+        	echo '<br>';
217
+        	if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
218
+            	$criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
219
+            	$blogs_obj =& $blog_handler->getList($criteria);
220
+            	if (count($blogs_obj) > 0) {
221
+                	echo "<div class=\"errorMsg\">" . planet_constant('AM_BLOGEXISTS');
222
+                	foreach (array_keys($blogs_obj) as $bid) {
223
+                    	echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
224
+                         	. URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
225
+                	}
226
+                	echo '</div>';
227
+            	}
228
+            	unset($blogs_obj, $criteria);
229
+        	}
230
+        	include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
231
+        	echo '</fieldset>';
232
+        	break;
233 233
 
234
-    default:
234
+    	default:
235 235
 
236
-        $crit = new Criteria('1', 1);
237
-        $crit->setSort('cat_order');
238
-        $crit->setOrder('ASC');
239
-        $categories = $category_handler->getList($crit);
236
+        	$crit = new Criteria('1', 1);
237
+        	$crit->setSort('cat_order');
238
+        	$crit->setOrder('ASC');
239
+        	$categories = $category_handler->getList($crit);
240 240
 
241
-        // Display category option form
242
-        $opform    = new XoopsSimpleForm('', 'opform', 'admin.blog.php', 'get');
243
-        $op_select = new XoopsFormSelect('', 'category', $category_id);
244
-        $op_select->setExtra('onchange="document.forms.opform.submit()"');
245
-        $options = array(
246
-            '0'  => _ALL,
247
-            '-1' => planet_constant('MD_ACTIVE'),
248
-            '-2' => planet_constant('MD_FEATURED'),
249
-            '-3' => planet_constant('MD_PENDING')
250
-        );
251
-        foreach (array_keys($categories) as $key) {
252
-            $options[$key] = $categories[$key];
253
-        }
254
-        $op_select->addOptionArray($options);
255
-        $opform->addElement($op_select);
256
-        $opform->display();
241
+        	// Display category option form
242
+        	$opform    = new XoopsSimpleForm('', 'opform', 'admin.blog.php', 'get');
243
+        	$op_select = new XoopsFormSelect('', 'category', $category_id);
244
+        	$op_select->setExtra('onchange="document.forms.opform.submit()"');
245
+        	$options = array(
246
+            	'0'  => _ALL,
247
+            	'-1' => planet_constant('MD_ACTIVE'),
248
+            	'-2' => planet_constant('MD_FEATURED'),
249
+            	'-3' => planet_constant('MD_PENDING')
250
+        	);
251
+        	foreach (array_keys($categories) as $key) {
252
+            	$options[$key] = $categories[$key];
253
+        	}
254
+        	$op_select->addOptionArray($options);
255
+        	$opform->addElement($op_select);
256
+        	$opform->display();
257 257
 
258
-        if ($category_id > 0) {
259
-            $criteria = new CriteriaCompo(new Criteria('b.blog_status', 0, '>'));
260
-            $criteria->add(new Criteria('bc.cat_id', $category_id));
261
-            $blog_count = $blog_handler->getCountByCategory($criteria);
262
-            $criteria->setStart($start);
263
-            $criteria->setLimit($xoopsModuleConfig['list_perpage']);
264
-            $blog_objs =& $blog_handler->getByCategory($criteria);
265
-        } else {
266
-            /* All active blogs */
267
-            if ($category_id == 0) {
268
-                $criteria = new Criteria('1', 1);
269
-                $criteria->setStart($start);
270
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
271
-                /* Active blogs */
272
-            } elseif ($category_id == -1) {
273
-                $criteria = new Criteria('blog_status', 1);
274
-                $criteria->setStart($start);
275
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
276
-                /* Featured blogs */
277
-            } elseif ($category_id == -2) {
278
-                $criteria = new Criteria('blog_status', 2);
279
-                $criteria->setStart($start);
280
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
281
-                /* Pending blogs */
282
-            } else {
283
-                $criteria = new Criteria('blog_status', 0);
284
-                $criteria->setStart($start);
285
-                $criteria->setLimit($xoopsModuleConfig['list_perpage']);
286
-            }
287
-            $blog_count = $blog_handler->getCount($criteria);
288
-            $blog_objs  =& $blog_handler->getAll($criteria);
289
-        }
258
+        	if ($category_id > 0) {
259
+            	$criteria = new CriteriaCompo(new Criteria('b.blog_status', 0, '>'));
260
+            	$criteria->add(new Criteria('bc.cat_id', $category_id));
261
+            	$blog_count = $blog_handler->getCountByCategory($criteria);
262
+            	$criteria->setStart($start);
263
+            	$criteria->setLimit($xoopsModuleConfig['list_perpage']);
264
+            	$blog_objs =& $blog_handler->getByCategory($criteria);
265
+        	} else {
266
+            	/* All active blogs */
267
+            	if ($category_id == 0) {
268
+                	$criteria = new Criteria('1', 1);
269
+                	$criteria->setStart($start);
270
+                	$criteria->setLimit($xoopsModuleConfig['list_perpage']);
271
+                	/* Active blogs */
272
+            	} elseif ($category_id == -1) {
273
+                	$criteria = new Criteria('blog_status', 1);
274
+                	$criteria->setStart($start);
275
+                	$criteria->setLimit($xoopsModuleConfig['list_perpage']);
276
+                	/* Featured blogs */
277
+            	} elseif ($category_id == -2) {
278
+                	$criteria = new Criteria('blog_status', 2);
279
+                	$criteria->setStart($start);
280
+                	$criteria->setLimit($xoopsModuleConfig['list_perpage']);
281
+                	/* Pending blogs */
282
+            	} else {
283
+                	$criteria = new Criteria('blog_status', 0);
284
+                	$criteria->setStart($start);
285
+                	$criteria->setLimit($xoopsModuleConfig['list_perpage']);
286
+            	}
287
+            	$blog_count = $blog_handler->getCount($criteria);
288
+            	$blog_objs  =& $blog_handler->getAll($criteria);
289
+        	}
290 290
 
291
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
292
-        echo "<br style=\"clear:both\" />";
291
+        	echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
292
+        	echo "<br style=\"clear:both\" />";
293 293
 
294
-        echo "<form name='list' id='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
295
-        echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
296
-        echo "<tr align='center'>";
297
-        echo "<th class='bg3' width='5%'><input name='blog_check' id='blog_check' value='1' type='checkbox'  onclick=\"xoopsCheckAll('list', 'blog_check');\" /></td>";
298
-        echo "<th class='bg3'>" . planet_constant('AM_TITLE') . '</td>';
299
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_STATUS') . '</td>';
300
-        echo "<th class='bg3' width='40%'>" . planet_constant('AM_FEED') . '</td>';
301
-        //        echo "<th class='bg3' width='5%'>" . _EDIT . "</td>";
302
-        //        echo "<th class='bg3' width='5%'>" . _DELETE . "</td>";
303
-        echo "<th class='bg3' width='10%'>" . planet_constant('AM_ACTIONS') . '</td>';
304
-        echo '</tr>';
294
+        	echo "<form name='list' id='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
295
+        	echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
296
+        	echo "<tr align='center'>";
297
+        	echo "<th class='bg3' width='5%'><input name='blog_check' id='blog_check' value='1' type='checkbox'  onclick=\"xoopsCheckAll('list', 'blog_check');\" /></td>";
298
+        	echo "<th class='bg3'>" . planet_constant('AM_TITLE') . '</td>';
299
+        	echo "<th class='bg3' width='5%'>" . planet_constant('AM_STATUS') . '</td>';
300
+        	echo "<th class='bg3' width='40%'>" . planet_constant('AM_FEED') . '</td>';
301
+        	//        echo "<th class='bg3' width='5%'>" . _EDIT . "</td>";
302
+        	//        echo "<th class='bg3' width='5%'>" . _DELETE . "</td>";
303
+        	echo "<th class='bg3' width='10%'>" . planet_constant('AM_ACTIONS') . '</td>';
304
+        	echo '</tr>';
305 305
 
306
-        $status = array(
307
-            '0' => planet_constant('MD_PENDING'),
308
-            '1' => planet_constant('MD_ACTIVE'),
309
-            '2' => planet_constant('MD_FEATURED')
310
-        );
311
-        foreach (array_keys($blog_objs) as $bid) {
312
-            echo "<tr class='odd' align='left'>";
313
-            echo "<td align='center'><input name='blog[]' value='" . $bid . "' type='checkbox' /></td>";
314
-            echo "<td><a href='" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
315
-                 . $bid . "'>" . $blog_objs[$bid]->getVar('blog_title') . '</a></td>';
316
-            echo "<td align='center'>" . $status[$blog_objs[$bid]->getVar('blog_status')] . '</td>';
317
-            echo '<td>' . $blog_objs[$bid]->getVar('blog_feed') . '</td>';
318
-            echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=" . $bid . "' title='" . _EDIT
319
-                 . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . " title='" . _EDIT . " </a>
306
+        	$status = array(
307
+            	'0' => planet_constant('MD_PENDING'),
308
+            	'1' => planet_constant('MD_ACTIVE'),
309
+            	'2' => planet_constant('MD_FEATURED')
310
+        	);
311
+        	foreach (array_keys($blog_objs) as $bid) {
312
+            	echo "<tr class='odd' align='left'>";
313
+            	echo "<td align='center'><input name='blog[]' value='" . $bid . "' type='checkbox' /></td>";
314
+            	echo "<td><a href='" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
315
+                 	. $bid . "'>" . $blog_objs[$bid]->getVar('blog_title') . '</a></td>';
316
+            	echo "<td align='center'>" . $status[$blog_objs[$bid]->getVar('blog_status')] . '</td>';
317
+            	echo '<td>' . $blog_objs[$bid]->getVar('blog_feed') . '</td>';
318
+            	echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=" . $bid . "' title='" . _EDIT
319
+                 	. "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . " title='" . _EDIT . " </a>
320 320
                       <a href='admin.blog.php?op=del&amp;blog=" . $bid . "' title='" . _DELETE . "'><img src='"
321
-                 . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . " title='" . _DELETE . " </a>&nbsp;
321
+                 	. $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . " title='" . _DELETE . " </a>&nbsp;
322 322
                       <a href='admin.blog.php?op=empty&amp;blog=" . $bid . "' title='"
323
-                 . planet_constant('MD_EMPTY_BLOG') . "'><img src='" . $pathIcon16 . "/empty.png '" . " alt='" . _EDIT
324
-                 . " title='" . planet_constant('MD_EMPTY_BLOG') . '</a></td>';
323
+                 	. planet_constant('MD_EMPTY_BLOG') . "'><img src='" . $pathIcon16 . "/empty.png '" . " alt='" . _EDIT
324
+                 	. " title='" . planet_constant('MD_EMPTY_BLOG') . '</a></td>';
325 325
 
326
-            echo '</tr>';
327
-        }
328
-        echo "<tr class='even' align='center'>";
329
-        echo "<td colspan='7'>";
330
-        echo "<select name='op' onChange='if (this.options[this.selectedIndex].value==\"register\") {setVisible(\"catdiv\");} else {setHidden(\"catdiv\");}'>";
331
-        echo "<option value=''>" . _SELECT . '</option>';
332
-        echo "<option value='del'>" . _DELETE . '</option>';
333
-        echo "<option value='empty'>" . planet_constant('MD_EMPTY_BLOG') . '</option>';
334
-        echo "<option value='register'>" . planet_constant('AM_REGISTER') . '</option>';
335
-        if ($category_id > 0) {
336
-            echo "<option value='remove'>" . planet_constant('AM_REMOVE') . '</option>';
337
-        }
338
-        echo "<option value='approve'>" . planet_constant('AM_APPROVE') . '</option>';
339
-        echo "<option value='feature'>" . planet_constant('AM_FEATURE') . '</option>';
340
-        echo "<option value='update'>" . planet_constant('AM_UPDATE') . '</option>';
341
-        echo '</select>';
342
-        echo "<div id='catdiv' style='visibility:hidden;display:inline;'>";
343
-        echo "<select name='category_dest'>";
344
-        echo "<option value=''>" . _SELECT . '</option>';
345
-        foreach ($categories as $cid => $name) {
346
-            echo "<option value='" . $cid . "'>" . $name . '</option>';
347
-        }
348
-        echo '</select>';
349
-        echo '</div>';
350
-        echo "<input name='start' value='" . $start . "' type='hidden' />";
351
-        echo "<input name='category' value='" . $category_id . "' type='hidden' />";
352
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit' />";
353
-        echo "<input name='' value='" . _CANCEL . "' type='reset' />";
354
-        echo '</td>';
355
-        echo '</tr>';
356
-        if ($blog_count > $xoopsModuleConfig['list_perpage']) {
357
-            include XOOPS_ROOT_PATH . '/class/pagenav.php';
358
-            $nav     = new XoopsPageNav($blog_count, $xoopsModuleConfig['list_perpage'], $start, 'start',
359
-                                        'category=' . $category_id);
360
-            $pagenav = $nav->renderNav(4);
361
-            echo "<tr align='right'><td colspan='6'>" . $pagenav . '</td></tr>';
362
-        }
363
-        echo '</table></form>';
364
-        echo "</fieldset><br style='clear:both;'>";
326
+            	echo '</tr>';
327
+        	}
328
+        	echo "<tr class='even' align='center'>";
329
+        	echo "<td colspan='7'>";
330
+        	echo "<select name='op' onChange='if (this.options[this.selectedIndex].value==\"register\") {setVisible(\"catdiv\");} else {setHidden(\"catdiv\");}'>";
331
+        	echo "<option value=''>" . _SELECT . '</option>';
332
+        	echo "<option value='del'>" . _DELETE . '</option>';
333
+        	echo "<option value='empty'>" . planet_constant('MD_EMPTY_BLOG') . '</option>';
334
+        	echo "<option value='register'>" . planet_constant('AM_REGISTER') . '</option>';
335
+        	if ($category_id > 0) {
336
+            	echo "<option value='remove'>" . planet_constant('AM_REMOVE') . '</option>';
337
+        	}
338
+        	echo "<option value='approve'>" . planet_constant('AM_APPROVE') . '</option>';
339
+        	echo "<option value='feature'>" . planet_constant('AM_FEATURE') . '</option>';
340
+        	echo "<option value='update'>" . planet_constant('AM_UPDATE') . '</option>';
341
+        	echo '</select>';
342
+        	echo "<div id='catdiv' style='visibility:hidden;display:inline;'>";
343
+        	echo "<select name='category_dest'>";
344
+        	echo "<option value=''>" . _SELECT . '</option>';
345
+        	foreach ($categories as $cid => $name) {
346
+            	echo "<option value='" . $cid . "'>" . $name . '</option>';
347
+        	}
348
+        	echo '</select>';
349
+        	echo '</div>';
350
+        	echo "<input name='start' value='" . $start . "' type='hidden' />";
351
+        	echo "<input name='category' value='" . $category_id . "' type='hidden' />";
352
+        	echo "<input name='submit' value='" . _SUBMIT . "' type='submit' />";
353
+        	echo "<input name='' value='" . _CANCEL . "' type='reset' />";
354
+        	echo '</td>';
355
+        	echo '</tr>';
356
+        	if ($blog_count > $xoopsModuleConfig['list_perpage']) {
357
+            	include XOOPS_ROOT_PATH . '/class/pagenav.php';
358
+            	$nav     = new XoopsPageNav($blog_count, $xoopsModuleConfig['list_perpage'], $start, 'start',
359
+                                        	'category=' . $category_id);
360
+            	$pagenav = $nav->renderNav(4);
361
+            	echo "<tr align='right'><td colspan='6'>" . $pagenav . '</td></tr>';
362
+        	}
363
+        	echo '</table></form>';
364
+        	echo "</fieldset><br style='clear:both;'>";
365 365
 
366
-        if (empty($start) && empty($category_id)) {
367
-            $form = new XoopsThemeForm(_ADD, 'edit', xoops_getenv('PHP_SELF'));
368
-            $form->addElement(new XoopsFormText(planet_constant('AM_FEED'), 'blog_feed', 50, 255), true);
369
-            $form->addElement(new XoopsFormHidden('op', 'edit'));
370
-            $button_tray = new XoopsFormElementTray('', '');
371
-            $butt_save   = new XoopsFormButton('', 'fetch', _SUBMIT, 'submit');
372
-            $button_tray->addElement($butt_save);
373
-            $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
374
-            $button_tray->addElement($butt_cancel);
375
-            $form->addElement($button_tray);
366
+        	if (empty($start) && empty($category_id)) {
367
+            	$form = new XoopsThemeForm(_ADD, 'edit', xoops_getenv('PHP_SELF'));
368
+            	$form->addElement(new XoopsFormText(planet_constant('AM_FEED'), 'blog_feed', 50, 255), true);
369
+            	$form->addElement(new XoopsFormHidden('op', 'edit'));
370
+            	$button_tray = new XoopsFormElementTray('', '');
371
+            	$butt_save   = new XoopsFormButton('', 'fetch', _SUBMIT, 'submit');
372
+            	$button_tray->addElement($butt_save);
373
+            	$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
374
+            	$button_tray->addElement($butt_cancel);
375
+            	$form->addElement($button_tray);
376 376
 
377
-            $form_add = new XoopsThemeForm(_ADD, 'add', xoops_getenv('PHP_SELF'));
378
-            $form_add->addElement(new XoopsFormTextArea(planet_constant('AM_FEED'), 'links'));
379
-            $form_add->addElement(new XoopsFormHidden('op', 'add'));
380
-            $button_tray = new XoopsFormElementTray('', '');
381
-            $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
382
-            $button_tray->addElement($butt_save);
383
-            $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
384
-            $button_tray->addElement($butt_cancel);
385
-            $form_add->addElement($button_tray);
377
+            	$form_add = new XoopsThemeForm(_ADD, 'add', xoops_getenv('PHP_SELF'));
378
+            	$form_add->addElement(new XoopsFormTextArea(planet_constant('AM_FEED'), 'links'));
379
+            	$form_add->addElement(new XoopsFormHidden('op', 'add'));
380
+            	$button_tray = new XoopsFormElementTray('', '');
381
+            	$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
382
+            	$button_tray->addElement($butt_save);
383
+            	$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
384
+            	$button_tray->addElement($butt_cancel);
385
+            	$form_add->addElement($button_tray);
386 386
 
387
-            echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
388
-            echo '<br>';
389
-            $form->display();
390
-            $form_add->display();
391
-            echo '</fieldset>';
392
-        }
393
-        break;
387
+            	echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
388
+            	echo '<br>';
389
+            	$form->display();
390
+            	$form_add->display();
391
+            	echo '</fieldset>';
392
+        	}
393
+        	break;
394 394
 }
395 395
 
396 396
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 // URL: http://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include_once __DIR__ . '/admin_header.php';
28
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
27
+include_once __DIR__.'/admin_header.php';
28
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
29 29
 
30 30
 xoops_cp_header();
31 31
 $indexAdmin = new ModuleAdmin();
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
  * This is a tricky fix for incomplete solution of module cone
38 38
  * it is expected to have a better solution in article 1.0
39 39
  */
40
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
40
+require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
41 41
 //planet_adminmenu(2);
42 42
 
43 43
 $op          = !empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
44 44
 $blog_id     = !empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
45
-$blog_id     = is_array($blog_id) ? array_map('intval', $blog_id) : (int)$blog_id;
46
-$category_id = (int)(!empty($_POST['category']) ? $_POST['category'] : (!empty($_GET['category']) ? $_GET['category'] : 0));
47
-$start       = (int)(!empty($_POST['start']) ? $_POST['start'] : (!empty($_GET['start']) ? $_GET['start'] : 0));
45
+$blog_id     = is_array($blog_id) ? array_map('intval', $blog_id) : (int) $blog_id;
46
+$category_id = (int) (!empty($_POST['category']) ? $_POST['category'] : (!empty($_GET['category']) ? $_GET['category'] : 0));
47
+$start       = (int) (!empty($_POST['start']) ? $_POST['start'] : (!empty($_GET['start']) ? $_GET['start'] : 0));
48 48
 
49 49
 $blog_handler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
50 50
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
     case 'save':
59 59
 
60 60
         if ($blog_id) {
61
-            $blog_obj =& $blog_handler->get($blog_id);
62
-        } else {
61
+            $blog_obj = & $blog_handler->get($blog_id);
62
+        }else {
63 63
             if ($blog_exists = $blog_handler->getCount(new Criteria('blog_feed', $_POST['blog_feed']))) {
64 64
                 redirect_header('admin.blog.php', 2, planet_constant('AM_BLOGEXISTS'));
65 65
             }
66
-            $blog_obj =& $blog_handler->create();
66
+            $blog_obj = & $blog_handler->create();
67 67
             $blog_obj->setVar('blog_submitter', $xoopsUser->getVar('uid'));
68 68
         }
69 69
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 
91 91
     /* fetch and add a list of blogs to a category */
92 92
     case 'add':
93
-        $links =& planet_parseLinks($_POST['links']);
93
+        $links = & planet_parseLinks($_POST['links']);
94 94
         $blogs = array();
95 95
         foreach ($links as $link) {
96 96
             if ($blog_exist = $blog_handler->getCount(new Criteria('blog_feed', $link['url']))) {
97 97
                 continue;
98 98
             }
99
-            $blog_obj =& $blog_handler->fetch($link['url']);
99
+            $blog_obj = & $blog_handler->fetch($link['url']);
100 100
             if (!empty($link['title'])) {
101 101
                 $blog_obj->setVar('blog_title', $link['title']);
102 102
             }
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
     /* update a list of blogs */
117 117
     case 'update':
118 118
         foreach ($blog_id as $bid) {
119
-            $blog_obj =& $blog_handler->fetch($bid);
119
+            $blog_obj = & $blog_handler->fetch($bid);
120 120
             if (!$blog_handler->insert($blog_obj)) {
121 121
             }
122 122
             unset($blog_obj);
123 123
         }
124 124
         $message = planet_constant('AM_DBUPDATED');
125
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
125
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
126 126
 
127 127
     /* add a list of blogs to a category */
128 128
     case 'register':
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $category_handler->addBlogs($_POST['category_dest'], $blog_id);
135 135
         }
136 136
         $message = planet_constant('AM_DBUPDATED');
137
-        redirect_header('admin.blog.php?category=' . $_POST['category_dest'] . '&amp;start=' . $start, 2, $message);
137
+        redirect_header('admin.blog.php?category='.$_POST['category_dest'].'&amp;start='.$start, 2, $message);
138 138
 
139 139
     /* remove a list of blogs from a category */
140 140
     case 'remove':
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $category_handler->removeBlogs($category_id, $blog_id);
147 147
         }
148 148
         $message = planet_constant('AM_DBUPDATED');
149
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
149
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
150 150
 
151 151
     /* delete a single blog or a list blogs */
152 152
     case 'del':
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
             $blog_id = array($blog_id);
155 155
         }
156 156
         foreach ($blog_id as $bid) {
157
-            $blog_obj =& $blog_handler->get($bid);
157
+            $blog_obj = & $blog_handler->get($bid);
158 158
             if (!$blog_handler->delete($blog_obj, true)) {
159 159
             }
160 160
             unset($blog_obj);
161 161
         }
162 162
         $message = planet_constant('AM_DBUPDATED');
163
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
163
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
164 164
 
165 165
     /* empty a single blog or a list blogs */
166 166
     case 'empty':
@@ -168,43 +168,43 @@  discard block
 block discarded – undo
168 168
             $blog_id = array($blog_id);
169 169
         }
170 170
         foreach ($blog_id as $bid) {
171
-            $blog_obj =& $blog_handler->get($bid);
171
+            $blog_obj = & $blog_handler->get($bid);
172 172
             if (!$blog_handler->do_empty($blog_obj)) {
173 173
             }
174 174
         }
175 175
         $message = planet_constant('AM_DBUPDATED');
176
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
176
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
177 177
 
178 178
     /* approve a single blog or a list blogs */
179 179
     case 'approve':
180 180
         if (!is_array($blog_id)) {
181 181
             $blog_id = array($blog_id);
182 182
         }
183
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
183
+        $criteria = new Criteria('blog_id', '('.implode(',', $blog_id).')', 'IN');
184 184
         $blog_handler->updateAll('blog_status', 1, $criteria, true);
185 185
         $message = planet_constant('AM_DBUPDATED');
186
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
186
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
187 187
 
188 188
     /* mark a single blog or a list blogs as featured */
189 189
     case 'feature':
190 190
         if (!is_array($blog_id)) {
191 191
             $blog_id = array($blog_id);
192 192
         }
193
-        $criteria = new Criteria('blog_id', '(' . implode(',', $blog_id) . ')', 'IN');
193
+        $criteria = new Criteria('blog_id', '('.implode(',', $blog_id).')', 'IN');
194 194
         $blog_handler->updateAll('blog_status', 2, $criteria, true);
195 195
         $message = planet_constant('AM_DBUPDATED');
196
-        redirect_header('admin.blog.php?category=' . $category_id . '&amp;start=' . $start, 2, $message);
196
+        redirect_header('admin.blog.php?category='.$category_id.'&amp;start='.$start, 2, $message);
197 197
 
198 198
     /* edit a single blog */
199 199
     case 'edit':
200 200
         if (!empty($_POST['fetch'])) {
201
-            $blog_obj =& $blog_handler->fetch($_POST['blog_feed']);
201
+            $blog_obj = & $blog_handler->fetch($_POST['blog_feed']);
202 202
             $blog_obj->setVar('blog_id', $blog_id);
203
-        } else {
204
-            $blog_obj =& $blog_handler->get($blog_id);
203
+        }else {
204
+            $blog_obj = & $blog_handler->get($blog_id);
205 205
         }
206 206
         $categories = @$_POST['categories'];
207
-        if (empty($categories) && $blog_id > 0) {
207
+        if (empty($categories) && $blog_id>0) {
208 208
             $crit       = new Criteria('bc.blog_id', $blog_id);
209 209
             $categories = array_keys($category_handler->getByBlog($crit));
210 210
         }
@@ -212,22 +212,22 @@  discard block
 block discarded – undo
212 212
             $categories = array(0 => _NONE);
213 213
         }
214 214
 
215
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
215
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
216 216
         echo '<br>';
217 217
         if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
218 218
             $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
219
-            $blogs_obj =& $blog_handler->getList($criteria);
220
-            if (count($blogs_obj) > 0) {
221
-                echo "<div class=\"errorMsg\">" . planet_constant('AM_BLOGEXISTS');
219
+            $blogs_obj = & $blog_handler->getList($criteria);
220
+            if (count($blogs_obj)>0) {
221
+                echo "<div class=\"errorMsg\">".planet_constant('AM_BLOGEXISTS');
222 222
                 foreach (array_keys($blogs_obj) as $bid) {
223
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php'
224
-                         . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
223
+                    echo "<br><a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'
224
+                         . URL_DELIMITER.'b'.$bid."\" target=\"_blank\">".$blogs_obj[$bid].'</a>';
225 225
                 }
226 226
                 echo '</div>';
227 227
             }
228 228
             unset($blogs_obj, $criteria);
229 229
         }
230
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
230
+        include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/form.blog.php';
231 231
         echo '</fieldset>';
232 232
         break;
233 233
 
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
         $opform->addElement($op_select);
256 256
         $opform->display();
257 257
 
258
-        if ($category_id > 0) {
258
+        if ($category_id>0) {
259 259
             $criteria = new CriteriaCompo(new Criteria('b.blog_status', 0, '>'));
260 260
             $criteria->add(new Criteria('bc.cat_id', $category_id));
261 261
             $blog_count = $blog_handler->getCountByCategory($criteria);
262 262
             $criteria->setStart($start);
263 263
             $criteria->setLimit($xoopsModuleConfig['list_perpage']);
264
-            $blog_objs =& $blog_handler->getByCategory($criteria);
265
-        } else {
264
+            $blog_objs = & $blog_handler->getByCategory($criteria);
265
+        }else {
266 266
             /* All active blogs */
267 267
             if ($category_id == 0) {
268 268
                 $criteria = new Criteria('1', 1);
@@ -279,28 +279,28 @@  discard block
 block discarded – undo
279 279
                 $criteria->setStart($start);
280 280
                 $criteria->setLimit($xoopsModuleConfig['list_perpage']);
281 281
                 /* Pending blogs */
282
-            } else {
282
+            }else {
283 283
                 $criteria = new Criteria('blog_status', 0);
284 284
                 $criteria->setStart($start);
285 285
                 $criteria->setLimit($xoopsModuleConfig['list_perpage']);
286 286
             }
287 287
             $blog_count = $blog_handler->getCount($criteria);
288
-            $blog_objs  =& $blog_handler->getAll($criteria);
288
+            $blog_objs  = & $blog_handler->getAll($criteria);
289 289
         }
290 290
 
291
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
291
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_LIST').'</legend>';
292 292
         echo "<br style=\"clear:both\" />";
293 293
 
294
-        echo "<form name='list' id='list' method='post' action='" . xoops_getenv('PHP_SELF') . "'>";
294
+        echo "<form name='list' id='list' method='post' action='".xoops_getenv('PHP_SELF')."'>";
295 295
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
296 296
         echo "<tr align='center'>";
297 297
         echo "<th class='bg3' width='5%'><input name='blog_check' id='blog_check' value='1' type='checkbox'  onclick=\"xoopsCheckAll('list', 'blog_check');\" /></td>";
298
-        echo "<th class='bg3'>" . planet_constant('AM_TITLE') . '</td>';
299
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_STATUS') . '</td>';
300
-        echo "<th class='bg3' width='40%'>" . planet_constant('AM_FEED') . '</td>';
298
+        echo "<th class='bg3'>".planet_constant('AM_TITLE').'</td>';
299
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_STATUS').'</td>';
300
+        echo "<th class='bg3' width='40%'>".planet_constant('AM_FEED').'</td>';
301 301
         //        echo "<th class='bg3' width='5%'>" . _EDIT . "</td>";
302 302
         //        echo "<th class='bg3' width='5%'>" . _DELETE . "</td>";
303
-        echo "<th class='bg3' width='10%'>" . planet_constant('AM_ACTIONS') . '</td>';
303
+        echo "<th class='bg3' width='10%'>".planet_constant('AM_ACTIONS').'</td>';
304 304
         echo '</tr>';
305 305
 
306 306
         $status = array(
@@ -310,55 +310,55 @@  discard block
 block discarded – undo
310 310
         );
311 311
         foreach (array_keys($blog_objs) as $bid) {
312 312
             echo "<tr class='odd' align='left'>";
313
-            echo "<td align='center'><input name='blog[]' value='" . $bid . "' type='checkbox' /></td>";
314
-            echo "<td><a href='" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
315
-                 . $bid . "'>" . $blog_objs[$bid]->getVar('blog_title') . '</a></td>';
316
-            echo "<td align='center'>" . $status[$blog_objs[$bid]->getVar('blog_status')] . '</td>';
317
-            echo '<td>' . $blog_objs[$bid]->getVar('blog_feed') . '</td>';
318
-            echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=" . $bid . "' title='" . _EDIT
319
-                 . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . " title='" . _EDIT . " </a>
320
-                      <a href='admin.blog.php?op=del&amp;blog=" . $bid . "' title='" . _DELETE . "'><img src='"
321
-                 . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . " title='" . _DELETE . " </a>&nbsp;
322
-                      <a href='admin.blog.php?op=empty&amp;blog=" . $bid . "' title='"
323
-                 . planet_constant('MD_EMPTY_BLOG') . "'><img src='" . $pathIcon16 . "/empty.png '" . " alt='" . _EDIT
324
-                 . " title='" . planet_constant('MD_EMPTY_BLOG') . '</a></td>';
313
+            echo "<td align='center'><input name='blog[]' value='".$bid."' type='checkbox' /></td>";
314
+            echo "<td><a href='".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'
315
+                 . $bid."'>".$blog_objs[$bid]->getVar('blog_title').'</a></td>';
316
+            echo "<td align='center'>".$status[$blog_objs[$bid]->getVar('blog_status')].'</td>';
317
+            echo '<td>'.$blog_objs[$bid]->getVar('blog_feed').'</td>';
318
+            echo "<td align='center'><a href='admin.blog.php?op=edit&amp;blog=".$bid."' title='"._EDIT
319
+                 . "'><img src='".$pathIcon16."/edit.png '"."alt='"._EDIT." title='"._EDIT." </a>
320
+                      <a href='admin.blog.php?op=del&amp;blog=" . $bid."' title='"._DELETE."'><img src='"
321
+                 . $pathIcon16."/delete.png '"." alt='"._EDIT." title='"._DELETE." </a>&nbsp;
322
+                      <a href='admin.blog.php?op=empty&amp;blog=" . $bid."' title='"
323
+                 . planet_constant('MD_EMPTY_BLOG')."'><img src='".$pathIcon16."/empty.png '"." alt='"._EDIT
324
+                 . " title='".planet_constant('MD_EMPTY_BLOG').'</a></td>';
325 325
 
326 326
             echo '</tr>';
327 327
         }
328 328
         echo "<tr class='even' align='center'>";
329 329
         echo "<td colspan='7'>";
330 330
         echo "<select name='op' onChange='if (this.options[this.selectedIndex].value==\"register\") {setVisible(\"catdiv\");} else {setHidden(\"catdiv\");}'>";
331
-        echo "<option value=''>" . _SELECT . '</option>';
332
-        echo "<option value='del'>" . _DELETE . '</option>';
333
-        echo "<option value='empty'>" . planet_constant('MD_EMPTY_BLOG') . '</option>';
334
-        echo "<option value='register'>" . planet_constant('AM_REGISTER') . '</option>';
335
-        if ($category_id > 0) {
336
-            echo "<option value='remove'>" . planet_constant('AM_REMOVE') . '</option>';
331
+        echo "<option value=''>"._SELECT.'</option>';
332
+        echo "<option value='del'>"._DELETE.'</option>';
333
+        echo "<option value='empty'>".planet_constant('MD_EMPTY_BLOG').'</option>';
334
+        echo "<option value='register'>".planet_constant('AM_REGISTER').'</option>';
335
+        if ($category_id>0) {
336
+            echo "<option value='remove'>".planet_constant('AM_REMOVE').'</option>';
337 337
         }
338
-        echo "<option value='approve'>" . planet_constant('AM_APPROVE') . '</option>';
339
-        echo "<option value='feature'>" . planet_constant('AM_FEATURE') . '</option>';
340
-        echo "<option value='update'>" . planet_constant('AM_UPDATE') . '</option>';
338
+        echo "<option value='approve'>".planet_constant('AM_APPROVE').'</option>';
339
+        echo "<option value='feature'>".planet_constant('AM_FEATURE').'</option>';
340
+        echo "<option value='update'>".planet_constant('AM_UPDATE').'</option>';
341 341
         echo '</select>';
342 342
         echo "<div id='catdiv' style='visibility:hidden;display:inline;'>";
343 343
         echo "<select name='category_dest'>";
344
-        echo "<option value=''>" . _SELECT . '</option>';
344
+        echo "<option value=''>"._SELECT.'</option>';
345 345
         foreach ($categories as $cid => $name) {
346
-            echo "<option value='" . $cid . "'>" . $name . '</option>';
346
+            echo "<option value='".$cid."'>".$name.'</option>';
347 347
         }
348 348
         echo '</select>';
349 349
         echo '</div>';
350
-        echo "<input name='start' value='" . $start . "' type='hidden' />";
351
-        echo "<input name='category' value='" . $category_id . "' type='hidden' />";
352
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit' />";
353
-        echo "<input name='' value='" . _CANCEL . "' type='reset' />";
350
+        echo "<input name='start' value='".$start."' type='hidden' />";
351
+        echo "<input name='category' value='".$category_id."' type='hidden' />";
352
+        echo "<input name='submit' value='"._SUBMIT."' type='submit' />";
353
+        echo "<input name='' value='"._CANCEL."' type='reset' />";
354 354
         echo '</td>';
355 355
         echo '</tr>';
356
-        if ($blog_count > $xoopsModuleConfig['list_perpage']) {
357
-            include XOOPS_ROOT_PATH . '/class/pagenav.php';
356
+        if ($blog_count>$xoopsModuleConfig['list_perpage']) {
357
+            include XOOPS_ROOT_PATH.'/class/pagenav.php';
358 358
             $nav     = new XoopsPageNav($blog_count, $xoopsModuleConfig['list_perpage'], $start, 'start',
359
-                                        'category=' . $category_id);
359
+                                        'category='.$category_id);
360 360
             $pagenav = $nav->renderNav(4);
361
-            echo "<tr align='right'><td colspan='6'>" . $pagenav . '</td></tr>';
361
+            echo "<tr align='right'><td colspan='6'>".$pagenav.'</td></tr>';
362 362
         }
363 363
         echo '</table></form>';
364 364
         echo "</fieldset><br style='clear:both;'>";
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             $button_tray->addElement($butt_cancel);
385 385
             $form_add->addElement($button_tray);
386 386
 
387
-            echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
387
+            echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._ADD.'</legend>';
388 388
             echo '<br>';
389 389
             $form->display();
390 390
             $form_add->display();
Please login to merge, or discard this patch.