Completed
Push — master ( 96da4e...7c5656 )
by Michael
04:52
created
index.php 1 patch
Indentation   +164 added lines, -164 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 = PlanetUtility::planetParseArguments($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 */
@@ -51,20 +51,20 @@  discard block
 block discarded – undo
51 51
 
52 52
 // restore $_SERVER['REQUEST_URI']
53 53
 if (!empty($REQUEST_URI_parsed)) {
54
-    $args_REQUEST_URI = array();
55
-    $_args            = array('start', 'sort', 'uid', 'list');
56
-    foreach ($_args as $arg) {
57
-        if (!empty(${$arg})) {
58
-            $args_REQUEST_URI[] = $arg . '=' . ${$arg};
59
-        }
60
-    }
61
-    if (!empty($blog_id)) {
62
-        $args_REQUEST_URI[] = 'blog=' . $blog_id;
63
-    }
64
-    if (!empty($category_id)) {
65
-        $args_REQUEST_URI[] = 'category=' . $category_id;
66
-    }
67
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI));
54
+	$args_REQUEST_URI = array();
55
+	$_args            = array('start', 'sort', 'uid', 'list');
56
+	foreach ($_args as $arg) {
57
+		if (!empty(${$arg})) {
58
+			$args_REQUEST_URI[] = $arg . '=' . ${$arg};
59
+		}
60
+	}
61
+	if (!empty($blog_id)) {
62
+		$args_REQUEST_URI[] = 'blog=' . $blog_id;
63
+	}
64
+	if (!empty($category_id)) {
65
+		$args_REQUEST_URI[] = 'category=' . $category_id;
66
+	}
67
+	$_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI));
68 68
 }
69 69
 
70 70
 $GLOBALS['xoopsOption']['template_main'] = PlanetUtility::planetGetTemplate('index');
@@ -89,73 +89,73 @@  discard block
 block discarded – undo
89 89
 $article_prefix = '';
90 90
 /* Specific category */
91 91
 if ($category_id > 0) {
92
-    $category_obj = $categoryHandler->get($category_id);
93
-    $criteria->add(new Criteria('bc.cat_id', $category_id));
94
-    $uid            = 0;
95
-    $blog_id        = 0;
96
-    $category_data  = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
97
-    $query_type     = 'category';
98
-    $article_prefix = 'a.';
92
+	$category_obj = $categoryHandler->get($category_id);
93
+	$criteria->add(new Criteria('bc.cat_id', $category_id));
94
+	$uid            = 0;
95
+	$blog_id        = 0;
96
+	$category_data  = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
97
+	$query_type     = 'category';
98
+	$article_prefix = 'a.';
99 99
 }
100 100
 /* Specific blog */
101 101
 if ($blog_id > 0) {
102
-    $blog_obj = $blogHandler->get($blog_id);
103
-    if ($blog_obj->getVar('blog_status')
104
-        || (is_object($xoopsUser)
105
-            && $xoopsUser->getVar('uid') == $blog_obj->getVar('blog_submitter'))) {
106
-        $criteria->add(new Criteria('blog_id', $blog_id));
107
-        $category_id     = 0;
108
-        $uid             = 0;
109
-        $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
110
-        $blog_data       = array(
111
-            'id'    => $blog_id,
112
-            'title' => $blog_obj->getVar('blog_title'),
113
-            'image' => $blog_obj->getImage(),
114
-            'title' => $blog_obj->getVar('blog_title'),
115
-            'feed'  => $blog_obj->getVar('blog_feed'),
116
-            'link'  => $blog_obj->getVar('blog_link'),
117
-            'desc'  => $blog_obj->getVar('blog_desc'),
118
-            'time'  => $blog_obj->getTime(),
119
-            'star'  => $blog_obj->getStar(),
120
-            'rates' => $blog_obj->getVar('blog_rates'),
121
-            'marks' => $blog_obj->getVar('blog_marks')
122
-        );
123
-    }
124
-    $query_type     = 'blog';
125
-    $article_prefix = '';
102
+	$blog_obj = $blogHandler->get($blog_id);
103
+	if ($blog_obj->getVar('blog_status')
104
+		|| (is_object($xoopsUser)
105
+			&& $xoopsUser->getVar('uid') == $blog_obj->getVar('blog_submitter'))) {
106
+		$criteria->add(new Criteria('blog_id', $blog_id));
107
+		$category_id     = 0;
108
+		$uid             = 0;
109
+		$bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
110
+		$blog_data       = array(
111
+			'id'    => $blog_id,
112
+			'title' => $blog_obj->getVar('blog_title'),
113
+			'image' => $blog_obj->getImage(),
114
+			'title' => $blog_obj->getVar('blog_title'),
115
+			'feed'  => $blog_obj->getVar('blog_feed'),
116
+			'link'  => $blog_obj->getVar('blog_link'),
117
+			'desc'  => $blog_obj->getVar('blog_desc'),
118
+			'time'  => $blog_obj->getTime(),
119
+			'star'  => $blog_obj->getStar(),
120
+			'rates' => $blog_obj->getVar('blog_rates'),
121
+			'marks' => $blog_obj->getVar('blog_marks')
122
+		);
123
+	}
124
+	$query_type     = 'blog';
125
+	$article_prefix = '';
126 126
 }
127 127
 /* User bookmarks(favorites) */
128 128
 if ($uid > 0) {
129
-    $criteria->add(new Criteria('bm.bm_uid', $uid));
130
-    $category_id     = 0;
131
-    $blog_id         = 0;
132
-    $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
133
-    $user_data       = array(
134
-        'uid'   => $uid,
135
-        'name'  => XoopsUser::getUnameFromId($uid),
136
-        'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid))
137
-    );
138
-    $query_type      = 'bookmark';
139
-    $article_prefix  = 'a.';
129
+	$criteria->add(new Criteria('bm.bm_uid', $uid));
130
+	$category_id     = 0;
131
+	$blog_id         = 0;
132
+	$bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
133
+	$user_data       = array(
134
+		'uid'   => $uid,
135
+		'name'  => XoopsUser::getUnameFromId($uid),
136
+		'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid))
137
+	);
138
+	$query_type      = 'bookmark';
139
+	$article_prefix  = 'a.';
140 140
 }
141 141
 
142 142
 /* Sort */
143 143
 $order = 'DESC';
144 144
 $sort  = empty($sort) ? 'time' : $sort;
145 145
 switch ($sort) {
146
-    case 'views':
147
-        $sortby = $article_prefix . 'art_views';
148
-        break;
149
-    case 'rating':
150
-        $sortby = $article_prefix . 'art_rating';
151
-        break;
152
-    case 'time':
153
-        $sortby = $article_prefix . 'art_time';
154
-        break;
155
-    case 'default':
156
-    default:
157
-        $sortby = '';
158
-        break;
146
+	case 'views':
147
+		$sortby = $article_prefix . 'art_views';
148
+		break;
149
+	case 'rating':
150
+		$sortby = $article_prefix . 'art_rating';
151
+		break;
152
+	case 'time':
153
+		$sortby = $article_prefix . 'art_time';
154
+		break;
155
+	case 'default':
156
+	default:
157
+		$sortby = '';
158
+		break;
159 159
 }
160 160
 $criteria->setSort($sortby);
161 161
 $criteria->setOrder($order);
@@ -163,120 +163,120 @@  discard block
 block discarded – undo
163 163
 $criteria->setLimit($limit);
164 164
 
165 165
 $tags = empty($list) ? '' : array(
166
-    $article_prefix . 'art_title',
167
-    $article_prefix . 'blog_id',
168
-    $article_prefix . 'art_time'
166
+	$article_prefix . 'art_title',
167
+	$article_prefix . 'blog_id',
168
+	$article_prefix . 'art_time'
169 169
 );
170 170
 switch ($query_type) {
171
-    case 'category':
172
-        $articles_obj  = $articleHandler->getByCategory($criteria, $tags);
173
-        $count_article = $articleHandler->getCountByCategory($criteria);
174
-        break;
175
-    case 'bookmark':
176
-        $articles_obj  = $articleHandler->getByBookmark($criteria, $tags);
177
-        $count_article = $articleHandler->getCountByBookmark($criteria);
178
-        break;
179
-    default:
180
-        $articles_obj  = $articleHandler->getAll($criteria, $tags);
181
-        $count_article = $articleHandler->getCount($criteria);
182
-        break;
171
+	case 'category':
172
+		$articles_obj  = $articleHandler->getByCategory($criteria, $tags);
173
+		$count_article = $articleHandler->getCountByCategory($criteria);
174
+		break;
175
+	case 'bookmark':
176
+		$articles_obj  = $articleHandler->getByBookmark($criteria, $tags);
177
+		$count_article = $articleHandler->getCountByBookmark($criteria);
178
+		break;
179
+	default:
180
+		$articles_obj  = $articleHandler->getAll($criteria, $tags);
181
+		$count_article = $articleHandler->getCount($criteria);
182
+		break;
183 183
 }
184 184
 
185 185
 if (!empty($blog_data)) {
186
-    $blogs[$blog_data['id']] = $blog_data['title'];
186
+	$blogs[$blog_data['id']] = $blog_data['title'];
187 187
 } else {
188
-    $blog_array = array();
189
-    foreach (array_keys($articles_obj) as $id) {
190
-        $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1;
191
-    }
192
-    $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
193
-    $blogs         = $blogHandler->getList($criteria_blog);
188
+	$blog_array = array();
189
+	foreach (array_keys($articles_obj) as $id) {
190
+		$blog_array[$articles_obj[$id]->getVar('blog_id')] = 1;
191
+	}
192
+	$criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
193
+	$blogs         = $blogHandler->getList($criteria_blog);
194 194
 }
195 195
 
196 196
 /* Objects to array */
197 197
 $articles = array();
198 198
 foreach (array_keys($articles_obj) as $id) {
199
-    $_article = array(
200
-        'id'    => $id,
201
-        'title' => $articles_obj[$id]->getVar('art_title'),
202
-        'time'  => $articles_obj[$id]->getTime(),
203
-        'blog'  => array(
204
-            'id'    => $articles_obj[$id]->getVar('blog_id'),
205
-            'title' => $blogs[$articles_obj[$id]->getVar('blog_id')]
206
-        )
207
-    );
208
-    if (empty($list)) {
209
-        $_article = array_merge($_article, array(
210
-            'author'   => $articles_obj[$id]->getVar('art_author'),
211
-            'views'    => $articles_obj[$id]->getVar('art_views'),
212
-            'comments' => $articles_obj[$id]->getVar('art_comments'),
213
-            'star'     => $articles_obj[$id]->getStar(),
214
-            'rates'    => $articles_obj[$id]->getVar('art_rates')
215
-        ));
216
-        if (!empty($xoopsModuleConfig['display_summary'])) {
217
-            $_article['content'] = $articles_obj[$id]->getSummary();
218
-        } else {
219
-            $_article['content'] = $articles_obj[$id]->getVar('art_content');
220
-        }
221
-    }
222
-    $articles[] = $_article;
223
-    unset($_article);
199
+	$_article = array(
200
+		'id'    => $id,
201
+		'title' => $articles_obj[$id]->getVar('art_title'),
202
+		'time'  => $articles_obj[$id]->getTime(),
203
+		'blog'  => array(
204
+			'id'    => $articles_obj[$id]->getVar('blog_id'),
205
+			'title' => $blogs[$articles_obj[$id]->getVar('blog_id')]
206
+		)
207
+	);
208
+	if (empty($list)) {
209
+		$_article = array_merge($_article, array(
210
+			'author'   => $articles_obj[$id]->getVar('art_author'),
211
+			'views'    => $articles_obj[$id]->getVar('art_views'),
212
+			'comments' => $articles_obj[$id]->getVar('art_comments'),
213
+			'star'     => $articles_obj[$id]->getStar(),
214
+			'rates'    => $articles_obj[$id]->getVar('art_rates')
215
+		));
216
+		if (!empty($xoopsModuleConfig['display_summary'])) {
217
+			$_article['content'] = $articles_obj[$id]->getSummary();
218
+		} else {
219
+			$_article['content'] = $articles_obj[$id]->getVar('art_content');
220
+		}
221
+	}
222
+	$articles[] = $_article;
223
+	unset($_article);
224 224
 }
225 225
 unset($articles_obj);
226 226
 
227 227
 if ($count_article > $limit) {
228
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
229
-    $start_link = array();
230
-    if ($sort) {
231
-        $start_link[] = 'sort=' . $sort;
232
-    }
233
-    if ($category_id) {
234
-        $start_link[] = 'category=' . $category_id;
235
-    }
236
-    if ($blog_id) {
237
-        $start_link[] = 'blog=' . $blog_id;
238
-    }
239
-    if ($list) {
240
-        $start_link[] = 'list=' . $list;
241
-    }
242
-    $nav     = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&', $start_link));
243
-    $pagenav = $nav->renderNav(4);
228
+	include XOOPS_ROOT_PATH . '/class/pagenav.php';
229
+	$start_link = array();
230
+	if ($sort) {
231
+		$start_link[] = 'sort=' . $sort;
232
+	}
233
+	if ($category_id) {
234
+		$start_link[] = 'category=' . $category_id;
235
+	}
236
+	if ($blog_id) {
237
+		$start_link[] = 'blog=' . $blog_id;
238
+	}
239
+	if ($list) {
240
+		$start_link[] = 'list=' . $list;
241
+	}
242
+	$nav     = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&', $start_link));
243
+	$pagenav = $nav->renderNav(4);
244 244
 } else {
245
-    $pagenav = '';
245
+	$pagenav = '';
246 246
 }
247 247
 
248 248
 $xoopsTpl->assign('xoops_module_header', $xoops_module_header);
249 249
 $xoopsTpl->assign('dirname', $GLOBALS['moddirname']);
250 250
 
251 251
 if ($category_id || $blog_id || $uid) {
252
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
252
+	$xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
253 253
 }
254 254
 
255 255
 $link_switch = "<a href=\""
256
-               . XOOPS_URL
257
-               . '/modules/'
258
-               . $GLOBALS['moddirname']
259
-               . '/index.php'
260
-               . (empty($category_id) ? '' : '/c' . $category_id)
261
-               . (empty($uid) ? '' : '/u' . $uid)
262
-               . (empty($blog_id) ? '' : '/b' . $blog_id)
263
-               . (empty($list) ? '/l1' : '')
264
-               . "\" title=\""
265
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
266
-               . "\">"
267
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
268
-               . '</a>';
256
+			   . XOOPS_URL
257
+			   . '/modules/'
258
+			   . $GLOBALS['moddirname']
259
+			   . '/index.php'
260
+			   . (empty($category_id) ? '' : '/c' . $category_id)
261
+			   . (empty($uid) ? '' : '/u' . $uid)
262
+			   . (empty($blog_id) ? '' : '/b' . $blog_id)
263
+			   . (empty($list) ? '/l1' : '')
264
+			   . "\" title=\""
265
+			   . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
266
+			   . "\">"
267
+			   . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
268
+			   . '</a>';
269 269
 $xoopsTpl->assign('link_switch', $link_switch);
270 270
 
271 271
 $link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>';
272 272
 $xoopsTpl->assign('link_blogs', $link_blogs);
273 273
 
274 274
 if (empty($uid) && is_object($xoopsUser)) {
275
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
275
+	$xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
276 276
 }
277 277
 
278 278
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
279
-    $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
279
+	$xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
280 280
 }
281 281
 
282 282
 $xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES'));
@@ -290,22 +290,22 @@  discard block
 block discarded – undo
290 290
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
291 291
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
292 292
 } elseif ($blog_id > 0) {
293
-    $xoopsTpl->assign('canrate', 1);
293
+	$xoopsTpl->assign('canrate', 1);
294 294
 }
295 295
 
296 296
 $sort_link   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1');
297 297
 $valid_sorts = array(
298
-    'views'   => planet_constant('MD_VIEWS'),
299
-    'rating'  => planet_constant('MD_RATING'),
300
-    'time'    => planet_constant('MD_TIME'),
301
-    'default' => planet_constant('MD_DEFAULT')
298
+	'views'   => planet_constant('MD_VIEWS'),
299
+	'rating'  => planet_constant('MD_RATING'),
300
+	'time'    => planet_constant('MD_TIME'),
301
+	'default' => planet_constant('MD_DEFAULT')
302 302
 );
303 303
 $sortlinks   = array();
304 304
 foreach ($valid_sorts as $val => $name) {
305
-    if ($val == $sort) {
306
-        continue;
307
-    }
308
-    $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>';
305
+	if ($val == $sort) {
306
+		continue;
307
+	}
308
+	$sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>';
309 309
 }
310 310
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
311 311
 $xoopsTpl->assign('version', $xoopsModule->getVar('version'));
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
 
315 315
 // for notification
316 316
 if (!empty($blog_id)) {
317
-    //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php";
318
-    $_GET['blog'] = $blog_id;
317
+	//$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php";
318
+	$_GET['blog'] = $blog_id;
319 319
 }
320 320
 
321 321
 require_once __DIR__ . '/footer.php';
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 
9 9
 $current_path = __FILE__;
10 10
 if (DIRECTORY_SEPARATOR !== '/') {
11
-    $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
11
+	$current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12 12
 }
13 13
 $url_arr = explode('/', strstr($current_path, '/modules/'));
14 14
 include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
15 15
 
16 16
 if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO')) {
17
-    return;
17
+	return;
18 18
 }
19 19
 define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO', 1);
20 20
 
Please login to merge, or discard this patch.
update.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 $blog_id     = Request::getInt('blog', Request::getInt('blog', 0, 'POST'), 'GET'); //(int)(!empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0));
32 32
 $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
33 33
 if ($blog_id > 0) {
34
-    $blog  = $blogHandler->get($blog_id);
35
-    $count = $blogHandler->do_update($blog);
36
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php?blog=' . $blog_id, 2, sprintf(planet_constant('MD_UPDATED'), (int)$count));
34
+	$blog  = $blogHandler->get($blog_id);
35
+	$count = $blogHandler->do_update($blog);
36
+	redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php?blog=' . $blog_id, 2, sprintf(planet_constant('MD_UPDATED'), (int)$count));
37 37
 }
38 38
 if (planetGetCookie('upd') + 30 * 60 > time()) {
39
-    return;
39
+	return;
40 40
 }
41 41
 PlanetUtility::planetSetCookie('upd', time());
42 42
 $start = 0;
@@ -47,15 +47,15 @@  discard block
 block discarded – undo
47 47
 $criteria->setLimit($xoopsModuleConfig['blogs_perupdate']);
48 48
 $blogs = $blogHandler->getAll($criteria);
49 49
 foreach (array_keys($blogs) as $id) {
50
-    $blogHandler->do_update($blogs[$id]);
50
+	$blogHandler->do_update($blogs[$id]);
51 51
 }
52 52
 $start += count($blogs);
53 53
 if (count($blogs) < $xoopsModuleConfig['blogs_perupdate']) {
54
-    $start = 0;
54
+	$start = 0;
55 55
 }
56 56
 $fp = fopen(XOOPS_CACHE_PATH . '/' . $xoopsModule->getVar('dirname') . '_update.php', 'w');
57 57
 if (!$fp) {
58
-    return;
58
+	return;
59 59
 }
60 60
 fwrite($fp, "<?php\n \$start=" . (int)$start . ";\n?>");
61 61
 fclose($fp);
Please login to merge, or discard this patch.