Completed
Push — master ( 96da4e...7c5656 )
by Michael
04:52
created
notification_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
  * @author       XOOPS Development Team, Kazumi Ono (AKA onokazu)
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
21
-include XOOPS_ROOT_PATH . '/include/notification_update.php';
20
+include __DIR__.'/../../mainfile.php';
21
+include XOOPS_ROOT_PATH.'/include/notification_update.php';
Please login to merge, or discard this patch.
view.article.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
  *
35 35
  */
36 36
 if (preg_match("/(\/comment_[^\.]*\.php\?.*=.*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {//$_SERVER['REQUEST_URI']
37
-    header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]);
38
-    exit();
37
+	header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]);
38
+	exit();
39 39
 }
40 40
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
41
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
42
-    exit();
41
+	include XOOPS_ROOT_PATH . '/include/notification_update.php';
42
+	exit();
43 43
 }
44 44
 
45 45
 if ($REQUEST_URI_parsed = PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
46
-    $args['article'] = @$args_num[0];
47
-    $args['blog']    = @$args['blog'];
46
+	$args['article'] = @$args_num[0];
47
+	$args['blog']    = @$args['blog'];
48 48
 }
49 49
 
50 50
 $article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 // restore $_SERVER['REQUEST_URI']
59 59
 if (!empty($REQUEST_URI_parsed)) {
60
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id);
60
+	$_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id);
61 61
 }
62 62
 
63 63
 $xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . $article_obj->getVar('art_title');
@@ -66,29 +66,29 @@  discard block
 block discarded – undo
66 66
 include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
67 67
 
68 68
 $article_data = array(
69
-    'id'       => $article_id,
70
-    'title'    => $article_obj->getVar('art_title'),
71
-    'content'  => $article_obj->getVar('art_content'),
72
-    'author'   => $article_obj->getVar('art_author'),
73
-    'time'     => $article_obj->getTime(),
74
-    'link'     => $article_obj->getVar('art_link'),
75
-    'views'    => $article_obj->getVar('art_views'),
76
-    'comments' => $article_obj->getVar('art_comments'),
77
-    'star'     => $article_obj->getStar(),
78
-    'rates'    => $article_obj->getVar('art_rates'),
79
-    'blog'     => array('id' => $article_obj->getVar('blog_id'), 'title' => $blog_obj->getVar('blog_title'))
69
+	'id'       => $article_id,
70
+	'title'    => $article_obj->getVar('art_title'),
71
+	'content'  => $article_obj->getVar('art_content'),
72
+	'author'   => $article_obj->getVar('art_author'),
73
+	'time'     => $article_obj->getTime(),
74
+	'link'     => $article_obj->getVar('art_link'),
75
+	'views'    => $article_obj->getVar('art_views'),
76
+	'comments' => $article_obj->getVar('art_comments'),
77
+	'star'     => $article_obj->getStar(),
78
+	'rates'    => $article_obj->getVar('art_rates'),
79
+	'blog'     => array('id' => $article_obj->getVar('blog_id'), 'title' => $blog_obj->getVar('blog_title'))
80 80
 );
81 81
 
82 82
 if (!empty($xoopsModuleConfig['do_sibling'])) {
83
-    $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id);
84
-    if (!empty($articles_sibling['previous'])) {
85
-        $articles_sibling['previous']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id;
86
-        $articles_sibling['previous']['title'] = $articles_sibling['previous']['title'];
87
-    }
88
-    if (!empty($articles_sibling['next'])) {
89
-        $articles_sibling['next']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id;
90
-        $articles_sibling['next']['title'] = $articles_sibling['next']['title'];
91
-    }
83
+	$articles_sibling = $articleHandler->getSibling($article_obj, $blog_id);
84
+	if (!empty($articles_sibling['previous'])) {
85
+		$articles_sibling['previous']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id;
86
+		$articles_sibling['previous']['title'] = $articles_sibling['previous']['title'];
87
+	}
88
+	if (!empty($articles_sibling['next'])) {
89
+		$articles_sibling['next']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id;
90
+		$articles_sibling['next']['title'] = $articles_sibling['next']['title'];
91
+	}
92 92
 }
93 93
 
94 94
 $xoopsTpl->assign('modulename', $xoopsModule->getVar('name'));
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
100 100
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
101 101
 } else {
102
-    $xoopsTpl->assign('canrate', 1);
102
+	$xoopsTpl->assign('canrate', 1);
103 103
 }
104 104
 
105 105
 if ($transferbar = @include XOOPS_ROOT_PATH . '/Frameworks/transfer/bar.transfer.php') {
106
-    $xoopsTpl->assign('transfer', $transferbar);
106
+	$xoopsTpl->assign('transfer', $transferbar);
107 107
 }
108 108
 
109 109
 // Loading module meta data, NOT THE RIGHT WAY DOING IT
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 /**
32 32
  * The comment detection scripts should be removed once absolute url is used in comment_view.php
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
  *
35 35
  */
36 36
 if (preg_match("/(\/comment_[^\.]*\.php\?.*=.*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {//$_SERVER['REQUEST_URI']
37
-    header('location: ' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . $matches[1]);
37
+    header('location: '.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].$matches[1]);
38 38
     exit();
39 39
 }
40 40
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
41
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
41
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
42 42
     exit();
43 43
 }
44 44
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
     $args['blog']    = @$args['blog'];
48 48
 }
49 49
 
50
-$article_id = Request::getInt('article', @$args['article'], 'POST');//(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
51
-$blog_id    = Request::getInt('blog', @$args['blog'], 'POST');//(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
50
+$article_id = Request::getInt('article', @$args['article'], 'POST'); //(int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
51
+$blog_id    = Request::getInt('blog', @$args['blog'], 'POST'); //(int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
52 52
 
53 53
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
54 54
 $blogHandler    = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 
58 58
 // restore $_SERVER['REQUEST_URI']
59 59
 if (!empty($REQUEST_URI_parsed)) {
60
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . (empty($article_id) ? '' : '?article=' . $article_id);
60
+    $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.(empty($article_id) ? '' : '?article='.$article_id);
61 61
 }
62 62
 
63
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . $article_obj->getVar('art_title');
63
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.$article_obj->getVar('art_title');
64 64
 $xoopsOption['template_main']   = PlanetUtility::planetGetTemplate('article');
65
-require_once XOOPS_ROOT_PATH . '/header.php';
66
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
65
+require_once XOOPS_ROOT_PATH.'/header.php';
66
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
67 67
 
68 68
 $article_data = array(
69 69
     'id'       => $article_id,
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 if (!empty($xoopsModuleConfig['do_sibling'])) {
83 83
     $articles_sibling = $articleHandler->getSibling($article_obj, $blog_id);
84 84
     if (!empty($articles_sibling['previous'])) {
85
-        $articles_sibling['previous']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['previous']['id'] . '/b' . $blog_id;
85
+        $articles_sibling['previous']['url']   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['previous']['id'].'/b'.$blog_id;
86 86
         $articles_sibling['previous']['title'] = $articles_sibling['previous']['title'];
87 87
     }
88 88
     if (!empty($articles_sibling['next'])) {
89
-        $articles_sibling['next']['url']   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_sibling['next']['id'] . '/b' . $blog_id;
89
+        $articles_sibling['next']['url']   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_sibling['next']['id'].'/b'.$blog_id;
90 90
         $articles_sibling['next']['title'] = $articles_sibling['next']['title'];
91 91
     }
92 92
 }
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 
99 99
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
100 100
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
101
-} else {
101
+}else {
102 102
     $xoopsTpl->assign('canrate', 1);
103 103
 }
104 104
 
105
-if ($transferbar = @include XOOPS_ROOT_PATH . '/Frameworks/transfer/bar.transfer.php') {
105
+if ($transferbar = @include XOOPS_ROOT_PATH.'/Frameworks/transfer/bar.transfer.php') {
106 106
     $xoopsTpl->assign('transfer', $transferbar);
107 107
 }
108 108
 
@@ -112,6 +112,6 @@  discard block
 block discarded – undo
112 112
 // for comment and notification
113 113
 //$_SERVER['REQUEST_URI'] = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php";
114 114
 $_GET['article'] = $article_id;
115
-include XOOPS_ROOT_PATH . '/include/comment_view.php';
115
+include XOOPS_ROOT_PATH.'/include/comment_view.php';
116 116
 
117
-require_once __DIR__ . '/footer.php';
117
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
xml.php 2 patches
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 include __DIR__ . '/header.php';
31 31
 
32 32
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
33
-    $args['article'] = @$args_num[0];
34
-    $args['type']    = @$args_str[0];
33
+	$args['article'] = @$args_num[0];
34
+	$args['type']    = @$args_str[0];
35 35
 }
36 36
 
37 37
 /* Specified Article */
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
 $valid_format = array('RSS0.91', 'RSS1.0', 'RSS2.0', 'PIE0.1', 'MBOX', 'OPML', 'ATOM', 'ATOM0.3', 'HTML', 'JS');
50 50
 if ($type === 'RDF') {
51
-    $type = 'RSS1.0';
51
+	$type = 'RSS1.0';
52 52
 }
53 53
 if ($type === 'RSS') {
54
-    $type = 'RSS0.91';
54
+	$type = 'RSS0.91';
55 55
 }
56 56
 if (empty($type) || !in_array($type, $valid_format)) {
57
-    PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
58
-    exit();
57
+	PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
58
+	exit();
59 59
 }
60 60
 
61 61
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -64,30 +64,30 @@  discard block
 block discarded – undo
64 64
 $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
65 65
 
66 66
 if (!empty($article_id)) {
67
-    $article_obj = $articleHandler->get($article_id);
68
-    if (!$article_obj->getVar('art_id')) {
69
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED'));
70
-        exit();
71
-    }
72
-    $source = 'article';
67
+	$article_obj = $articleHandler->get($article_id);
68
+	if (!$article_obj->getVar('art_id')) {
69
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED'));
70
+		exit();
71
+	}
72
+	$source = 'article';
73 73
 } elseif (!empty($blog_id)) {
74
-    $blog_obj = $blogHandler->get($blog_id);
75
-    if (!$blog_obj->getVar('blog_id')) {
76
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
77
-        exit();
78
-    }
79
-    $source = 'blog';
74
+	$blog_obj = $blogHandler->get($blog_id);
75
+	if (!$blog_obj->getVar('blog_id')) {
76
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
77
+		exit();
78
+	}
79
+	$source = 'blog';
80 80
 } elseif (!empty($category_id)) {
81
-    $source       = 'category';
82
-    $category_obj = $categoryHandler->get($category_id);
83
-    if (!$category_obj->getVar('cat_id')) {
84
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
85
-        exit();
86
-    }
81
+	$source       = 'category';
82
+	$category_obj = $categoryHandler->get($category_id);
83
+	if (!$category_obj->getVar('cat_id')) {
84
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
85
+		exit();
86
+	}
87 87
 } elseif (!empty($uid)) {
88
-    $source = 'bookmark';
88
+	$source = 'bookmark';
89 89
 } else {
90
-    $source = '';
90
+	$source = '';
91 91
 }
92 92
 
93 93
 $xml_charset = 'UTF-8';
@@ -97,102 +97,102 @@  discard block
 block discarded – undo
97 97
 $tpl->xoops_setCacheTime(3600);
98 98
 $xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type);
99 99
 if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) {
100
-    $criteria = new CriteriaCompo();
101
-    $criteria->setLimit($xoopsModuleConfig['articles_perpage']);
102
-    $articles_obj = array();
103
-    switch ($source) {
104
-        case 'article':
105
-            $pagetitle = planet_constant('MD_ARTICLE');
106
-            $rssdesc   = planet_constant('MD_XMLDESC_ARTICLE');
107
-
108
-            $articles_obj[$article_id] = $article_obj;
109
-
110
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
111
-            break;
112
-
113
-        case 'category':
114
-            $pagetitle = planet_constant('MD_CATEGORY');
115
-            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title'));
116
-
117
-            $criteria->add(new Criteria('bc.cat_id', $category_id));
118
-            $articles_obj = $articleHandler->getByCategory($criteria);
119
-
120
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
121
-            break;
122
-
123
-        case 'blog':
124
-            $pagetitle = planet_constant('MD_BLOG');
125
-            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title'));
126
-
127
-            $criteria->add(new Criteria('blog_id', $blog_id));
128
-            $articles_obj = $articleHandler->getAll($criteria);
129
-
130
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
131
-            break;
132
-
133
-        case 'bookmark':
134
-            $author_name = XoopsUser::getUnameFromId($uid);
135
-            $pagetitle   = planet_constant('MD_BOOKMARKS');
136
-            $rssdesc     = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name);
137
-
138
-            $criteria->add(new Criteria('bm.bm_uid', $uid));
139
-            $articles_obj = $articleHandler->getByBookmark($criteria);
140
-
141
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
142
-
143
-            break;
144
-
145
-        default:
146
-            $pagetitle = planet_constant('MD_INDEX');
147
-            $rssdesc   = planet_constant('MD_XMLDESC_INDEX');
148
-
149
-            $articles_obj = $articleHandler->getAll($criteria);
150
-
151
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
152
-            break;
153
-    }
154
-    $items = array();
155
-    foreach (array_keys($articles_obj) as $id) {
156
-        $content = $articles_obj[$id]->getVar('art_content');
157
-        $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
158
-        $items[] = array(
159
-            'title'                     => $articles_obj[$id]->getVar('art_title'),
160
-            'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
161
-            'description'               => $content,
162
-            'descriptionHtmlSyndicated' => true,
163
-            'date'                      => $articles_obj[$id]->getTime('rss'),
164
-            'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
165
-            'author'                    => $articles_obj[$id]->getVar('art_author')
166
-        );
167
-    }
168
-    unset($articles_obj, $criteria);
169
-
170
-    $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171
-    $xml        = $xmlHandler->create($type);
172
-    $xml->setVar('encoding', $xml_charset);
173
-    $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
174
-    $xml->setVar('description', $rssdesc, true);
175
-    $xml->setVar('descriptionHtmlSyndicated', true);
176
-    $xml->setVar('link', $xml_link);
177
-    $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
178
-    $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179
-    $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180
-    $xml->setVar('category', $xoopsModule->getVar('name'), true);
181
-    $xml->setVar('generator', $xoopsModule->getInfo('version'));
182
-    $xml->setVar('language', _LANGCODE);
183
-
184
-    $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
185
-    $image     = array(
186
-        'width'       => $dimention[0],
187
-        'height'      => $dimention[1],
188
-        'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
-        'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
-        'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
191
-        'description' => $rssdesc
192
-    );
193
-    $xml->setImage($image);
194
-
195
-    /*
100
+	$criteria = new CriteriaCompo();
101
+	$criteria->setLimit($xoopsModuleConfig['articles_perpage']);
102
+	$articles_obj = array();
103
+	switch ($source) {
104
+		case 'article':
105
+			$pagetitle = planet_constant('MD_ARTICLE');
106
+			$rssdesc   = planet_constant('MD_XMLDESC_ARTICLE');
107
+
108
+			$articles_obj[$article_id] = $article_obj;
109
+
110
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
111
+			break;
112
+
113
+		case 'category':
114
+			$pagetitle = planet_constant('MD_CATEGORY');
115
+			$rssdesc   = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title'));
116
+
117
+			$criteria->add(new Criteria('bc.cat_id', $category_id));
118
+			$articles_obj = $articleHandler->getByCategory($criteria);
119
+
120
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
121
+			break;
122
+
123
+		case 'blog':
124
+			$pagetitle = planet_constant('MD_BLOG');
125
+			$rssdesc   = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title'));
126
+
127
+			$criteria->add(new Criteria('blog_id', $blog_id));
128
+			$articles_obj = $articleHandler->getAll($criteria);
129
+
130
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
131
+			break;
132
+
133
+		case 'bookmark':
134
+			$author_name = XoopsUser::getUnameFromId($uid);
135
+			$pagetitle   = planet_constant('MD_BOOKMARKS');
136
+			$rssdesc     = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name);
137
+
138
+			$criteria->add(new Criteria('bm.bm_uid', $uid));
139
+			$articles_obj = $articleHandler->getByBookmark($criteria);
140
+
141
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
142
+
143
+			break;
144
+
145
+		default:
146
+			$pagetitle = planet_constant('MD_INDEX');
147
+			$rssdesc   = planet_constant('MD_XMLDESC_INDEX');
148
+
149
+			$articles_obj = $articleHandler->getAll($criteria);
150
+
151
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
152
+			break;
153
+	}
154
+	$items = array();
155
+	foreach (array_keys($articles_obj) as $id) {
156
+		$content = $articles_obj[$id]->getVar('art_content');
157
+		$content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
158
+		$items[] = array(
159
+			'title'                     => $articles_obj[$id]->getVar('art_title'),
160
+			'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
161
+			'description'               => $content,
162
+			'descriptionHtmlSyndicated' => true,
163
+			'date'                      => $articles_obj[$id]->getTime('rss'),
164
+			'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
165
+			'author'                    => $articles_obj[$id]->getVar('art_author')
166
+		);
167
+	}
168
+	unset($articles_obj, $criteria);
169
+
170
+	$xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171
+	$xml        = $xmlHandler->create($type);
172
+	$xml->setVar('encoding', $xml_charset);
173
+	$xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
174
+	$xml->setVar('description', $rssdesc, true);
175
+	$xml->setVar('descriptionHtmlSyndicated', true);
176
+	$xml->setVar('link', $xml_link);
177
+	$xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
178
+	$xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179
+	$xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180
+	$xml->setVar('category', $xoopsModule->getVar('name'), true);
181
+	$xml->setVar('generator', $xoopsModule->getInfo('version'));
182
+	$xml->setVar('language', _LANGCODE);
183
+
184
+	$dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
185
+	$image     = array(
186
+		'width'       => $dimention[0],
187
+		'height'      => $dimention[1],
188
+		'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
+		'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
+		'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
191
+		'description' => $rssdesc
192
+	);
193
+	$xml->setImage($image);
194
+
195
+	/*
196 196
     $item = array(
197 197
         "title" => $datatitle,
198 198
         "link" => $dataurl,
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
         "author" => $dataauthor
204 204
         );
205 205
     */
206
-    $xml->addItems($items);
206
+	$xml->addItems($items);
207 207
 
208
-    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
208
+	$dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
209 209
 
210
-    $tpl->assign_by_ref('dummy_content', $dummy_content);
210
+	$tpl->assign_by_ref('dummy_content', $dummy_content);
211 211
 }
212 212
 //$content = ob_get_contents();
213 213
 ob_end_clean();
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 use Xmf\Request;
28 28
 
29 29
 ob_start();
30
-include __DIR__ . '/header.php';
30
+include __DIR__.'/header.php';
31 31
 
32 32
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
33 33
     $args['article'] = @$args_num[0];
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
     }
87 87
 } elseif (!empty($uid)) {
88 88
     $source = 'bookmark';
89
-} else {
89
+}else {
90 90
     $source = '';
91 91
 }
92 92
 
93 93
 $xml_charset = 'UTF-8';
94
-require_once XOOPS_ROOT_PATH . '/class/template.php';
94
+require_once XOOPS_ROOT_PATH.'/class/template.php';
95 95
 $tpl = new XoopsTpl();
96 96
 $tpl->xoops_setCaching(2);
97 97
 $tpl->xoops_setCacheTime(3600);
98
-$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type);
98
+$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid').','.$article_id.','.$category_id.','.$blog_id.','.$uid.','.$type);
99 99
 if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) {
100 100
     $criteria = new CriteriaCompo();
101 101
     $criteria->setLimit($xoopsModuleConfig['articles_perpage']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $articles_obj[$article_id] = $article_obj;
109 109
 
110
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
110
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id');
111 111
             break;
112 112
 
113 113
         case 'category':
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $criteria->add(new Criteria('bc.cat_id', $category_id));
118 118
             $articles_obj = $articleHandler->getByCategory($criteria);
119 119
 
120
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
120
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'c'.$category_id;
121 121
             break;
122 122
 
123 123
         case 'blog':
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $criteria->add(new Criteria('blog_id', $blog_id));
128 128
             $articles_obj = $articleHandler->getAll($criteria);
129 129
 
130
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
130
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id;
131 131
             break;
132 132
 
133 133
         case 'bookmark':
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $criteria->add(new Criteria('bm.bm_uid', $uid));
139 139
             $articles_obj = $articleHandler->getByBookmark($criteria);
140 140
 
141
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
141
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$uid;
142 142
 
143 143
             break;
144 144
 
@@ -148,20 +148,20 @@  discard block
 block discarded – undo
148 148
 
149 149
             $articles_obj = $articleHandler->getAll($criteria);
150 150
 
151
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
151
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
152 152
             break;
153 153
     }
154 154
     $items = array();
155 155
     foreach (array_keys($articles_obj) as $id) {
156 156
         $content = $articles_obj[$id]->getVar('art_content');
157
-        $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
157
+        $content .= '<br>'.planet_constant('MD_SOURCE').': '.$articles_obj[$id]->getVar('art_link').' '.$articles_obj[$id]->getVar('art_author');
158 158
         $items[] = array(
159 159
             'title'                     => $articles_obj[$id]->getVar('art_title'),
160
-            'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
160
+            'link'                      => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_obj[$id]->getVar('art_id'),
161 161
             'description'               => $content,
162 162
             'descriptionHtmlSyndicated' => true,
163 163
             'date'                      => $articles_obj[$id]->getTime('rss'),
164
-            'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
164
+            'source'                    => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/',
165 165
             'author'                    => $articles_obj[$id]->getVar('art_author')
166 166
         );
167 167
     }
@@ -170,24 +170,24 @@  discard block
 block discarded – undo
170 170
     $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171 171
     $xml        = $xmlHandler->create($type);
172 172
     $xml->setVar('encoding', $xml_charset);
173
-    $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
173
+    $xml->setVar('title', $xoopsConfig['sitename'].' :: '.$pagetitle, 'UTF-8', $xml_charset, true);
174 174
     $xml->setVar('description', $rssdesc, true);
175 175
     $xml->setVar('descriptionHtmlSyndicated', true);
176 176
     $xml->setVar('link', $xml_link);
177
-    $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
177
+    $xml->setVar('syndicationURL', XOOPS_URL.'/'.xoops_getenv('PHP_SELF'), 'post', true);
178 178
     $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179 179
     $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180 180
     $xml->setVar('category', $xoopsModule->getVar('name'), true);
181 181
     $xml->setVar('generator', $xoopsModule->getInfo('version'));
182 182
     $xml->setVar('language', _LANGCODE);
183 183
 
184
-    $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
184
+    $dimention = @getimagesize(XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image'));
185 185
     $image     = array(
186 186
         'width'       => $dimention[0],
187 187
         'height'      => $dimention[1],
188
-        'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
-        'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
-        'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
188
+        'title'       => $xoopsConfig['sitename'].' :: '.$pagetitle,
189
+        'url'         => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image'),
190
+        'link'        => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/',
191 191
         'description' => $rssdesc
192 192
     );
193 193
     $xml->setImage($image);
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
     */
206 206
     $xml->addItems($items);
207 207
 
208
-    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
208
+    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH.'/'.$GLOBALS['moddirname'].'.xml.tmp');
209 209
 
210 210
     $tpl->assign_by_ref('dummy_content', $dummy_content);
211 211
 }
212 212
 //$content = ob_get_contents();
213 213
 ob_end_clean();
214
-header('Content-Type:text/xml; charset=' . $xml_charset);
214
+header('Content-Type:text/xml; charset='.$xml_charset);
215 215
 $tpl->display('db:system_dummy.tpl', $xoopsCachedTemplateId);
Please login to merge, or discard this patch.
index.php 2 patches
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('&amp;', $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('&amp;', $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.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/header.php';
27
+include __DIR__.'/header.php';
28 28
 
29 29
 if (preg_match("/\/notification_update\.php/i", $_SERVER['REQUEST_URI'], $matches)) {
30
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
30
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
31 31
     exit();
32 32
 }
33 33
 
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 }
38 38
 
39 39
 /* Start */
40
-$start = (int)(empty($_GET['start']) ? @$args['start'] : $_GET['start']);
40
+$start = (int) (empty($_GET['start']) ? @$args['start'] : $_GET['start']);
41 41
 /* Specified Category */
42
-$category_id = (int)(empty($_GET['category']) ? @$args['category'] : $_GET['category']);
42
+$category_id = (int) (empty($_GET['category']) ? @$args['category'] : $_GET['category']);
43 43
 /* Specified Blog */
44
-$blog_id = (int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
44
+$blog_id = (int) (empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
45 45
 /* Specified Bookmar(Favorite) UID */
46
-$uid = (int)(empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
46
+$uid = (int) (empty($_GET['uid']) ? @$args['uid'] : $_GET['uid']);
47 47
 /* Sort by term */
48 48
 $sort = empty($_GET['sort']) ? @$args['sort'] : $_GET['sort'];
49 49
 /* Display as list */
50
-$list = (int)(empty($_GET['list']) ? @$args['list'] : $_GET['list']);
50
+$list = (int) (empty($_GET['list']) ? @$args['list'] : $_GET['list']);
51 51
 
52 52
 // restore $_SERVER['REQUEST_URI']
53 53
 if (!empty($REQUEST_URI_parsed)) {
@@ -55,28 +55,28 @@  discard block
 block discarded – undo
55 55
     $_args            = array('start', 'sort', 'uid', 'list');
56 56
     foreach ($_args as $arg) {
57 57
         if (!empty(${$arg})) {
58
-            $args_REQUEST_URI[] = $arg . '=' . ${$arg};
58
+            $args_REQUEST_URI[] = $arg.'='.${$arg};
59 59
         }
60 60
     }
61 61
     if (!empty($blog_id)) {
62
-        $args_REQUEST_URI[] = 'blog=' . $blog_id;
62
+        $args_REQUEST_URI[] = 'blog='.$blog_id;
63 63
     }
64 64
     if (!empty($category_id)) {
65
-        $args_REQUEST_URI[] = 'category=' . $category_id;
65
+        $args_REQUEST_URI[] = 'category='.$category_id;
66 66
     }
67
-    $_SERVER['REQUEST_URI'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($args_REQUEST_URI) ? '' : '?' . implode('&', $args_REQUEST_URI));
67
+    $_SERVER['REQUEST_URI'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($args_REQUEST_URI) ? '' : '?'.implode('&', $args_REQUEST_URI));
68 68
 }
69 69
 
70 70
 $GLOBALS['xoopsOption']['template_main'] = PlanetUtility::planetGetTemplate('index');
71 71
 $xoops_module_header                     = '
72
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rss" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rss/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
73
-    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name') . ' rdf" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."rdf/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
74
-    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name') . ' atom" href="' . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php".URL_DELIMITER."atom/c' . $category_id . '/b' . $blog_id . '/u' . $uid . '">
72
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rss" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rss/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
73
+    <link rel="alternate" type="application/rss+xml" title="' . $xoopsModule->getVar('name').' rdf" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."rdf/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
74
+    <link rel="alternate" type="application/atom+xml" title="' . $xoopsModule->getVar('name').' atom" href="'.XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php".URL_DELIMITER."atom/c'.$category_id.'/b'.$blog_id.'/u'.$uid.'">
75 75
     ';
76 76
 
77 77
 $xoopsOption['xoops_module_header'] = $xoops_module_header;
78
-require_once XOOPS_ROOT_PATH . '/header.php';
79
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
78
+require_once XOOPS_ROOT_PATH.'/header.php';
79
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
80 80
 
81 81
 // Following part will not be executed after cache
82 82
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 $criteria       = new CriteriaCompo();
89 89
 $article_prefix = '';
90 90
 /* Specific category */
91
-if ($category_id > 0) {
91
+if ($category_id>0) {
92 92
     $category_obj = $categoryHandler->get($category_id);
93 93
     $criteria->add(new Criteria('bc.cat_id', $category_id));
94 94
     $uid            = 0;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     $article_prefix = 'a.';
99 99
 }
100 100
 /* Specific blog */
101
-if ($blog_id > 0) {
101
+if ($blog_id>0) {
102 102
     $blog_obj = $blogHandler->get($blog_id);
103 103
     if ($blog_obj->getVar('blog_status')
104 104
         || (is_object($xoopsUser)
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     $article_prefix = '';
126 126
 }
127 127
 /* User bookmarks(favorites) */
128
-if ($uid > 0) {
128
+if ($uid>0) {
129 129
     $criteria->add(new Criteria('bm.bm_uid', $uid));
130 130
     $category_id     = 0;
131 131
     $blog_id         = 0;
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 $sort  = empty($sort) ? 'time' : $sort;
145 145
 switch ($sort) {
146 146
     case 'views':
147
-        $sortby = $article_prefix . 'art_views';
147
+        $sortby = $article_prefix.'art_views';
148 148
         break;
149 149
     case 'rating':
150
-        $sortby = $article_prefix . 'art_rating';
150
+        $sortby = $article_prefix.'art_rating';
151 151
         break;
152 152
     case 'time':
153
-        $sortby = $article_prefix . 'art_time';
153
+        $sortby = $article_prefix.'art_time';
154 154
         break;
155 155
     case 'default':
156 156
     default:
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 $criteria->setLimit($limit);
164 164
 
165 165
 $tags = empty($list) ? '' : 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 171
     case 'category':
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 
185 185
 if (!empty($blog_data)) {
186 186
     $blogs[$blog_data['id']] = $blog_data['title'];
187
-} else {
187
+}else {
188 188
     $blog_array = array();
189 189
     foreach (array_keys($articles_obj) as $id) {
190 190
         $blog_array[$articles_obj[$id]->getVar('blog_id')] = 1;
191 191
     }
192
-    $criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
192
+    $criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN');
193 193
     $blogs         = $blogHandler->getList($criteria_blog);
194 194
 }
195 195
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         ));
216 216
         if (!empty($xoopsModuleConfig['display_summary'])) {
217 217
             $_article['content'] = $articles_obj[$id]->getSummary();
218
-        } else {
218
+        }else {
219 219
             $_article['content'] = $articles_obj[$id]->getVar('art_content');
220 220
         }
221 221
     }
@@ -224,24 +224,24 @@  discard block
 block discarded – undo
224 224
 }
225 225
 unset($articles_obj);
226 226
 
227
-if ($count_article > $limit) {
228
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
227
+if ($count_article>$limit) {
228
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
229 229
     $start_link = array();
230 230
     if ($sort) {
231
-        $start_link[] = 'sort=' . $sort;
231
+        $start_link[] = 'sort='.$sort;
232 232
     }
233 233
     if ($category_id) {
234
-        $start_link[] = 'category=' . $category_id;
234
+        $start_link[] = 'category='.$category_id;
235 235
     }
236 236
     if ($blog_id) {
237
-        $start_link[] = 'blog=' . $blog_id;
237
+        $start_link[] = 'blog='.$blog_id;
238 238
     }
239 239
     if ($list) {
240
-        $start_link[] = 'list=' . $list;
240
+        $start_link[] = 'list='.$list;
241 241
     }
242 242
     $nav     = new XoopsPageNav($count_article, $limit, $start, 'start', implode('&amp;', $start_link));
243 243
     $pagenav = $nav->renderNav(4);
244
-} else {
244
+}else {
245 245
     $pagenav = '';
246 246
 }
247 247
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 $xoopsTpl->assign('dirname', $GLOBALS['moddirname']);
250 250
 
251 251
 if ($category_id || $blog_id || $uid) {
252
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
252
+    $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
253 253
 }
254 254
 
255 255
 $link_switch = "<a href=\""
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
                . '/modules/'
258 258
                . $GLOBALS['moddirname']
259 259
                . '/index.php'
260
-               . (empty($category_id) ? '' : '/c' . $category_id)
261
-               . (empty($uid) ? '' : '/u' . $uid)
262
-               . (empty($blog_id) ? '' : '/b' . $blog_id)
260
+               . (empty($category_id) ? '' : '/c'.$category_id)
261
+               . (empty($uid) ? '' : '/u'.$uid)
262
+               . (empty($blog_id) ? '' : '/b'.$blog_id)
263 263
                . (empty($list) ? '/l1' : '')
264 264
                . "\" title=\""
265 265
                . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
@@ -268,18 +268,18 @@  discard block
 block discarded – undo
268 268
                . '</a>';
269 269
 $xoopsTpl->assign('link_switch', $link_switch);
270 270
 
271
-$link_blogs = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_BLOGS') . "\">" . planet_constant('MD_BLOGS') . '</a>';
271
+$link_blogs = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_BLOGS')."\">".planet_constant('MD_BLOGS').'</a>';
272 272
 $xoopsTpl->assign('link_blogs', $link_blogs);
273 273
 
274 274
 if (empty($uid) && is_object($xoopsUser)) {
275
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
275
+    $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>');
276 276
 }
277 277
 
278 278
 if ($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
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_ARTICLES'));
282
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_ARTICLES'));
283 283
 $xoopsTpl->assign('category', @$category_data);
284 284
 $xoopsTpl->assign('blog', @$blog_data);
285 285
 $xoopsTpl->assign('user', @$user_data);
@@ -289,23 +289,23 @@  discard block
 block discarded – undo
289 289
 
290 290
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
291 291
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
292
-} elseif ($blog_id > 0) {
292
+} elseif ($blog_id>0) {
293 293
     $xoopsTpl->assign('canrate', 1);
294 294
 }
295 295
 
296
-$sort_link   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1');
296
+$sort_link   = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid).(empty($blog_id) ? '' : '/b'.$blog_id).(empty($list) ? '' : '/l1');
297 297
 $valid_sorts = array(
298 298
     'views'   => planet_constant('MD_VIEWS'),
299 299
     'rating'  => planet_constant('MD_RATING'),
300 300
     'time'    => planet_constant('MD_TIME'),
301 301
     'default' => planet_constant('MD_DEFAULT')
302 302
 );
303
-$sortlinks   = array();
303
+$sortlinks = array();
304 304
 foreach ($valid_sorts as $val => $name) {
305 305
     if ($val == $sort) {
306 306
         continue;
307 307
     }
308
-    $sortlinks[] = "<a href=\"" . $sort_link . '/' . $val . "\">" . $name . '</a>';
308
+    $sortlinks[] = "<a href=\"".$sort_link.'/'.$val."\">".$name.'</a>';
309 309
 }
310 310
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
311 311
 $xoopsTpl->assign('version', $xoopsModule->getVar('version'));
@@ -318,4 +318,4 @@  discard block
 block discarded – undo
318 318
     $_GET['blog'] = $blog_id;
319 319
 }
320 320
 
321
-require_once __DIR__ . '/footer.php';
321
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
footer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,4 +25,4 @@
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-require_once XOOPS_ROOT_PATH . '/footer.php';
28
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
language/english/admin.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -11,83 +11,83 @@
 block discarded – undo
11 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
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
14
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
15 15
 
16
-if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_ADMIN')) {
16
+if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_ADMIN')) {
17 17
     return;
18 18
 }
19
-define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_ADMIN', 1);
19
+define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_ADMIN', 1);
20 20
 
21
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ARTICLES', 'Article Manager');
21
+define($GLOBALS['VAR_PREFIXU'].'_AM_ARTICLES', 'Article Manager');
22 22
 
23
-define($GLOBALS['VAR_PREFIXU'] . '_AM_TITLE', 'Title');
24
-define($GLOBALS['VAR_PREFIXU'] . '_AM_CATEGORY', 'Category');
23
+define($GLOBALS['VAR_PREFIXU'].'_AM_TITLE', 'Title');
24
+define($GLOBALS['VAR_PREFIXU'].'_AM_CATEGORY', 'Category');
25 25
 
26 26
 //define($GLOBALS["VAR_PREFIXU"]."_AM_CATEGORIES", "Categories");
27 27
 //define($GLOBALS["VAR_PREFIXU"]."_AM_ADDCATEGORY", "Add Category");
28 28
 
29
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ARTICLE', 'Article');
30
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ACTION', 'Action');
31
-
32
-define($GLOBALS['VAR_PREFIXU'] . '_AM_PREFERENCES', 'Module Preferences');
33
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ON', 'ON');
34
-define($GLOBALS['VAR_PREFIXU'] . '_AM_OFF', 'OFF');
35
-define($GLOBALS['VAR_PREFIXU'] . '_AM_SAFEMODE', 'safemod');
36
-define($GLOBALS['VAR_PREFIXU'] . '_AM_REGISTERGLOBALS', 'register_globals');
37
-define($GLOBALS['VAR_PREFIXU'] . '_AM_MAGICQUOTESGPC', 'magic_quotes_gpc');
38
-define($GLOBALS['VAR_PREFIXU'] . '_AM_MAXPOSTSIZE', 'post_max_size');
39
-define($GLOBALS['VAR_PREFIXU'] . '_AM_MAXINPUTTIME', 'max_input_time');
40
-define($GLOBALS['VAR_PREFIXU'] . '_AM_OUTPUTBUFFERING', 'output_buffering');
41
-
42
-define($GLOBALS['VAR_PREFIXU'] . '_AM_XML_EXTENSION', 'xml');
43
-define($GLOBALS['VAR_PREFIXU'] . '_AM_MB_EXTENSION', 'mbstring');
44
-define($GLOBALS['VAR_PREFIXU'] . '_AM_CURL', 'curl_init');
45
-define($GLOBALS['VAR_PREFIXU'] . '_AM_FSOCKOPEN', 'fsockopen');
46
-define($GLOBALS['VAR_PREFIXU'] . '_AM_URLFOPEN', 'allow_url_fopen');
47
-
48
-define($GLOBALS['VAR_PREFIXU'] . '_AM_STATS', 'Module Stats');
49
-define($GLOBALS['VAR_PREFIXU'] . '_AM_TOTAL_CATEGORIES', 'Total categories');
50
-define($GLOBALS['VAR_PREFIXU'] . '_AM_TOTAL_BLOGS', 'Total Blogs');
51
-define($GLOBALS['VAR_PREFIXU'] . '_AM_TOTAL_ARTICLES', 'Total articles');
52
-
53
-define($GLOBALS['VAR_PREFIXU'] . '_AM_DBUPDATED', 'Database updated');
54
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ERROR', 'Error');
55
-
56
-define($GLOBALS['VAR_PREFIXU'] . '_AM_COUNT', 'Count');
57
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ORDER', 'Order');
58
-define($GLOBALS['VAR_PREFIXU'] . '_AM_LIST', 'List');
59
-define($GLOBALS['VAR_PREFIXU'] . '_AM_BLOGCOUNT', 'Blogs');
60
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ARTICLECOUNT', 'Articles');
61
-
62
-define($GLOBALS['VAR_PREFIXU'] . '_AM_EXPIRED', 'Expired');
63
-define($GLOBALS['VAR_PREFIXU'] . '_AM_PENDING', 'Pending');
64
-define($GLOBALS['VAR_PREFIXU'] . '_AM_STATUS', 'Status');
65
-define($GLOBALS['VAR_PREFIXU'] . '_AM_FEED', 'Feed');
66
-
67
-define($GLOBALS['VAR_PREFIXU'] . '_AM_REGISTER', 'Register');
68
-define($GLOBALS['VAR_PREFIXU'] . '_AM_APPROVE', 'Approve');
69
-define($GLOBALS['VAR_PREFIXU'] . '_AM_FEATURE', 'Feature');
70
-define($GLOBALS['VAR_PREFIXU'] . '_AM_UPDATE', 'Update');
71
-define($GLOBALS['VAR_PREFIXU'] . '_AM_REMOVE', 'Remove');
72
-
73
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_RELEASEDATE', 'Release date');
74
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_AUTHOR', 'Author');
75
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_CREDITS', 'Credits');
76
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_LICENSE', 'License');
77
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_WEBSITE', 'Homepage');
78
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_MODULE_INFO', 'Module info');
79
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_MODULE_STATUS', 'Status');
80
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_MODULE_TEAM', 'Team members');
81
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_AUTHOR_INFO', 'Author info');
82
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_AUTHOR_NAME', 'Author name');
83
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_AUTHOR_WORD', "Author's word");
84
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_DISCLAIMER', 'Disclaimer');
85
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_DISCLAIMER_TEXT', 'GPL-licensed');
86
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ABOUT_CHANGELOG', 'Changelog');
87
-
88
-define($GLOBALS['VAR_PREFIXU'] . '_AM_BLOGEXISTS', 'A blog with the feed already exists');
89
-
90
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ACTIONS', 'Actions');
29
+define($GLOBALS['VAR_PREFIXU'].'_AM_ARTICLE', 'Article');
30
+define($GLOBALS['VAR_PREFIXU'].'_AM_ACTION', 'Action');
31
+
32
+define($GLOBALS['VAR_PREFIXU'].'_AM_PREFERENCES', 'Module Preferences');
33
+define($GLOBALS['VAR_PREFIXU'].'_AM_ON', 'ON');
34
+define($GLOBALS['VAR_PREFIXU'].'_AM_OFF', 'OFF');
35
+define($GLOBALS['VAR_PREFIXU'].'_AM_SAFEMODE', 'safemod');
36
+define($GLOBALS['VAR_PREFIXU'].'_AM_REGISTERGLOBALS', 'register_globals');
37
+define($GLOBALS['VAR_PREFIXU'].'_AM_MAGICQUOTESGPC', 'magic_quotes_gpc');
38
+define($GLOBALS['VAR_PREFIXU'].'_AM_MAXPOSTSIZE', 'post_max_size');
39
+define($GLOBALS['VAR_PREFIXU'].'_AM_MAXINPUTTIME', 'max_input_time');
40
+define($GLOBALS['VAR_PREFIXU'].'_AM_OUTPUTBUFFERING', 'output_buffering');
41
+
42
+define($GLOBALS['VAR_PREFIXU'].'_AM_XML_EXTENSION', 'xml');
43
+define($GLOBALS['VAR_PREFIXU'].'_AM_MB_EXTENSION', 'mbstring');
44
+define($GLOBALS['VAR_PREFIXU'].'_AM_CURL', 'curl_init');
45
+define($GLOBALS['VAR_PREFIXU'].'_AM_FSOCKOPEN', 'fsockopen');
46
+define($GLOBALS['VAR_PREFIXU'].'_AM_URLFOPEN', 'allow_url_fopen');
47
+
48
+define($GLOBALS['VAR_PREFIXU'].'_AM_STATS', 'Module Stats');
49
+define($GLOBALS['VAR_PREFIXU'].'_AM_TOTAL_CATEGORIES', 'Total categories');
50
+define($GLOBALS['VAR_PREFIXU'].'_AM_TOTAL_BLOGS', 'Total Blogs');
51
+define($GLOBALS['VAR_PREFIXU'].'_AM_TOTAL_ARTICLES', 'Total articles');
52
+
53
+define($GLOBALS['VAR_PREFIXU'].'_AM_DBUPDATED', 'Database updated');
54
+define($GLOBALS['VAR_PREFIXU'].'_AM_ERROR', 'Error');
55
+
56
+define($GLOBALS['VAR_PREFIXU'].'_AM_COUNT', 'Count');
57
+define($GLOBALS['VAR_PREFIXU'].'_AM_ORDER', 'Order');
58
+define($GLOBALS['VAR_PREFIXU'].'_AM_LIST', 'List');
59
+define($GLOBALS['VAR_PREFIXU'].'_AM_BLOGCOUNT', 'Blogs');
60
+define($GLOBALS['VAR_PREFIXU'].'_AM_ARTICLECOUNT', 'Articles');
61
+
62
+define($GLOBALS['VAR_PREFIXU'].'_AM_EXPIRED', 'Expired');
63
+define($GLOBALS['VAR_PREFIXU'].'_AM_PENDING', 'Pending');
64
+define($GLOBALS['VAR_PREFIXU'].'_AM_STATUS', 'Status');
65
+define($GLOBALS['VAR_PREFIXU'].'_AM_FEED', 'Feed');
66
+
67
+define($GLOBALS['VAR_PREFIXU'].'_AM_REGISTER', 'Register');
68
+define($GLOBALS['VAR_PREFIXU'].'_AM_APPROVE', 'Approve');
69
+define($GLOBALS['VAR_PREFIXU'].'_AM_FEATURE', 'Feature');
70
+define($GLOBALS['VAR_PREFIXU'].'_AM_UPDATE', 'Update');
71
+define($GLOBALS['VAR_PREFIXU'].'_AM_REMOVE', 'Remove');
72
+
73
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_RELEASEDATE', 'Release date');
74
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_AUTHOR', 'Author');
75
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_CREDITS', 'Credits');
76
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_LICENSE', 'License');
77
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_WEBSITE', 'Homepage');
78
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_MODULE_INFO', 'Module info');
79
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_MODULE_STATUS', 'Status');
80
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_MODULE_TEAM', 'Team members');
81
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_AUTHOR_INFO', 'Author info');
82
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_AUTHOR_NAME', 'Author name');
83
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_AUTHOR_WORD', "Author's word");
84
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_DISCLAIMER', 'Disclaimer');
85
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_DISCLAIMER_TEXT', 'GPL-licensed');
86
+define($GLOBALS['VAR_PREFIXU'].'_AM_ABOUT_CHANGELOG', 'Changelog');
87
+
88
+define($GLOBALS['VAR_PREFIXU'].'_AM_BLOGEXISTS', 'A blog with the feed already exists');
89
+
90
+define($GLOBALS['VAR_PREFIXU'].'_AM_ACTIONS', 'Actions');
91 91
 
92 92
 //2.11
93
-define($GLOBALS['VAR_PREFIXU'] . '_AM_ACTIVE', 'Active');
93
+define($GLOBALS['VAR_PREFIXU'].'_AM_ACTIVE', 'Active');
Please login to merge, or discard this patch.
language/english/main.php 1 patch
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -11,92 +11,92 @@  discard block
 block discarded – undo
11 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
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
14
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
15 15
 
16
-if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MAIN')) {
16
+if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MAIN')) {
17 17
     return;
18 18
 }
19
-define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MAIN', 1);
19
+define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MAIN', 1);
20 20
 
21
-define($GLOBALS['VAR_PREFIXU'] . '_MD_INVALID', 'Invalid action');
22
-define($GLOBALS['VAR_PREFIXU'] . '_MD_NOACCESS', 'No access');
21
+define($GLOBALS['VAR_PREFIXU'].'_MD_INVALID', 'Invalid action');
22
+define($GLOBALS['VAR_PREFIXU'].'_MD_NOACCESS', 'No access');
23 23
 
24
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TITLE', 'Title');
25
-define($GLOBALS['VAR_PREFIXU'] . '_MD_AUTHOR', 'Author');
26
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SUMMARY', 'Summary');
27
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BODY', 'Text body');
28
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SORTBY', 'Sort');
24
+define($GLOBALS['VAR_PREFIXU'].'_MD_TITLE', 'Title');
25
+define($GLOBALS['VAR_PREFIXU'].'_MD_AUTHOR', 'Author');
26
+define($GLOBALS['VAR_PREFIXU'].'_MD_SUMMARY', 'Summary');
27
+define($GLOBALS['VAR_PREFIXU'].'_MD_BODY', 'Text body');
28
+define($GLOBALS['VAR_PREFIXU'].'_MD_SORTBY', 'Sort');
29 29
 
30
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SAVED', 'Data saved');
30
+define($GLOBALS['VAR_PREFIXU'].'_MD_SAVED', 'Data saved');
31 31
 //define($GLOBALS["VAR_PREFIXU"]."_MD_SUBMITTED","Submitted");;
32 32
 
33
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ALREADYBOOKMARKED', 'You have already bookmarked the blog');
34
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ALREADYRATED', 'You have already rated');
35
-define($GLOBALS['VAR_PREFIXU'] . '_MD_NOTSAVED', 'Not saved');
33
+define($GLOBALS['VAR_PREFIXU'].'_MD_ALREADYBOOKMARKED', 'You have already bookmarked the blog');
34
+define($GLOBALS['VAR_PREFIXU'].'_MD_ALREADYRATED', 'You have already rated');
35
+define($GLOBALS['VAR_PREFIXU'].'_MD_NOTSAVED', 'Not saved');
36 36
 
37
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ACTIONDONE', 'Action succeeded');
37
+define($GLOBALS['VAR_PREFIXU'].'_MD_ACTIONDONE', 'Action succeeded');
38 38
 
39
-define($GLOBALS['VAR_PREFIXU'] . '_MD_CONTENT', 'Content');
40
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ARTICLE', 'Article');
41
-define($GLOBALS['VAR_PREFIXU'] . '_MD_CATEGORY', 'Category');
42
-define($GLOBALS['VAR_PREFIXU'] . '_MD_INDEX', 'Index');
43
-define($GLOBALS['VAR_PREFIXU'] . '_MD_DISCLAIMER', 'Disclaimer');
39
+define($GLOBALS['VAR_PREFIXU'].'_MD_CONTENT', 'Content');
40
+define($GLOBALS['VAR_PREFIXU'].'_MD_ARTICLE', 'Article');
41
+define($GLOBALS['VAR_PREFIXU'].'_MD_CATEGORY', 'Category');
42
+define($GLOBALS['VAR_PREFIXU'].'_MD_INDEX', 'Index');
43
+define($GLOBALS['VAR_PREFIXU'].'_MD_DISCLAIMER', 'Disclaimer');
44 44
 
45
-define($GLOBALS['VAR_PREFIXU'] . '_MD_DATE', 'Date');
45
+define($GLOBALS['VAR_PREFIXU'].'_MD_DATE', 'Date');
46 46
 
47
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SOURCE', 'Source');
48
-define($GLOBALS['VAR_PREFIXU'] . '_MD_XMLDESC_ARTICLE', 'Article XML');
49
-define($GLOBALS['VAR_PREFIXU'] . '_MD_XMLDESC_CATEGORY', 'XML for category %s');
50
-define($GLOBALS['VAR_PREFIXU'] . '_MD_XMLDESC_BOOKMARK', 'XML for bookmark %s');
51
-define($GLOBALS['VAR_PREFIXU'] . '_MD_XMLDESC_BLOG', 'XML for blog %s');
52
-define($GLOBALS['VAR_PREFIXU'] . '_MD_XMLDESC_INDEX', 'XML for index page');
47
+define($GLOBALS['VAR_PREFIXU'].'_MD_SOURCE', 'Source');
48
+define($GLOBALS['VAR_PREFIXU'].'_MD_XMLDESC_ARTICLE', 'Article XML');
49
+define($GLOBALS['VAR_PREFIXU'].'_MD_XMLDESC_CATEGORY', 'XML for category %s');
50
+define($GLOBALS['VAR_PREFIXU'].'_MD_XMLDESC_BOOKMARK', 'XML for bookmark %s');
51
+define($GLOBALS['VAR_PREFIXU'].'_MD_XMLDESC_BLOG', 'XML for blog %s');
52
+define($GLOBALS['VAR_PREFIXU'].'_MD_XMLDESC_INDEX', 'XML for index page');
53 53
 
54
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TEXT', 'Text');
54
+define($GLOBALS['VAR_PREFIXU'].'_MD_TEXT', 'Text');
55 55
 
56
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BLOG', 'Blog');
57
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BOOKMARK', 'Bookmark');
56
+define($GLOBALS['VAR_PREFIXU'].'_MD_BLOG', 'Blog');
57
+define($GLOBALS['VAR_PREFIXU'].'_MD_BOOKMARK', 'Bookmark');
58 58
 //define($GLOBALS["VAR_PREFIXU"]."_MD_TRACKBACKS","Trackback");
59 59
 //define($GLOBALS["VAR_PREFIXU"]."_MD_NOTIFY_ON_APPROVAL","Notify of approval");
60 60
 
61
-define($GLOBALS['VAR_PREFIXU'] . '_MD_DESC', 'Description');
62
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ORDER', 'Order');
63
-
64
-define($GLOBALS['VAR_PREFIXU'] . '_MD_RSS', 'RSS');
65
-define($GLOBALS['VAR_PREFIXU'] . '_MD_RDF', 'RDF');
66
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ATOM', 'ATOM');
67
-define($GLOBALS['VAR_PREFIXU'] . '_MD_OPML', 'OPML');
68
-
69
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ARTICLES', 'Articles');
70
-define($GLOBALS['VAR_PREFIXU'] . '_MD_FEATURED', 'Featured');
71
-define($GLOBALS['VAR_PREFIXU'] . '_MD_CATEGORIES', 'Categories');
72
-
73
-define($GLOBALS['VAR_PREFIXU'] . '_MD_LANGUAGE', 'Language');
74
-define($GLOBALS['VAR_PREFIXU'] . '_MD_CHARSET', 'Charset');
75
-define($GLOBALS['VAR_PREFIXU'] . '_MD_IMAGE', 'Image');
76
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TRACKBACKPATTERN', 'Trackback pattern');
77
-define($GLOBALS['VAR_PREFIXU'] . '_MD_STATUS', 'Status');
78
-define($GLOBALS['VAR_PREFIXU'] . '_MD_URL', 'URL');
79
-define($GLOBALS['VAR_PREFIXU'] . '_MD_LINK', 'Link');
80
-define($GLOBALS['VAR_PREFIXU'] . '_MD_FEED', 'Feed');
81
-define($GLOBALS['VAR_PREFIXU'] . '_MD_FETCH', 'Fetch');
82
-define($GLOBALS['VAR_PREFIXU'] . '_MD_UPDATE', 'Update');
83
-define($GLOBALS['VAR_PREFIXU'] . '_MD_LASTUPDATE', 'Update');
84
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TRACKBACK', 'Trackback');
85
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SUBMITTER', 'Submitter');
86
-define($GLOBALS['VAR_PREFIXU'] . '_MD_VIEWS', 'Views');
87
-define($GLOBALS['VAR_PREFIXU'] . '_MD_RATE', 'Rate');
88
-define($GLOBALS['VAR_PREFIXU'] . '_MD_RATEIT', 'Rate it!');
89
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TIME', 'Time');
90
-
91
-define($GLOBALS['VAR_PREFIXU'] . '_MD_UPDATED', 'The blog is updated with %s articles inserted');
92
-define($GLOBALS['VAR_PREFIXU'] . '_MD_DBUPDATED', 'Database has been updated');
93
-
94
-define($GLOBALS['VAR_PREFIXU'] . '_MD_PREVIOUS', '<<');
95
-define($GLOBALS['VAR_PREFIXU'] . '_MD_NEXT', '>>');
96
-
97
-define($GLOBALS['VAR_PREFIXU'] . '_MD_PENDING', 'Pending');
98
-define($GLOBALS['VAR_PREFIXU'] . '_MD_ACTIVE', 'Active');
99
-define($GLOBALS['VAR_PREFIXU'] . '_MD_EXPIRED', 'Expired');
61
+define($GLOBALS['VAR_PREFIXU'].'_MD_DESC', 'Description');
62
+define($GLOBALS['VAR_PREFIXU'].'_MD_ORDER', 'Order');
63
+
64
+define($GLOBALS['VAR_PREFIXU'].'_MD_RSS', 'RSS');
65
+define($GLOBALS['VAR_PREFIXU'].'_MD_RDF', 'RDF');
66
+define($GLOBALS['VAR_PREFIXU'].'_MD_ATOM', 'ATOM');
67
+define($GLOBALS['VAR_PREFIXU'].'_MD_OPML', 'OPML');
68
+
69
+define($GLOBALS['VAR_PREFIXU'].'_MD_ARTICLES', 'Articles');
70
+define($GLOBALS['VAR_PREFIXU'].'_MD_FEATURED', 'Featured');
71
+define($GLOBALS['VAR_PREFIXU'].'_MD_CATEGORIES', 'Categories');
72
+
73
+define($GLOBALS['VAR_PREFIXU'].'_MD_LANGUAGE', 'Language');
74
+define($GLOBALS['VAR_PREFIXU'].'_MD_CHARSET', 'Charset');
75
+define($GLOBALS['VAR_PREFIXU'].'_MD_IMAGE', 'Image');
76
+define($GLOBALS['VAR_PREFIXU'].'_MD_TRACKBACKPATTERN', 'Trackback pattern');
77
+define($GLOBALS['VAR_PREFIXU'].'_MD_STATUS', 'Status');
78
+define($GLOBALS['VAR_PREFIXU'].'_MD_URL', 'URL');
79
+define($GLOBALS['VAR_PREFIXU'].'_MD_LINK', 'Link');
80
+define($GLOBALS['VAR_PREFIXU'].'_MD_FEED', 'Feed');
81
+define($GLOBALS['VAR_PREFIXU'].'_MD_FETCH', 'Fetch');
82
+define($GLOBALS['VAR_PREFIXU'].'_MD_UPDATE', 'Update');
83
+define($GLOBALS['VAR_PREFIXU'].'_MD_LASTUPDATE', 'Update');
84
+define($GLOBALS['VAR_PREFIXU'].'_MD_TRACKBACK', 'Trackback');
85
+define($GLOBALS['VAR_PREFIXU'].'_MD_SUBMITTER', 'Submitter');
86
+define($GLOBALS['VAR_PREFIXU'].'_MD_VIEWS', 'Views');
87
+define($GLOBALS['VAR_PREFIXU'].'_MD_RATE', 'Rate');
88
+define($GLOBALS['VAR_PREFIXU'].'_MD_RATEIT', 'Rate it!');
89
+define($GLOBALS['VAR_PREFIXU'].'_MD_TIME', 'Time');
90
+
91
+define($GLOBALS['VAR_PREFIXU'].'_MD_UPDATED', 'The blog is updated with %s articles inserted');
92
+define($GLOBALS['VAR_PREFIXU'].'_MD_DBUPDATED', 'Database has been updated');
93
+
94
+define($GLOBALS['VAR_PREFIXU'].'_MD_PREVIOUS', '<<');
95
+define($GLOBALS['VAR_PREFIXU'].'_MD_NEXT', '>>');
96
+
97
+define($GLOBALS['VAR_PREFIXU'].'_MD_PENDING', 'Pending');
98
+define($GLOBALS['VAR_PREFIXU'].'_MD_ACTIVE', 'Active');
99
+define($GLOBALS['VAR_PREFIXU'].'_MD_EXPIRED', 'Expired');
100 100
 
101 101
 /*
102 102
 define($GLOBALS["VAR_PREFIXU"]."_MD_TYPES", "Types");
@@ -113,22 +113,22 @@  discard block
 block discarded – undo
113 113
 define($GLOBALS["VAR_PREFIXU"]."_MD_VIEWALL","View full text");
114 114
 */
115 115
 
116
-define($GLOBALS['VAR_PREFIXU'] . '_MD_COMMENTS', 'Comments');
117
-define($GLOBALS['VAR_PREFIXU'] . '_MD_CLICKTOCOPY', 'Click to copy');
116
+define($GLOBALS['VAR_PREFIXU'].'_MD_COMMENTS', 'Comments');
117
+define($GLOBALS['VAR_PREFIXU'].'_MD_CLICKTOCOPY', 'Click to copy');
118 118
 
119
-define($GLOBALS['VAR_PREFIXU'] . '_MD_SORT', 'Sort');
119
+define($GLOBALS['VAR_PREFIXU'].'_MD_SORT', 'Sort');
120 120
 
121
-define($GLOBALS['VAR_PREFIXU'] . '_MD_FULLVIEW', 'Fulltext');
122
-define($GLOBALS['VAR_PREFIXU'] . '_MD_LISTVIEW', 'List');
123
-define($GLOBALS['VAR_PREFIXU'] . '_MD_RATING', 'Rating');
124
-define($GLOBALS['VAR_PREFIXU'] . '_MD_DEFAULT', 'Default');
125
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BLOGS', 'Blogs');
126
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BOOKMARKS', 'Bookmarks');
127
-define($GLOBALS['VAR_PREFIXU'] . '_MD_HOME', 'Home');
121
+define($GLOBALS['VAR_PREFIXU'].'_MD_FULLVIEW', 'Fulltext');
122
+define($GLOBALS['VAR_PREFIXU'].'_MD_LISTVIEW', 'List');
123
+define($GLOBALS['VAR_PREFIXU'].'_MD_RATING', 'Rating');
124
+define($GLOBALS['VAR_PREFIXU'].'_MD_DEFAULT', 'Default');
125
+define($GLOBALS['VAR_PREFIXU'].'_MD_BLOGS', 'Blogs');
126
+define($GLOBALS['VAR_PREFIXU'].'_MD_BOOKMARKS', 'Bookmarks');
127
+define($GLOBALS['VAR_PREFIXU'].'_MD_HOME', 'Home');
128 128
 
129
-define($GLOBALS['VAR_PREFIXU'] . '_MD_BLOGEXISTS', 'A blog with the feed already exists');
130
-define($GLOBALS['VAR_PREFIXU'] . '_MD_EMPTY_BLOG', 'Empty');
129
+define($GLOBALS['VAR_PREFIXU'].'_MD_BLOGEXISTS', 'A blog with the feed already exists');
130
+define($GLOBALS['VAR_PREFIXU'].'_MD_EMPTY_BLOG', 'Empty');
131 131
 
132
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TRANSFER', 'Transfer');
133
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TRANSFER_DESC', 'Transfer the article to other applications');
134
-define($GLOBALS['VAR_PREFIXU'] . '_MD_TRANSFER_DONE', 'The action is done successully: %s');
132
+define($GLOBALS['VAR_PREFIXU'].'_MD_TRANSFER', 'Transfer');
133
+define($GLOBALS['VAR_PREFIXU'].'_MD_TRANSFER_DESC', 'Transfer the article to other applications');
134
+define($GLOBALS['VAR_PREFIXU'].'_MD_TRANSFER_DONE', 'The action is done successully: %s');
Please login to merge, or discard this patch.
language/english/modinfo.php 2 patches
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.
Spacing   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -11,117 +11,117 @@
 block discarded – undo
11 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
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
14
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
15 15
 
16
-if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO')) {
16
+if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO')) {
17 17
     return;
18 18
 }
19
-define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO', 1);
20
-
21
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NAME', 'Planet');
22
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DESC', 'Feed Planet For Xoops');
23
-
24
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_INDEX', 'Index');
25
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARTICLE', 'Article');
26
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARCHIVE', 'Archive');
27
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_LIST', 'List');
28
-
29
-define($GLOBALS['VAR_PREFIXU'] . '_MI_SUBMIT', 'Submit');
30
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE', 'Articles');
31
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_DESC', '');
32
-define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY', 'Categories');
33
-define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY_DESC', '');
34
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG', 'BLogs');
35
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_DESC', '');
36
-
37
-define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET', 'Theme set');
38
-define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC', "Module-wide, select '" . _NONE . "' will use site-wide theme");
39
-
40
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT', 'Time format for display');
41
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC', '');
42
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM', 'Custom');
43
-
44
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY', 'Display summary length on article list');
45
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC', '0 for full text');
46
-
47
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG', 'Enable debug');
48
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC', '');
49
-
50
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE', 'Enable URL rewrite');
51
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required');
52
-
53
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING', 'Enable sibling articles');
54
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC', '');
55
-
56
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE', 'Articles on one page');
57
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC', '');
58
-
59
-define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE', 'Lists on one page');
60
-define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC', '');
61
-
62
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE', 'Blogs for each update');
63
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC', '');
64
-
65
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE', 'Time for article to expire');
66
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC', 'In days');
67
-
68
-define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT', 'Copyright');
69
-define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC', '');
70
-
71
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PING', 'Pings');
72
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC', 'URLs to ping');
73
-
74
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks');
75
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC', '');
76
-
77
-define($GLOBALS['VAR_PREFIXU'] . '_MI_MODERATION', 'Moderator to approve');
78
-define($GLOBALS['VAR_PREFIXU'] . '_MI_MEMBER', 'Member atuo-approve');
79
-
80
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog');
81
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC', '');
82
-
83
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE', 'Allow anonymous to rate');
84
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC', '');
85
-
86
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON', 'Pseudo cron');
87
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs');
88
-
89
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_INDEX', 'Index');
90
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_CATEGORY', 'Category');
91
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOG', 'Blog');
92
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ARTICLE', 'Article');
93
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOCK', 'Block');
94
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ABOUT', 'About');
95
-
96
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFY', 'Global');
97
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFYDSC', 'Global notification options');
98
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFY', 'Blog');
99
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFYDSC', 'Blog notification options');
100
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFY', 'Article');
101
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFYDSC', 'Article notification options');
102
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission');
103
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog');
104
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted');
105
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted');
106
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog');
107
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published');
108
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published');
109
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published');
110
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor');
111
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles');
112
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles');
113
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action');
114
-
115
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved');
116
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog');
117
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved');
118
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved');
119
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated');
120
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog');
121
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated');
122
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated');
123
-
124
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor');
125
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article');
126
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article');
127
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published');
19
+define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO', 1);
20
+
21
+define($GLOBALS['VAR_PREFIXU'].'_MI_NAME', 'Planet');
22
+define($GLOBALS['VAR_PREFIXU'].'_MI_DESC', 'Feed Planet For Xoops');
23
+
24
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_INDEX', 'Index');
25
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARTICLE', 'Article');
26
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARCHIVE', 'Archive');
27
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_LIST', 'List');
28
+
29
+define($GLOBALS['VAR_PREFIXU'].'_MI_SUBMIT', 'Submit');
30
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE', 'Articles');
31
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_DESC', '');
32
+define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY', 'Categories');
33
+define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY_DESC', '');
34
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG', 'BLogs');
35
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_DESC', '');
36
+
37
+define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET', 'Theme set');
38
+define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC', "Module-wide, select '"._NONE."' will use site-wide theme");
39
+
40
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT', 'Time format for display');
41
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC', '');
42
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM', 'Custom');
43
+
44
+define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY', 'Display summary length on article list');
45
+define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC', '0 for full text');
46
+
47
+define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG', 'Enable debug');
48
+define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC', '');
49
+
50
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE', 'Enable URL rewrite');
51
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required');
52
+
53
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING', 'Enable sibling articles');
54
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC', '');
55
+
56
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE', 'Articles on one page');
57
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC', '');
58
+
59
+define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE', 'Lists on one page');
60
+define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC', '');
61
+
62
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE', 'Blogs for each update');
63
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC', '');
64
+
65
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE', 'Time for article to expire');
66
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC', 'In days');
67
+
68
+define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT', 'Copyright');
69
+define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC', '');
70
+
71
+define($GLOBALS['VAR_PREFIXU'].'_MI_PING', 'Pings');
72
+define($GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC', 'URLs to ping');
73
+
74
+define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks');
75
+define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC', '');
76
+
77
+define($GLOBALS['VAR_PREFIXU'].'_MI_MODERATION', 'Moderator to approve');
78
+define($GLOBALS['VAR_PREFIXU'].'_MI_MEMBER', 'Member atuo-approve');
79
+
80
+define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog');
81
+define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC', '');
82
+
83
+define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE', 'Allow anonymous to rate');
84
+define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC', '');
85
+
86
+define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON', 'Pseudo cron');
87
+define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs');
88
+
89
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_INDEX', 'Index');
90
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_CATEGORY', 'Category');
91
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOG', 'Blog');
92
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ARTICLE', 'Article');
93
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOCK', 'Block');
94
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ABOUT', 'About');
95
+
96
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFY', 'Global');
97
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFYDSC', 'Global notification options');
98
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFY', 'Blog');
99
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFYDSC', 'Blog notification options');
100
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFY', 'Article');
101
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFYDSC', 'Article notification options');
102
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission');
103
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog');
104
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted');
105
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted');
106
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog');
107
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published');
108
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published');
109
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published');
110
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor');
111
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles');
112
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles');
113
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action');
114
+
115
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved');
116
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog');
117
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved');
118
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved');
119
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated');
120
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog');
121
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated');
122
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated');
123
+
124
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor');
125
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article');
126
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article');
127
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published');
Please login to merge, or discard this patch.
update.php 2 patches
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.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 $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
-if ($blog_id > 0) {
33
+if ($blog_id>0) {
34 34
     $blog  = $blogHandler->get($blog_id);
35 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));
36
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php?blog='.$blog_id, 2, sprintf(planet_constant('MD_UPDATED'), (int) $count));
37 37
 }
38
-if (planetGetCookie('upd') + 30 * 60 > time()) {
38
+if (planetGetCookie('upd')+30*60>time()) {
39 39
     return;
40 40
 }
41 41
 PlanetUtility::planetSetCookie('upd', time());
42 42
 $start = 0;
43
-@include XOOPS_CACHE_PATH . '/' . $xoopsModule->getVar('dirname') . '_update.php';
43
+@include XOOPS_CACHE_PATH.'/'.$xoopsModule->getVar('dirname').'_update.php';
44 44
 $criteria = new Criteria('blog_status', 0, '>');
45 45
 $criteria->setSort('blog_id');
46 46
 $criteria->setStart($start);
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
     $blogHandler->do_update($blogs[$id]);
51 51
 }
52 52
 $start += count($blogs);
53
-if (count($blogs) < $xoopsModuleConfig['blogs_perupdate']) {
53
+if (count($blogs)<$xoopsModuleConfig['blogs_perupdate']) {
54 54
     $start = 0;
55 55
 }
56
-$fp = fopen(XOOPS_CACHE_PATH . '/' . $xoopsModule->getVar('dirname') . '_update.php', 'w');
56
+$fp = fopen(XOOPS_CACHE_PATH.'/'.$xoopsModule->getVar('dirname').'_update.php', 'w');
57 57
 if (!$fp) {
58 58
     return;
59 59
 }
60
-fwrite($fp, "<?php\n \$start=" . (int)$start . ";\n?>");
60
+fwrite($fp, "<?php\n \$start=".(int) $start.";\n?>");
61 61
 fclose($fp);
Please login to merge, or discard this patch.