Completed
Push — master ( adb512...260239 )
by Michael
03:10
created
action.article.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-include __DIR__ . '/header.php';
28
+include __DIR__.'/header.php';
29 29
 
30
-$art_id = (int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0));
30
+$art_id = (int) (isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0));
31 31
 if (empty($art_id)) {
32 32
     redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID'));
33 33
 }
34 34
 if (!$xoopsUser->isAdmin()) {
35 35
     redirect_header('javascript:history.go(-1);', 2, _NOPERM);
36 36
 }
37
-include XOOPS_ROOT_PATH . '/header.php';
38
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
37
+include XOOPS_ROOT_PATH.'/header.php';
38
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
39 39
 
40 40
 $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
41 41
 $article_obj     = $article_handler->get($art_id);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 if ($op === 'del' || !empty($_POST['del'])) {
46 46
     $article_handler->delete($article_obj);
47
-    $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
47
+    $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
48 48
     $message  = planet_constant('MD_SAVED');
49 49
     redirect_header($redirect, 2, $message);
50 50
 } elseif ($op === 'save') {
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
 
66 66
     $art_id_new = $article_handler->insert($article_obj);
67 67
     if (!$article_obj->getVar('art_id')) {
68
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
68
+        $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
69 69
         $message  = planet_constant('MD_INSERTERROR');
70
-    } else {
71
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . ''
70
+    }else {
71
+        $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''
72 72
                     . $article_obj->getVar('art_id');
73 73
         $message  = planet_constant('MD_SAVED');
74 74
     }
75 75
     redirect_header($redirect, 2, $message);
76
-} else {
77
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
76
+}else {
77
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
78 78
 
79 79
     $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'));
80 80
 
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
     $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'");
98 98
     $button_tray->addElement($butt_del);
99 99
     $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
100
-    $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname']
101
-                           . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'");
100
+    $butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']
101
+                           . '/view.article.php'.URL_DELIMITER.''.(int) $art_id."\"'");
102 102
     $button_tray->addElement($butt_cancel);
103 103
     $form->addElement($button_tray);
104 104
     $form->display();
105 105
 }
106
-include XOOPS_ROOT_PATH . '/footer.php';
106
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view.archive.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // URL: http://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/header.php';
27
+include __DIR__.'/header.php';
28 28
 
29 29
 if (planet_parse_args($args_num, $args, $args_str)) {
30 30
     $args['year']  = @$args_num[0];
@@ -32,37 +32,37 @@  discard block
 block discarded – undo
32 32
     $args['day']   = @$args_num[2];
33 33
 }
34 34
 
35
-$day     = (int)(empty($_GET['day']) ? @$args['day'] : $_GET['day']);
36
-$year    = (int)(empty($_GET['year']) ? @$args['year'] : $_GET['year']);
37
-$month   = (int)(empty($_GET['month']) ? @$args['month'] : $_GET['month']);
38
-$blog_id = (int)(empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
39
-$start   = (int)(empty($_GET['start']) ? @$args['start'] : $_GET['start']);
35
+$day     = (int) (empty($_GET['day']) ? @$args['day'] : $_GET['day']);
36
+$year    = (int) (empty($_GET['year']) ? @$args['year'] : $_GET['year']);
37
+$month   = (int) (empty($_GET['month']) ? @$args['month'] : $_GET['month']);
38
+$blog_id = (int) (empty($_GET['blog']) ? @$args['blog'] : $_GET['blog']);
39
+$start   = (int) (empty($_GET['start']) ? @$args['start'] : $_GET['start']);
40 40
 
41 41
 $page['title'] = planet_constant('MD_ACHIVE');
42 42
 
43 43
 $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
44 44
 $blog_handler    = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
45 45
 
46
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_ACHIVE');
46
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_ACHIVE');
47 47
 $xoopsOption['template_main']   = planet_getTemplate('archive');
48
-include_once XOOPS_ROOT_PATH . '/header.php';
49
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
48
+include_once XOOPS_ROOT_PATH.'/header.php';
49
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
50 50
 
51 51
 $year = empty($year) ? date('Y') : $year;
52
-if ($month < 1) {
52
+if ($month<1) {
53 53
     $month        = $day = 0;
54 54
     $page['time'] = sprintf(planet_constant('MD_TIME_Y'), $year);
55
-} elseif ($day < 1) {
55
+} elseif ($day<1) {
56 56
     $day          = 0;
57 57
     $page['time'] = sprintf(planet_constant('MD_TIME_YM'), $year, $month);
58
-} else {
58
+}else {
59 59
     $page['time'] = sprintf(planet_constant('MD_TIME_YMD'), $year, $month, $day);
60 60
 }
61 61
 $time = array('year' => $year, 'month' => $month, 'day' => $day);
62 62
 if ($xoopsUser) {
63
-    $timeoffset = ($xoopsUser->getVar('timezone_offset') - $xoopsConfig['server_TZ']) * 3600;
64
-} else {
65
-    $timeoffset = ($xoopsConfig['default_TZ'] - $xoopsConfig['server_TZ']) * 3600;
63
+    $timeoffset = ($xoopsUser->getVar('timezone_offset')-$xoopsConfig['server_TZ'])*3600;
64
+}else {
65
+    $timeoffset = ($xoopsConfig['default_TZ']-$xoopsConfig['server_TZ'])*3600;
66 66
 }
67 67
 
68 68
 $criteria = new CriteriaCompo();
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 $criteria->setStart($start);
80 80
 $criteria->setLimit($xoopsModuleConfig['articles_perpage']);
81 81
 
82
-$articles_obj   =& $article_handler->getAll($criteria, array('uid', 'art_title', 'art_time', 'blog_id', 'art_content'));
82
+$articles_obj   = & $article_handler->getAll($criteria, array('uid', 'art_title', 'art_time', 'blog_id', 'art_content'));
83 83
 $articles_count = $article_handler->getCount($criteria);
84 84
 
85 85
 $articles = array();
86 86
 $blogs_id = array();
87 87
 foreach ($articles_obj as $id => $article) {
88
-    $articles[]                            = array(
88
+    $articles[] = array(
89 89
         'id'      => $id,
90 90
         'blog'    => array('id' => $article->getVar('blog_id'), 'title' => ''),
91 91
         'title'   => $article->getVar('art_title'),
@@ -96,22 +96,22 @@  discard block
 block discarded – undo
96 96
     $blogs_id[$article->getVar('blog_id')] = 1;
97 97
     unset($_article);
98 98
 }
99
-$criteria_blog = new Criteria('blog_id', '(' . implode(',', array_keys($blog_array)) . ')', 'IN');
99
+$criteria_blog = new Criteria('blog_id', '('.implode(',', array_keys($blog_array)).')', 'IN');
100 100
 $blogs         = $blog_handler->getList($criteria_blog);
101 101
 foreach (array_keys($articles) as $key) {
102 102
     $articles[$key]['blog']['title'] = $blogs[$articles[$key]['blog']['id']];
103 103
 }
104
-if ($blog_id > 0) {
105
-    $page['blog'] = $blogs[$blog_id];;
104
+if ($blog_id>0) {
105
+    $page['blog'] = $blogs[$blog_id]; ;
106 106
 }
107 107
 
108
-if ($articles_count > $xoopsModuleConfig['articles_perpage']) {
109
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
108
+if ($articles_count>$xoopsModuleConfig['articles_perpage']) {
109
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
110 110
     $nav     = new XoopsPageNav($articles_count, $xoopsModuleConfig['articles_perpage'], $start, 'start',
111
-                                'month=' . $month . '&amp;day=' . $day . '&amp;year=' . $year . '&amp;blog='
112
-                                . (int)$blog_id);
111
+                                'month='.$month.'&amp;day='.$day.'&amp;year='.$year.'&amp;blog='
112
+                                . (int) $blog_id);
113 113
     $pagenav = $nav->renderNav(4);
114
-} else {
114
+}else {
115 115
     $pagenav = '';
116 116
 }
117 117
 
@@ -120,46 +120,46 @@  discard block
 block discarded – undo
120 120
 $months   = null;
121 121
 if (empty($start)) {
122 122
     if ($blog_id) {
123
-        $blog_criteria = ' AND blog_id=' . $blog_id;
124
-    } else {
123
+        $blog_criteria = ' AND blog_id='.$blog_id;
124
+    }else {
125 125
         $blog_criteria = '';
126 126
     }
127 127
     // Get monthly list
128 128
     if (empty($month)) {
129
-        $sql    = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count
130
-            FROM " . planet_DB_prefix('article') . "
129
+        $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count
130
+            FROM ".planet_DB_prefix('article')."
131 131
             WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year
132
-            " . $blog_criteria . '
132
+            ".$blog_criteria.'
133 133
             GROUP BY mon
134 134
             ';
135 135
         $result = $xoopsDB->query($sql);
136 136
         $months = array();
137 137
         while ($myrow = $xoopsDB->fetchArray($result)) {
138 138
             $months[] = array(
139
-                'title' => planet_constant('MD_MONTH_' . (int)$myrow['mon']) . ' (' . (int)$myrow['count'] . ')',
140
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
141
-                           . $year . '/' . $myrow['mon'] . '/b' . $blog_id
139
+                'title' => planet_constant('MD_MONTH_'.(int) $myrow['mon']).' ('.(int) $myrow['count'].')',
140
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
141
+                           . $year.'/'.$myrow['mon'].'/b'.$blog_id
142 142
             );
143 143
         }
144 144
         $timenav['prev'] = array(
145
-            'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
146
-                       . ($year - 1) . '/b' . $blog_id,
147
-            'title' => sprintf(planet_constant('MD_TIME_Y'), $year - 1)
145
+            'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
146
+                       . ($year-1).'/b'.$blog_id,
147
+            'title' => sprintf(planet_constant('MD_TIME_Y'), $year-1)
148 148
         );
149
-        if ($year < date('Y')) {
149
+        if ($year<date('Y')) {
150 150
             $timenav['next'] = array(
151
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
152
-                           . ($year + 1) . '/b' . $blog_id,
153
-                'title' => sprintf(planet_constant('MD_TIME_Y'), $year + 1)
151
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
152
+                           . ($year+1).'/b'.$blog_id,
153
+                'title' => sprintf(planet_constant('MD_TIME_Y'), $year+1)
154 154
             );
155 155
         }
156 156
     } // Get daily list
157 157
     elseif (empty($day)) {
158
-        $sql    = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count
159
-            FROM " . planet_DB_prefix('article') . "
158
+        $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count
159
+            FROM ".planet_DB_prefix('article')."
160 160
             WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year
161 161
             AND MONTH(FROM_UNIXTIME(art_time - $timeoffset)) = $month
162
-            " . $blog_criteria . '
162
+            ".$blog_criteria.'
163 163
             GROUP BY day
164 164
             ';
165 165
         $result = $xoopsDB->query($sql);
@@ -167,38 +167,38 @@  discard block
 block discarded – undo
167 167
         while ($myrow = $xoopsDB->fetchArray($result)) {
168 168
             $days[$myrow['day']]['count'] = $myrow['count'];
169 169
         }
170
-        for ($i = 1; $i <= 31; ++$i) {
170
+        for ($i = 1; $i<=31; ++$i) {
171 171
             if (!isset($days[$i])) {
172 172
                 continue;
173 173
             }
174 174
             $days[$i] = array(
175 175
                 'title' => $days[$i]['count'],
176
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
177
-                           . $year . '/' . $month . '/' . $i . '/b' . $blog_id
176
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
177
+                           . $year.'/'.$month.'/'.$i.'/b'.$blog_id
178 178
             );
179 179
         }
180 180
         $calendar   = planet_getCalendar($year, $month, $days);
181
-        $month_next = $month + 1;
182
-        $month_prev = $month - 1;
181
+        $month_next = $month+1;
182
+        $month_prev = $month-1;
183 183
         $_year      = $year;
184 184
         if ($month == 12) {
185 185
             $month_next = 1;
186
-            $_year      = $year + 1;
186
+            $_year      = $year+1;
187 187
         }
188 188
         if ($month == 1) {
189 189
             $month_pre = 12;
190
-            $_year     = $year - 1;
190
+            $_year     = $year-1;
191 191
         }
192 192
         $timenav['prev'] = array(
193
-            'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
194
-                       . $_year . '/' . $month_prev . '/b' . $blog_id,
195
-            'title' => planet_constant('MD_MONTH_' . $month_prev)
193
+            'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
194
+                       . $_year.'/'.$month_prev.'/b'.$blog_id,
195
+            'title' => planet_constant('MD_MONTH_'.$month_prev)
196 196
         );
197
-        if ($year < date('Y') || $month < date('n')) {
197
+        if ($year<date('Y') || $month<date('n')) {
198 198
             $timenav['next'] = array(
199
-                'url'   => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.archive.php' . URL_DELIMITER . ''
200
-                           . $_year . '/' . $month_next . '/b' . $blog_id,
201
-                'title' => planet_constant('MD_MONTH_' . $month_next)
199
+                'url'   => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.archive.php'.URL_DELIMITER.''
200
+                           . $_year.'/'.$month_next.'/b'.$blog_id,
201
+                'title' => planet_constant('MD_MONTH_'.$month_next)
202 202
             );
203 203
         }
204 204
     }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 $xoopsTpl->assign('timenav', $timenav);
219 219
 $xoopsTpl->assign('pagenav', $pagenav);
220 220
 
221
-include_once __DIR__ . '/footer.php';
221
+include_once __DIR__.'/footer.php';
222 222
 
223 223
 /**
224 224
  * @param null $year
@@ -234,25 +234,25 @@  discard block
 block discarded – undo
234 234
     ob_start();
235 235
     echo '<table id="calendar">';
236 236
     echo '<caption>';
237
-    printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_' . $month));
237
+    printf(planet_constant('MD_TIME_YM'), $year, planet_constant('MD_MONTH_'.$month));
238 238
     echo '</caption>';
239 239
 
240
-    for ($i = 1; $i <= 7; ++$i) {
241
-        echo "\n\t\t<th abbr=\"" . planet_constant('MD_WEEK_' . $i) . "\" scope=\"col\" title=\""
242
-             . planet_constant('MD_WEEK_' . $i) . "\">" . planet_constant('MD_WEEK_' . $i) . '</th>';
240
+    for ($i = 1; $i<=7; ++$i) {
241
+        echo "\n\t\t<th abbr=\"".planet_constant('MD_WEEK_'.$i)."\" scope=\"col\" title=\""
242
+             . planet_constant('MD_WEEK_'.$i)."\">".planet_constant('MD_WEEK_'.$i).'</th>';
243 243
     }
244 244
 
245 245
     echo '<tr>';
246 246
 
247 247
     // See how much we should pad in the beginning
248 248
     $week_begins = 1;
249
-    $pad         = planet_calendar_week_mod(date('w', $unixmonth) - $week_begins);
249
+    $pad         = planet_calendar_week_mod(date('w', $unixmonth)-$week_begins);
250 250
     if (0 != $pad) {
251
-        echo "\n\t\t" . '<td colspan="' . $pad . '">&nbsp;</td>';
251
+        echo "\n\t\t".'<td colspan="'.$pad.'">&nbsp;</td>';
252 252
     }
253 253
 
254
-    $daysinmonth = (int)date('t', $unixmonth);
255
-    for ($day = 1; $day <= $daysinmonth; ++$day) {
254
+    $daysinmonth = (int) date('t', $unixmonth);
255
+    for ($day = 1; $day<=$daysinmonth; ++$day) {
256 256
         if (isset($newrow) && $newrow) {
257 257
             echo "\n\t</tr>\n\t<tr>\n\t\t";
258 258
         }
@@ -261,26 +261,26 @@  discard block
 block discarded – undo
261 261
         echo '<td>';
262 262
 
263 263
         if (!empty($days[$day]['url'])) {
264
-            echo '<a href="' . $days[$day]['url'] . "\"";
264
+            echo '<a href="'.$days[$day]['url']."\"";
265 265
             if (!empty($days[$day]['title'])) {
266
-                echo "title=\"" . $days[$day]['title'] . "\"";
266
+                echo "title=\"".$days[$day]['title']."\"";
267 267
             }
268 268
             echo ">$day</a>";
269 269
         } elseif (!empty($days[$day]['title'])) {
270
-            echo "<acronym title=\"" . $days[$day]['title'] . "\">$day</acronym>";
271
-        } else {
270
+            echo "<acronym title=\"".$days[$day]['title']."\">$day</acronym>";
271
+        }else {
272 272
             echo $day;
273 273
         }
274 274
         echo '</td>';
275 275
 
276
-        if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins)) {
276
+        if (6 == planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins)) {
277 277
             $newrow = true;
278 278
         }
279 279
     }
280 280
 
281
-    $pad = 7 - planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year)) - $week_begins);
281
+    $pad = 7-planet_calendar_week_mod(date('w', mktime(0, 0, 0, $month, $day, $year))-$week_begins);
282 282
     if ($pad != 0 && $pad != 7) {
283
-        echo "\n\t\t" . '<td class="pad" colspan="' . $pad . '">&nbsp;</td>';
283
+        echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';
284 284
     }
285 285
 
286 286
     echo "\n\t</tr>\n\t</tbody>\n\t</table>";
@@ -298,5 +298,5 @@  discard block
 block discarded – undo
298 298
 function planet_calendar_week_mod($num) {
299 299
     $base = 7;
300 300
 
301
-    return ($num - $base * floor($num / $base));
301
+    return ($num-$base*floor($num/$base));
302 302
 }
Please login to merge, or discard this patch.
transfer.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -12,64 +12,64 @@  discard block
 block discarded – undo
12 12
  * @package     Frameworks::transfer ; module::planet
13 13
  */
14 14
 
15
-include __DIR__ . '/header.php';
15
+include __DIR__.'/header.php';
16 16
 
17 17
 if (planet_parse_args($args_num, $args, $args_str)) {
18 18
     $args['article'] = @$args_num[0];
19 19
     $args['op']      = @$args_str[0];
20 20
 }
21 21
 
22
-$article_id = (int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']);
22
+$article_id = (int) (empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']);
23 23
 
24 24
 $op = empty($_GET['op']) ? (empty($_POST['op']) ? @$args['op'] : $_POST['op']) : $_GET['op'];
25 25
 $op = strtolower(trim($op));
26 26
 
27 27
 if (empty($article_id)) {
28 28
     if (empty($_SERVER['HTTP_REFERER'])) {
29
-        include XOOPS_ROOT_PATH . '/header.php';
29
+        include XOOPS_ROOT_PATH.'/header.php';
30 30
         xoops_error(_NOPERM);
31 31
         $xoopsOption['output_type'] = 'plain';
32
-        include XOOPS_ROOT_PATH . '/footer.php';
32
+        include XOOPS_ROOT_PATH.'/footer.php';
33 33
         exit();
34
-    } else {
34
+    }else {
35 35
         $ref_parser = parse_url($_SERVER['HTTP_REFERER']);
36 36
         $uri_parser = parse_url($_SERVER['REQUEST_URI']);
37 37
         if ((!empty($ref_parser['host']) && !empty($uri_parser['host']) && $uri_parser['host'] != $ref_parser['host'])
38 38
             || ($ref_parser['path'] != $uri_parser['path'])
39 39
         ) {
40
-            include XOOPS_ROOT_PATH . '/header.php';
41
-            include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
40
+            include XOOPS_ROOT_PATH.'/header.php';
41
+            include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
42 42
             xoops_confirm(array(), 'javascript: window.close();', sprintf(planet_constant('MD_TRANSFER_DONE'), ''),
43 43
                           _CLOSE, $_SERVER['HTTP_REFERER']);
44 44
             $xoopsOption['output_type'] = 'plain';
45
-            include XOOPS_ROOT_PATH . '/footer.php';
45
+            include XOOPS_ROOT_PATH.'/footer.php';
46 46
             exit();
47
-        } else {
48
-            include XOOPS_ROOT_PATH . '/header.php';
47
+        }else {
48
+            include XOOPS_ROOT_PATH.'/header.php';
49 49
             xoops_error(_NOPERM);
50 50
             $xoopsOption['output_type'] = 'plain';
51
-            include XOOPS_ROOT_PATH . '/footer.php';
51
+            include XOOPS_ROOT_PATH.'/footer.php';
52 52
             exit();
53 53
         }
54 54
     }
55 55
 }
56 56
 
57 57
 $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
58
-$article_obj     =& $article_handler->get($article_id);
58
+$article_obj     = & $article_handler->get($article_id);
59 59
 
60 60
 // Display option form
61 61
 if (empty($op)) {
62 62
     $module_variables .= "<input type=\"hidden\" name=\"article\" id=\"article\" value=\"{$article_id}\">";
63
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/option.transfer.php';
63
+    include XOOPS_ROOT_PATH.'/Frameworks/transfer/option.transfer.php';
64 64
     exit();
65
-} else {
65
+}else {
66 66
     $data           = array();
67 67
     $data['id']     = $article_id;
68 68
     $data['title']  = $article_obj->getVar('art_title');
69 69
     $data['time']   = $article_obj->getTime('l');
70 70
     $data['image']  = '';
71 71
     $data['source'] = $article_obj->getVar('art_link');
72
-    $data['url']    = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . ''
72
+    $data['url']    = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''
73 73
                       . $article_obj->getVar('art_id');
74 74
     $data['author'] = $article_obj->getVar('art_author');
75 75
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         case 'print':
83 83
         case 'pdf':
84
-            ${"{$op}_data"}            =& $data;
84
+            ${"{$op}_data"}            = & $data;
85 85
             ${"{$op}_data"}['date']    = $pdf_data['time'];
86 86
             ${"{$op}_data"}['content'] = $article_obj->getVar('art_content');
87 87
             break;
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
             $data['content'] = $article_obj->getSummary();
92 92
             break;
93 93
     }
94
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/action.transfer.php';
94
+    include XOOPS_ROOT_PATH.'/Frameworks/transfer/action.transfer.php';
95 95
     exit();
96 96
 }
Please login to merge, or discard this patch.
pdf.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
 if (!empty($_POST['pdf_data'])) {
31 31
     $pdf_data = unserialize(base64_decode($_POST['pdf_data']));
32 32
 } elseif (!empty($pdf_data)) {
33
-} else {
33
+}else {
34 34
     error_reporting(0);
35
-    include __DIR__ . '/header.php';
35
+    include __DIR__.'/header.php';
36 36
     error_reporting(0);
37 37
 
38 38
     if (planet_parse_args($args_num, $args, $args_str)) {
39 39
         $args['article'] = @$args_num[0];
40 40
     }
41 41
 
42
-    $article_id = (int)(empty($_GET['article']) ? @$args['article'] : $_GET['article']);
42
+    $article_id = (int) (empty($_GET['article']) ? @$args['article'] : $_GET['article']);
43 43
 
44 44
     $article_handler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
45
-    $article_obj     =& $article_handler->get($article_id);
45
+    $article_obj     = & $article_handler->get($article_id);
46 46
 
47 47
     $article_data = array();
48 48
 
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
     $pdf_data['date']    = $article_data['time'];
70 70
     $pdf_data['content'] = '';
71 71
     if ($article_data['summary']) {
72
-        $pdf_data['content'] .= planet_constant('MD_SUMMARY') . ': ' . $article_data['summary'] . '<br><br>';
72
+        $pdf_data['content'] .= planet_constant('MD_SUMMARY').': '.$article_data['summary'].'<br><br>';
73 73
     }
74
-    $pdf_data['content'] .= $article_data['text'] . '<br>';
75
-    $pdf_data['url'] = XOOPS_URL . '/modules/' . $GLOBALS['artdirname'] . '/view.article.php' . URL_DELIMITER
74
+    $pdf_data['content'] .= $article_data['text'].'<br>';
75
+    $pdf_data['url'] = XOOPS_URL.'/modules/'.$GLOBALS['artdirname'].'/view.article.php'.URL_DELIMITER
76 76
                        . $article_obj->getVar('art_id');
77 77
 }
78 78
 $pdf_data['filename'] = preg_replace("/[^0-9a-z\-_\.]/i", '', $pdf_data['title']);
79 79
 
80
-include XOOPS_ROOT_PATH . '/Frameworks/fpdf/init.php';
80
+include XOOPS_ROOT_PATH.'/Frameworks/fpdf/init.php';
81 81
 error_reporting(0);
82 82
 ob_end_clean();
83 83
 
Please login to merge, or discard this patch.
include/functions.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 if (!defined('planet_FUNCTIONS')):
38 38
     define('planet_FUNCTIONS', 1);
39 39
 
40
-    require XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/vars.php';
41
-    include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
42
-    include_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.php';
40
+    require XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/vars.php';
41
+    include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
42
+    include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.php';
43 43
 
44 44
     /**
45 45
      * Function to display messages
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * - "&" in a string
67 67
     */
68 68
     function planet_parse_args(&$args_numeric, &$args, &$args_string) {
69
-        $args_abb     = array(
69
+        $args_abb = array(
70 70
             'a' => 'article',
71 71
             'b' => 'blog',
72 72
             'c' => 'category',
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
         if (preg_match("/[^\?]*\.php[\/|\?]([^\?]*)/i", $_SERVER['REQUEST_URI'], $matches)) {
82 82
             $vars = preg_split("/[\/|&]/", $matches[1]);
83 83
             $vars = array_map('trim', $vars);
84
-            if (count($vars) > 0) {
84
+            if (count($vars)>0) {
85 85
                 foreach ($vars as $var) {
86 86
                     if (is_numeric($var)) {
87 87
                         $args_numeric[] = $var;
88 88
                     } elseif (false === strpos($var, '=')) {
89 89
                         if (is_numeric(substr($var, 1))) {
90
-                            $args[$args_abb[strtolower($var{0})]] = (int)substr($var, 1);
91
-                        } else {
90
+                            $args[$args_abb[strtolower($var{0})]] = (int) substr($var, 1);
91
+                        }else {
92 92
                             $args_string[] = urldecode($var);
93 93
                         }
94
-                    } else {
94
+                    }else {
95 95
                         parse_str($var, $args);
96 96
                     }
97 97
                 }
98 98
             }
99 99
         }
100 100
 
101
-        return (count($args) + count($args_numeric) + count($args_string) == 0) ? null : true;
101
+        return (count($args)+count($args_numeric)+count($args_string) == 0) ? null : true;
102 102
     }
103 103
 
104 104
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $pattern     = array($pattern);
121 121
             $replacement = array($replacement);
122 122
         }
123
-        if (is_array($pattern) && count($pattern) > 0) {
123
+        if (is_array($pattern) && count($pattern)>0) {
124 124
             $ii = 0;
125 125
             foreach ($pattern as $pat) {
126 126
                 if (!in_array($pat, $patterns)) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $pattern     = array($pattern);
156 156
             $replacement = array($replacement);
157 157
         }
158
-        if (is_array($pattern) && count($pattern) > 0) {
158
+        if (is_array($pattern) && count($pattern)>0) {
159 159
             $ii = 0;
160 160
             foreach ($pattern as $pat) {
161 161
                 if (!in_array($pat, $patterns)) {
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         if (!is_array($userid)) {
197 197
             $userid = array($userid);
198 198
         }
199
-        $users =& mod_getUnameFromIds($userid, $usereal, $linked);
199
+        $users = & mod_getUnameFromIds($userid, $usereal, $linked);
200 200
 
201 201
         return $users;
202 202
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $myts       = MyTextSanitizer::getInstance();
213 213
         $link_array = preg_split("/(\r\n|\r|\n)( *)/", $text);
214 214
         $links      = array();
215
-        if (count($link_array) > 0) {
215
+        if (count($link_array)>0) {
216 216
             foreach ($link_array as $link) {
217 217
                 @list($url, $title) = array_map('trim', preg_split('/ /', $link, 2));
218 218
                 if (empty($url)) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @return string
232 232
      */
233 233
     function planet_getTemplate($pagename) {
234
-        return $GLOBALS['VAR_PREFIX'] . '_' . $pagename . '.tpl';
234
+        return $GLOBALS['VAR_PREFIX'].'_'.$pagename.'.tpl';
235 235
     }
236 236
 
237 237
     /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             return false;
258 258
         }
259 259
         @list($pat, $rep) = array_map('trim', preg_split("#[\s]+#", $pattern));
260
-        $trackback_url = preg_replace('#' . $pat . '#', $rep, $article_obj->getVar('art_link'));
260
+        $trackback_url = preg_replace('#'.$pat.'#', $rep, $article_obj->getVar('art_link'));
261 261
 
262 262
         return planet_trackback($trackback_url, $article);
263 263
     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         $title         = $article->getVar('art_title');
274 274
         $excerpt       = $article->getVar('art_content');
275
-        $blog_name     = $xoopsConfig['sitename'] . '-' . $xoopsModule->getVar('name');
275
+        $blog_name     = $xoopsConfig['sitename'].'-'.$xoopsModule->getVar('name');
276 276
         $title         = xoops_utf8_encode($title);
277 277
         $excerpt       = xoops_utf8_encode($excerpt);
278 278
         $blog_name     = xoops_utf8_encode($blog_name);
@@ -280,18 +280,18 @@  discard block
 block discarded – undo
280 280
         $title1        = urlencode($title);
281 281
         $excerpt1      = urlencode($excerpt);
282 282
         $name1         = urlencode($blog_name);
283
-        $url           = urlencode(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php'
284
-                                   . URL_DELIMITER . '' . $article->getVar('art_id'));
283
+        $url           = urlencode(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'
284
+                                   . URL_DELIMITER.''.$article->getVar('art_id'));
285 285
         $query_string  = "title=$title1&url=$url&blog_name=$name1&excerpt=$excerpt1&charset=$charset";
286 286
         $trackback_url = parse_url($trackback_url);
287 287
 
288
-        $http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?'
288
+        $http_request = 'POST '.$trackback_url['path'].($trackback_url['query'] ? '?'
289 289
                                                                                       . $trackback_url['query'] : '')
290 290
                         . " HTTP/1.0\r\n";
291
-        $http_request .= 'Host: ' . $trackback_url['host'] . "\r\n";
292
-        $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . $charset . "\r\n";
293
-        $http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
294
-        $http_request .= 'User-Agent: XOOPS Blogs/' . XOOPS_VERSION;
291
+        $http_request .= 'Host: '.$trackback_url['host']."\r\n";
292
+        $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.$charset."\r\n";
293
+        $http_request .= 'Content-Length: '.strlen($query_string)."\r\n";
294
+        $http_request .= 'User-Agent: XOOPS Blogs/'.XOOPS_VERSION;
295 295
         $http_request .= "\r\n\r\n";
296 296
         $http_request .= $query_string;
297 297
         if ('' == $trackback_url['port']) {
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
         $fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
301 301
         @fwrite($fs, $http_request);
302 302
         if ($xoopsModuleConfig['do_debug']) {
303
-            $debug_file = XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '_trackback.log';
303
+            $debug_file = XOOPS_CACHE_PATH.'/'.$GLOBALS['moddirname'].'_trackback.log';
304 304
             $fr         = "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n";
305 305
             $fr .= "CHARSET:$charset\n";
306 306
             $fr .= "NAME:$blog_name\n";
307
-            $fr .= 'TITLE:' . $title . "\n";
307
+            $fr .= 'TITLE:'.$title."\n";
308 308
             $fr .= "EXCERPT:$excerpt\n\n";
309 309
             while (!@feof($fs)) {
310 310
                 $fr .= @fgets($fs, 4096);
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
             if ($fp = fopen($debug_file, 'a')) {
315 315
                 fwrite($fp, $fr);
316 316
                 fclose($fp);
317
-            } else {
317
+            }else {
318 318
             }
319 319
         }
320 320
         @fclose($fs);
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
                 planet_ping($serv, $id);
334 334
             }
335 335
         }
336
-        include_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/class-IXR.php';
336
+        include_once XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/class-IXR.php';
337 337
 
338 338
         // using a timeout of 3 seconds should be enough to cover slow servers
339 339
         $client          = new IXR_Client($server, false);
340 340
         $client->timeout = 3;
341
-        $client->useragent .= ' -- XOOPS Article/' . XOOPS_VERSION;
341
+        $client->useragent .= ' -- XOOPS Article/'.XOOPS_VERSION;
342 342
 
343 343
         // when set to true, this outputs debug messages by itself
344 344
         $client->debug = false;
345 345
 
346 346
         $blogname = xoops_utf8_encode($GLOBALS['xoopsModule']->getVar('name'));
347
-        $home     = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/';
348
-        $rss2_url = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php' . URL_DELIMITER . 'rss2.0/' . $id;
347
+        $home     = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/';
348
+        $rss2_url = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php'.URL_DELIMITER.'rss2.0/'.$id;
349 349
 
350 350
         if (!$client->query('weblogUpdates.extendedPing', $blogname, $home, $rss2_url)) { // then try a normal ping
351 351
             $client->query('weblogUpdates.ping', $blogname, $home);
@@ -360,16 +360,16 @@  discard block
 block discarded – undo
360 360
     function planet_trackback_response($error = 0, $error_message = '') {
361 361
         $charset       = 'utf-8';
362 362
         $error_message = xoops_utf8_encode($error_message);
363
-        header('Content-Type: text/xml; charset="' . $charset . '"');
363
+        header('Content-Type: text/xml; charset="'.$charset.'"');
364 364
         if ($error) {
365
-            echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
365
+            echo '<?xml version="1.0" encoding="'.$charset.'"?'.">\n";
366 366
             echo "<response>\n";
367 367
             echo "<error>1</error>\n";
368 368
             echo "<message>$error_message</message>\n";
369 369
             echo '</response>';
370 370
             die();
371
-        } else {
372
-            echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
371
+        }else {
372
+            echo '<?xml version="1.0" encoding="'.$charset.'"?'.">\n";
373 373
             echo "<response>\n";
374 374
             echo "<error>0</error>\n";
375 375
             echo '</response>';
@@ -388,11 +388,11 @@  discard block
 block discarded – undo
388 388
         if (is_array($string)) {
389 389
             $value = array();
390 390
             foreach ($string as $key => $val) {
391
-                $value[] = $key . '|' . $val;
391
+                $value[] = $key.'|'.$val;
392 392
             }
393 393
             $string = implode(',', $value);
394 394
         }
395
-        setcookie($GLOBALS['VAR_PREFIX'] . $name, $string, (int)$expire, '/');
395
+        setcookie($GLOBALS['VAR_PREFIX'].$name, $string, (int) $expire, '/');
396 396
     }
397 397
 
398 398
     /**
@@ -401,14 +401,14 @@  discard block
 block discarded – undo
401 401
      * @return array|null
402 402
      */
403 403
     function planet_getcookie($name, $isArray = false) {
404
-        $value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'] . $name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'] . $name] : null;
404
+        $value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'].$name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'].$name] : null;
405 405
         if ($isArray) {
406 406
             $_value = $value ? explode(',', $value) : array();
407 407
             $value  = array();
408
-            if (count($_value) > 0) {
408
+            if (count($_value)>0) {
409 409
                 foreach ($_value as $string) {
410 410
                     $key         = substr($string, 0, strpos($string, '|'));
411
-                    $val         = substr($string, strpos($string, '|') + 1);
411
+                    $val         = substr($string, strpos($string, '|')+1);
412 412
                     $value[$key] = $val;
413 413
                 }
414 414
             }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      * @return string
463 463
      */
464 464
     function planet_fetch_snoopy($url) {
465
-        require_once XOOPS_ROOT_PATH . '/class/snoopy.php';
465
+        require_once XOOPS_ROOT_PATH.'/class/snoopy.php';
466 466
         $snoopy = new Snoopy;
467 467
         $data   = '';
468 468
         if (@$snoopy->fetch($url)) {
@@ -480,10 +480,10 @@  discard block
 block discarded – undo
480 480
         if (!function_exists('curl_init')) {
481 481
             return false;
482 482
         }
483
-        $ch = curl_init();    // initialize curl handle
483
+        $ch = curl_init(); // initialize curl handle
484 484
         curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
485 485
         curl_setopt($ch, CURLOPT_FAILONERROR, 1);
486
-        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
486
+        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects
487 487
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable
488 488
         curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s
489 489
         $data = curl_exec($ch); // run the whole process
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         if ($index === false) {
524 524
             return false;
525 525
         }
526
-        $index = strlen($haystack) - strlen($needle) - $index;
526
+        $index = strlen($haystack)-strlen($needle)-$index;
527 527
 
528 528
         return $index;
529 529
     }
Please login to merge, or discard this patch.
include/plugin.transfer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
16 16
 
17
-if (!@include_once XOOPS_ROOT_PATH . '/Frameworks/transfer/transfer.php') {
17
+if (!@include_once XOOPS_ROOT_PATH.'/Frameworks/transfer/transfer.php') {
18 18
     return null;
19 19
 }
20 20
 
Please login to merge, or discard this patch.
include/functions.ini.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             if (isset($GLOBALS['xoopsModuleConfig'])) {
78 78
                 $moduleConfig = $GLOBALS['xoopsModuleConfig'];
79 79
             }
80
-        } else {
80
+        }else {
81 81
             $moduleHandler = xoops_getHandler('module');
82 82
             $module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
83 83
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             }
90 90
             unset($configs);
91 91
         }
92
-        if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
92
+        if ($customConfig = @include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/plugin.php') {
93 93
             $moduleConfig = array_merge($moduleConfig, $customConfig);
94 94
         }
95 95
 
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
             if (!in_array(URL_DELIMITER, array('?', '/'))) {
102 102
                 die('Exit on security');
103 103
             }
104
-        } else {
104
+        }else {
105 105
             $moduleConfig = planet_load_config();
106 106
             if (empty($moduleConfig['do_urw'])) {
107 107
                 define('URL_DELIMITER', '?');
108
-            } else {
108
+            }else {
109 109
                 define('URL_DELIMITER', '/');
110 110
             }
111 111
         }
Please login to merge, or discard this patch.
include/vars.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $GLOBALS['MOD_DB_PREFIX'] = 'planet';
37 37
 
38 38
 /* You are not supposed to modify following contents */
39
-defined('FRAMEWORKS_ART_FUNCTIONS_INI') || require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.ini.php';
39
+defined('FRAMEWORKS_ART_FUNCTIONS_INI') || require_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.ini.php';
40 40
 $GLOBALS['moddirname'] = mod_getDirname(__FILE__);
41 41
 
42 42
 /*
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
  * You can chnage to any term but be capital and unique, no conflict with other modules
51 51
  */
52 52
 $GLOBALS['VAR_PREFIXU'] = strtoupper($GLOBALS['moddirname']);
53
-require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/functions.ini.php';
53
+require_once XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/functions.ini.php';
54 54
 
55 55
 // include customized variables
56 56
 if (is_object($GLOBALS['xoopsModule']) && $GLOBALS['moddirname'] == $GLOBALS['xoopsModule']->getVar('dirname', 'n')) {
Please login to merge, or discard this patch.
include/form.blog.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
28 28
 
29
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
29
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
30 30
 $category_handler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
31 31
 
32 32
 $form = new XoopsThemeForm(_EDIT, 'formblog', xoops_getenv('PHP_SELF'), 'POST', true);
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
85 85
 $button_tray->addElement($butt_save);
86 86
 $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
87
-$butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname']
88
-                       . '/index.php' . URL_DELIMITER . 'b' . (int)$blog_id . "\"'");
87
+$butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']
88
+                       . '/index.php'.URL_DELIMITER.'b'.(int) $blog_id."\"'");
89 89
 $button_tray->addElement($butt_cancel);
90 90
 $form->addElement($button_tray);
91 91
 $form->display();
Please login to merge, or discard this patch.