@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | $blog_id = intval( !empty($_POST["blog"])?$_POST["blog"]:(!empty($_GET["blog"])?$_GET["blog"]:0) ); |
33 | 33 | |
34 | 34 | if(empty($article_id) && empty($blog_id)){ |
35 | - redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_INVALID")); |
|
36 | - exit(); |
|
35 | + redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_INVALID")); |
|
36 | + exit(); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | $article_handler =& xoops_getmodulehandler("article", $GLOBALS["moddirname"]); |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | $rate_obj->setVar("rate_rating", $rate); |
70 | 70 | $rate_obj->setVar("rate_time", time()); |
71 | 71 | if(!$rate_id = $rate_handler->insert($rate_obj, true)){ |
72 | - redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_NOTSAVED")); |
|
73 | - exit(); |
|
72 | + redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_NOTSAVED")); |
|
73 | + exit(); |
|
74 | 74 | } |
75 | 75 | if($article_id>0){ |
76 | 76 | $article_obj =& $article_handler->get($article_id); |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | |
30 | 30 | $art_id = intval( isset($_GET["article"]) ? $_GET["article"] : (isset($_POST["article"]) ? $_POST["article"]: 0) ); |
31 | 31 | if(empty($art_id)){ |
32 | - redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_INVALID")); |
|
33 | - exit(); |
|
32 | + redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_INVALID")); |
|
33 | + exit(); |
|
34 | 34 | } |
35 | 35 | if (!$xoopsUser->isAdmin()){ |
36 | - redirect_header("javascript:history.go(-1);", 2, _NOPERM); |
|
37 | - exit(); |
|
36 | + redirect_header("javascript:history.go(-1);", 2, _NOPERM); |
|
37 | + exit(); |
|
38 | 38 | } |
39 | 39 | include XOOPS_ROOT_PATH."/header.php"; |
40 | 40 | include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; |
@@ -52,28 +52,28 @@ discard block |
||
52 | 52 | }elseif ( $op == "save" ) { |
53 | 53 | |
54 | 54 | if(empty($_POST["art_content"])){ |
55 | - redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_TEXTEMPTY")); |
|
56 | - exit(); |
|
55 | + redirect_header("javascript:history.go(-1);", 1, planet_constant("MD_TEXTEMPTY")); |
|
56 | + exit(); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | foreach(array( |
60 | - "art_title", |
|
61 | - "art_link", |
|
62 | - "art_author", |
|
63 | - "art_content" |
|
60 | + "art_title", |
|
61 | + "art_link", |
|
62 | + "art_author", |
|
63 | + "art_content" |
|
64 | 64 | ) as $tag){ |
65 | 65 | if(@$_POST[$tag] != $article_obj->getVar($tag)) |
66 | - $article_obj->setVar($tag, @$_POST[$tag]); |
|
66 | + $article_obj->setVar($tag, @$_POST[$tag]); |
|
67 | 67 | } |
68 | 68 | |
69 | - $art_id_new = $article_handler->insert($article_obj); |
|
69 | + $art_id_new = $article_handler->insert($article_obj); |
|
70 | 70 | if(!$article_obj->getVar("art_id")){ |
71 | 71 | $redirect = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php"; |
72 | - $message = planet_constant("MD_INSERTERROR"); |
|
72 | + $message = planet_constant("MD_INSERTERROR"); |
|
73 | 73 | }else{ |
74 | - $redirect = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$article_obj->getVar("art_id"); |
|
75 | - $message = planet_constant("MD_SAVED"); |
|
76 | - } |
|
74 | + $redirect = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$article_obj->getVar("art_id"); |
|
75 | + $message = planet_constant("MD_SAVED"); |
|
76 | + } |
|
77 | 77 | redirect_header($redirect,2,$message); |
78 | 78 | }else{ |
79 | 79 | require_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php"); |
@@ -60,9 +60,9 @@ discard block |
||
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; |
|
63 | + $timeoffset = ($xoopsUser->getVar("timezone_offset")- $xoopsConfig['server_TZ'])*3600; |
|
64 | 64 | } else { |
65 | - $timeoffset = ($xoopsConfig['default_TZ']- $xoopsConfig['server_TZ'])*3600; |
|
65 | + $timeoffset = ($xoopsConfig['default_TZ']- $xoopsConfig['server_TZ'])*3600; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $criteria = new CriteriaCompo(); |
@@ -127,20 +127,20 @@ discard block |
||
127 | 127 | } |
128 | 128 | // Get monthly list |
129 | 129 | if(empty($month)){ |
130 | - $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count |
|
130 | + $sql = "SELECT MONTH(FROM_UNIXTIME(art_time - $timeoffset)) AS mon, COUNT(DISTINCT art_id) AS count |
|
131 | 131 | FROM ".planet_DB_prefix("article")." |
132 | 132 | WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year |
133 | 133 | ".$blog_criteria." |
134 | 134 | GROUP BY mon |
135 | 135 | "; |
136 | - $result = $xoopsDB->query($sql); |
|
137 | - $months = array(); |
|
138 | - while ($myrow = $xoopsDB->fetchArray($result)) { |
|
139 | - $months[] = array( |
|
140 | - "title"=>planet_constant("MD_MONTH_".intval($myrow["mon"]))." (".intval($myrow["count"]).")", |
|
136 | + $result = $xoopsDB->query($sql); |
|
137 | + $months = array(); |
|
138 | + while ($myrow = $xoopsDB->fetchArray($result)) { |
|
139 | + $months[] = array( |
|
140 | + "title"=>planet_constant("MD_MONTH_".intval($myrow["mon"]))." (".intval($myrow["count"]).")", |
|
141 | 141 | "url"=>XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.archive.php".URL_DELIMITER."".$year."/".$myrow["mon"]."/b".$blog_id, |
142 | - ); |
|
143 | - } |
|
142 | + ); |
|
143 | + } |
|
144 | 144 | $timenav["prev"] = array( |
145 | 145 | "url"=>XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.archive.php".URL_DELIMITER."".($year-1)."/b".$blog_id, |
146 | 146 | "title"=>sprintf(planet_constant("MD_TIME_Y"), ($year-1)) |
@@ -154,37 +154,37 @@ discard block |
||
154 | 154 | } |
155 | 155 | // Get daily list |
156 | 156 | elseif(empty($day)){ |
157 | - $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count |
|
157 | + $sql = "SELECT DAY(FROM_UNIXTIME(art_time - $timeoffset)) AS day, COUNT(DISTINCT a.art_id) AS count |
|
158 | 158 | FROM ".planet_DB_prefix("article")." |
159 | 159 | WHERE YEAR(FROM_UNIXTIME(art_time - $timeoffset)) = $year |
160 | 160 | AND MONTH(FROM_UNIXTIME(art_time - $timeoffset)) = $month |
161 | 161 | ".$blog_criteria." |
162 | 162 | GROUP BY day |
163 | 163 | "; |
164 | - $result = $xoopsDB->query($sql); |
|
165 | - $days = array(); |
|
166 | - while ($myrow = $xoopsDB->fetchArray($result)) { |
|
167 | - $days[$myrow["day"]]["count"] = $myrow["count"]; |
|
168 | - } |
|
169 | - for($i=1;$i<=31;$i++){ |
|
170 | - if(!isset($days[$i])) continue; |
|
171 | - $days[$i] = array( |
|
172 | - "title"=>$days[$i]["count"], |
|
164 | + $result = $xoopsDB->query($sql); |
|
165 | + $days = array(); |
|
166 | + while ($myrow = $xoopsDB->fetchArray($result)) { |
|
167 | + $days[$myrow["day"]]["count"] = $myrow["count"]; |
|
168 | + } |
|
169 | + for($i=1;$i<=31;$i++){ |
|
170 | + if(!isset($days[$i])) continue; |
|
171 | + $days[$i] = array( |
|
172 | + "title"=>$days[$i]["count"], |
|
173 | 173 | "url"=>XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.archive.php".URL_DELIMITER."".$year."/".$month."/".$i."/b".$blog_id |
174 | - ); |
|
175 | - } |
|
176 | - $calendar = planet_getCalendar($year, $month, $days); |
|
177 | - $month_next = $month+1; |
|
178 | - $month_prev = $month-1; |
|
179 | - $_year = $year; |
|
180 | - if($month==12) { |
|
181 | - $month_next = 1; |
|
182 | - $_year = $year +1; |
|
183 | - } |
|
184 | - if($month==1) { |
|
185 | - $month_pre = 12; |
|
186 | - $_year = $year - 1; |
|
187 | - } |
|
174 | + ); |
|
175 | + } |
|
176 | + $calendar = planet_getCalendar($year, $month, $days); |
|
177 | + $month_next = $month+1; |
|
178 | + $month_prev = $month-1; |
|
179 | + $_year = $year; |
|
180 | + if($month==12) { |
|
181 | + $month_next = 1; |
|
182 | + $_year = $year +1; |
|
183 | + } |
|
184 | + if($month==1) { |
|
185 | + $month_pre = 12; |
|
186 | + $_year = $year - 1; |
|
187 | + } |
|
188 | 188 | $timenav["prev"] = array( |
189 | 189 | "url"=>XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.archive.php".URL_DELIMITER."".$_year."/".$month_prev."/b".$blog_id, |
190 | 190 | "title"=>planet_constant("MD_MONTH_".$month_prev) |
@@ -218,59 +218,59 @@ discard block |
||
218 | 218 | { |
219 | 219 | $year = empty($year)?date("Y"):$year; |
220 | 220 | $month = empty($month)?date("n"):$month; |
221 | - $unixmonth = mktime(0, 0 , 0, $month, 1, $year); |
|
221 | + $unixmonth = mktime(0, 0 , 0, $month, 1, $year); |
|
222 | 222 | |
223 | - ob_start(); |
|
224 | - echo '<table id="calendar">'; |
|
225 | - echo '<caption>'; |
|
226 | - printf(planet_constant("MD_TIME_YM"), $year, planet_constant("MD_MONTH_".$month)); |
|
227 | - echo '</caption>'; |
|
223 | + ob_start(); |
|
224 | + echo '<table id="calendar">'; |
|
225 | + echo '<caption>'; |
|
226 | + printf(planet_constant("MD_TIME_YM"), $year, planet_constant("MD_MONTH_".$month)); |
|
227 | + echo '</caption>'; |
|
228 | 228 | |
229 | - for ($i=1;$i<=7;$i++) { |
|
230 | - echo "\n\t\t<th abbr=\"".planet_constant("MD_WEEK_".$i)."\" scope=\"col\" title=\"".planet_constant("MD_WEEK_".$i)."\">" . planet_constant("MD_WEEK_".$i) . '</th>'; |
|
231 | - } |
|
229 | + for ($i=1;$i<=7;$i++) { |
|
230 | + echo "\n\t\t<th abbr=\"".planet_constant("MD_WEEK_".$i)."\" scope=\"col\" title=\"".planet_constant("MD_WEEK_".$i)."\">" . planet_constant("MD_WEEK_".$i) . '</th>'; |
|
231 | + } |
|
232 | 232 | |
233 | 233 | echo '<tr>'; |
234 | 234 | |
235 | 235 | // See how much we should pad in the beginning |
236 | 236 | $week_begins = 1; |
237 | - $pad = planet_calendar_week_mod(date('w', $unixmonth)-$week_begins); |
|
238 | - if (0 != $pad) echo "\n\t\t".'<td colspan="'.$pad.'"> </td>'; |
|
237 | + $pad = planet_calendar_week_mod(date('w', $unixmonth)-$week_begins); |
|
238 | + if (0 != $pad) echo "\n\t\t".'<td colspan="'.$pad.'"> </td>'; |
|
239 | 239 | |
240 | - $daysinmonth = intval(date('t', $unixmonth)); |
|
241 | - for ($day = 1; $day <= $daysinmonth; ++$day) { |
|
242 | - if (isset($newrow) && $newrow){ |
|
243 | - echo "\n\t</tr>\n\t<tr>\n\t\t"; |
|
244 | - } |
|
245 | - $newrow = false; |
|
240 | + $daysinmonth = intval(date('t', $unixmonth)); |
|
241 | + for ($day = 1; $day <= $daysinmonth; ++$day) { |
|
242 | + if (isset($newrow) && $newrow){ |
|
243 | + echo "\n\t</tr>\n\t<tr>\n\t\t"; |
|
244 | + } |
|
245 | + $newrow = false; |
|
246 | 246 | |
247 | - echo '<td>'; |
|
247 | + echo '<td>'; |
|
248 | 248 | |
249 | - if (!empty($days[$day]["url"])) { |
|
249 | + if (!empty($days[$day]["url"])) { |
|
250 | 250 | echo '<a href="' . $days[$day]["url"] . "\""; |
251 | 251 | if(!empty($days[$day]["title"])) echo "title=\"".$days[$day]["title"]."\""; |
252 | 252 | echo ">$day</a>"; |
253 | - } elseif(!empty($days[$day]["title"])) { |
|
254 | - echo "<acronym title=\"".$days[$day]["title"]."\">$day</acronym>"; |
|
255 | - } else { |
|
256 | - echo $day; |
|
257 | - } |
|
258 | - echo '</td>'; |
|
253 | + } elseif(!empty($days[$day]["title"])) { |
|
254 | + echo "<acronym title=\"".$days[$day]["title"]."\">$day</acronym>"; |
|
255 | + } else { |
|
256 | + echo $day; |
|
257 | + } |
|
258 | + echo '</td>'; |
|
259 | 259 | |
260 | 260 | if (6 == planet_calendar_week_mod(date('w', mktime(0, 0 , 0, $month, $day, $year))-$week_begins)) |
261 | - $newrow = true; |
|
262 | - } |
|
261 | + $newrow = true; |
|
262 | + } |
|
263 | 263 | |
264 | - $pad = 7 - planet_calendar_week_mod(date('w', mktime(0, 0 , 0, $month, $day, $year))-$week_begins); |
|
265 | - if ($pad != 0 && $pad != 7){ |
|
266 | - echo "\n\t\t".'<td class="pad" colspan="'.$pad.'"> </td>'; |
|
267 | - } |
|
264 | + $pad = 7 - planet_calendar_week_mod(date('w', mktime(0, 0 , 0, $month, $day, $year))-$week_begins); |
|
265 | + if ($pad != 0 && $pad != 7){ |
|
266 | + echo "\n\t\t".'<td class="pad" colspan="'.$pad.'"> </td>'; |
|
267 | + } |
|
268 | 268 | |
269 | - echo "\n\t</tr>\n\t</tbody>\n\t</table>"; |
|
270 | - $calendar = ob_get_contents(); |
|
271 | - ob_end_clean(); |
|
269 | + echo "\n\t</tr>\n\t</tbody>\n\t</table>"; |
|
270 | + $calendar = ob_get_contents(); |
|
271 | + ob_end_clean(); |
|
272 | 272 | |
273 | - return $calendar; |
|
273 | + return $calendar; |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | // Used in get_calendar |
@@ -66,7 +66,7 @@ |
||
66 | 66 | exit(); |
67 | 67 | }else{ |
68 | 68 | $data = array(); |
69 | - $data["id"] = $article_id; |
|
69 | + $data["id"] = $article_id; |
|
70 | 70 | $data["title"] = $article_obj->getVar("art_title"); |
71 | 71 | $data["time"] = $article_obj->getTime("l"); |
72 | 72 | $data["image"] = ""; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | if(!is_array($userid)) $userid = array($userid); |
176 | 176 | $users = mod_getUnameFromIds($userid, $usereal, $linked); |
177 | 177 | |
178 | - return $users; |
|
178 | + return $users; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | |
@@ -190,14 +190,14 @@ discard block |
||
190 | 190 | { |
191 | 191 | $myts =& MyTextSanitizer::getInstance(); |
192 | 192 | $link_array = preg_split("/(\r\n|\r|\n)( *)/", $text); |
193 | - $links = array(); |
|
194 | - if(count($link_array)>0) foreach($link_array as $link){ |
|
195 | - @list($url, $title) = array_map("trim",preg_split("/ /", $link, 2)); |
|
196 | - if(empty($url)) continue; |
|
197 | - //if(empty($title)) $title = $url; |
|
198 | - $links[] = array("url"=>$url, "title"=>$myts->htmlSpecialChars($title)); |
|
199 | - } |
|
200 | - return $links; |
|
193 | + $links = array(); |
|
194 | + if(count($link_array)>0) foreach($link_array as $link){ |
|
195 | + @list($url, $title) = array_map("trim",preg_split("/ /", $link, 2)); |
|
196 | + if(empty($url)) continue; |
|
197 | + //if(empty($title)) $title = $url; |
|
198 | + $links[] = array("url"=>$url, "title"=>$myts->htmlSpecialChars($title)); |
|
199 | + } |
|
200 | + return $links; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | function planet_getTemplate($pagename) |
@@ -379,9 +379,9 @@ discard block |
||
379 | 379 | |
380 | 380 | function planet_remote_content($url) |
381 | 381 | { |
382 | - if($data = planet_fetch_snoopy($url)) return $data; |
|
383 | - if($data = planet_fetch_CURL($url)) return $data; |
|
384 | - if($data = planet_fetch_fopen($url)) return $data; |
|
382 | + if($data = planet_fetch_snoopy($url)) return $data; |
|
383 | + if($data = planet_fetch_CURL($url)) return $data; |
|
384 | + if($data = planet_fetch_fopen($url)) return $data; |
|
385 | 385 | return false; |
386 | 386 | } |
387 | 387 | |
@@ -391,33 +391,33 @@ discard block |
||
391 | 391 | $snoopy = new Snoopy; |
392 | 392 | $data = ""; |
393 | 393 | if (@$snoopy->fetch($url)){ |
394 | - $data = (is_array($snoopy->results))?implode("\n",$snoopy->results):$snoopy->results; |
|
394 | + $data = (is_array($snoopy->results))?implode("\n",$snoopy->results):$snoopy->results; |
|
395 | 395 | } |
396 | 396 | return $data; |
397 | 397 | } |
398 | 398 | |
399 | 399 | function planet_fetch_CURL($url) |
400 | 400 | { |
401 | - if (!function_exists('curl_init') ) return false; |
|
402 | - $ch = curl_init(); // initialize curl handle |
|
403 | - curl_setopt($ch, CURLOPT_URL, $url); // set url to post to |
|
404 | - curl_setopt($ch, CURLOPT_FAILONERROR, 1); |
|
405 | - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects |
|
406 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable |
|
407 | - curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s |
|
408 | - $data = curl_exec($ch); // run the whole process |
|
409 | - curl_close($ch); |
|
410 | - return $data; |
|
401 | + if (!function_exists('curl_init') ) return false; |
|
402 | + $ch = curl_init(); // initialize curl handle |
|
403 | + curl_setopt($ch, CURLOPT_URL, $url); // set url to post to |
|
404 | + curl_setopt($ch, CURLOPT_FAILONERROR, 1); |
|
405 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects |
|
406 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable |
|
407 | + curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s |
|
408 | + $data = curl_exec($ch); // run the whole process |
|
409 | + curl_close($ch); |
|
410 | + return $data; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | function planet_fetch_fopen($url) |
414 | 414 | { |
415 | 415 | if(!$fp = @fopen ($url, 'r')) return false; |
416 | - $data = ""; |
|
417 | - while (!feof($fp)) { |
|
418 | - $data .= fgets ($fp, 1024); |
|
419 | - } |
|
420 | - fclose($fp); |
|
416 | + $data = ""; |
|
417 | + while (!feof($fp)) { |
|
418 | + $data .= fgets ($fp, 1024); |
|
419 | + } |
|
420 | + fclose($fp); |
|
421 | 421 | return $data; |
422 | 422 | } |
423 | 423 |
@@ -26,35 +26,35 @@ |
||
26 | 26 | |
27 | 27 | class ModuleTransferHandler extends TransferHandler |
28 | 28 | { |
29 | - function ModuleTransferHandler() |
|
30 | - { |
|
31 | - $this->TransferHandler(); |
|
32 | - } |
|
29 | + function ModuleTransferHandler() |
|
30 | + { |
|
31 | + $this->TransferHandler(); |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Get valid addon list |
|
36 | - * |
|
37 | - * @param array $skip Addons to skip |
|
38 | - * @param boolean $sort To sort the list upon 'level' |
|
39 | - * return array $list |
|
40 | - */ |
|
41 | - function &getList($skip = array(), $sort = true) |
|
42 | - { |
|
43 | - $list = parent::getList($skip, $sort); |
|
44 | - return $list; |
|
45 | - } |
|
34 | + /** |
|
35 | + * Get valid addon list |
|
36 | + * |
|
37 | + * @param array $skip Addons to skip |
|
38 | + * @param boolean $sort To sort the list upon 'level' |
|
39 | + * return array $list |
|
40 | + */ |
|
41 | + function &getList($skip = array(), $sort = true) |
|
42 | + { |
|
43 | + $list = parent::getList($skip, $sort); |
|
44 | + return $list; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * If need change config of an item |
|
49 | - * 1 parent::load_item |
|
50 | - * 2 $this->config |
|
51 | - * 3 $this->do_transfer |
|
52 | - */ |
|
53 | - function do_transfer($item, &$data) |
|
54 | - { |
|
55 | - $ret = parent::do_transfer($item, $data); |
|
47 | + /** |
|
48 | + * If need change config of an item |
|
49 | + * 1 parent::load_item |
|
50 | + * 2 $this->config |
|
51 | + * 3 $this->do_transfer |
|
52 | + */ |
|
53 | + function do_transfer($item, &$data) |
|
54 | + { |
|
55 | + $ret = parent::do_transfer($item, $data); |
|
56 | 56 | |
57 | 57 | return $ret; |
58 | - } |
|
58 | + } |
|
59 | 59 | } |
60 | 60 | ?> |
61 | 61 | \ No newline at end of file |
@@ -59,24 +59,24 @@ |
||
59 | 59 | return $moduleConfig; |
60 | 60 | } |
61 | 61 | |
62 | - if(is_object($GLOBALS["xoopsModule"]) && $GLOBALS["xoopsModule"]->getVar("dirname") == $GLOBALS["moddirname"]){ |
|
63 | - $moduleConfig =& $GLOBALS["xoopsModuleConfig"]; |
|
64 | - }else{ |
|
62 | + if(is_object($GLOBALS["xoopsModule"]) && $GLOBALS["xoopsModule"]->getVar("dirname") == $GLOBALS["moddirname"]){ |
|
63 | + $moduleConfig =& $GLOBALS["xoopsModuleConfig"]; |
|
64 | + }else{ |
|
65 | 65 | $module_handler = &xoops_gethandler('module'); |
66 | 66 | $module = $module_handler->getByDirname($GLOBALS["moddirname"]); |
67 | 67 | |
68 | - $config_handler = &xoops_gethandler('config'); |
|
69 | - $criteria = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid'))); |
|
70 | - $configs =& $config_handler->getConfigs($criteria); |
|
71 | - foreach(array_keys($configs) as $i){ |
|
72 | - $moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); |
|
73 | - } |
|
74 | - unset($configs); |
|
75 | - } |
|
68 | + $config_handler = &xoops_gethandler('config'); |
|
69 | + $criteria = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid'))); |
|
70 | + $configs =& $config_handler->getConfigs($criteria); |
|
71 | + foreach(array_keys($configs) as $i){ |
|
72 | + $moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput(); |
|
73 | + } |
|
74 | + unset($configs); |
|
75 | + } |
|
76 | 76 | if($customConfig = @include(XOOPS_ROOT_PATH."/modules/".$GLOBALS["moddirname"]."/include/plugin.php")){ |
77 | 77 | $moduleConfig = array_merge($moduleConfig, $customConfig); |
78 | 78 | } |
79 | - return $moduleConfig; |
|
79 | + return $moduleConfig; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | function planet_define_url_delimiter() |
@@ -151,13 +151,13 @@ |
||
151 | 151 | $content .= "<br />".planet_constant("MD_SOURCE").": ".$articles_obj[$id]->getVar("art_link")." ".$articles_obj[$id]->getVar("art_author"); |
152 | 152 | $items[] = array( |
153 | 153 | "title" => $articles_obj[$id]->getVar("art_title"), |
154 | - "link" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$articles_obj[$id]->getVar("art_id"), |
|
155 | - "description" => $content, |
|
156 | - "descriptionHtmlSyndicated" => true, |
|
157 | - "date" => $articles_obj[$id]->getTime("rss"), |
|
158 | - "source" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/", |
|
159 | - "author" => $articles_obj[$id]->getVar("art_author") |
|
160 | - ); |
|
154 | + "link" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/view.article.php".URL_DELIMITER."".$articles_obj[$id]->getVar("art_id"), |
|
155 | + "description" => $content, |
|
156 | + "descriptionHtmlSyndicated" => true, |
|
157 | + "date" => $articles_obj[$id]->getTime("rss"), |
|
158 | + "source" => XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/", |
|
159 | + "author" => $articles_obj[$id]->getVar("art_author") |
|
160 | + ); |
|
161 | 161 | } |
162 | 162 | unset($articles_obj, $criteria); |
163 | 163 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | if($blog_id>0){ |
33 | 33 | $blog =& $blog_handler->get($blog_id); |
34 | 34 | $count = $blog_handler->do_update($blog); |
35 | - redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php?blog=".$blog_id, 2, sprintf(planet_constant("MD_UPDATED"), intval($count))); |
|
35 | + redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php?blog=".$blog_id, 2, sprintf(planet_constant("MD_UPDATED"), intval($count))); |
|
36 | 36 | } |
37 | 37 | if(planet_getcookie("upd")+30*60>time()) return; |
38 | 38 | planet_setcookie("upd", time()); |