- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/inc/lib.dc.antispam.url.php
r1179 r2566 18 18 self::genFeed('ham',$args); 19 19 } 20 20 21 21 public static function spamFeed($args) 22 22 { 23 23 self::genFeed('spam',$args); 24 24 } 25 25 26 26 private static function genFeed($type,$args) 27 27 { 28 28 global $core; 29 29 $user_id = dcAntispam::checkUserCode($core,$args); 30 30 31 31 if ($user_id === false) { 32 32 self::p404(); 33 33 return; 34 34 } 35 35 36 36 $core->auth->checkUser($user_id,null,null); 37 37 38 38 header('Content-Type: application/xml; charset=UTF-8'); 39 39 40 40 $title = $core->blog->name.' - '.__('Spam moderation'). ' - '; 41 41 $params = array(); … … 49 49 $params['sql'] = ' AND comment_status IN (1,-1) '; 50 50 } 51 51 52 52 echo 53 53 '<?xml version="1.0" encoding="utf-8"?>'."\n". … … 59 59 '<link>'.(DC_ADMIN_URL ? DC_ADMIN_URL.'comments.php'.$end_url : 'about:blank').'</link>'."\n". 60 60 '<description></description>'."\n"; 61 61 62 62 $rs = $core->blog->getComments($params); 63 63 $maxitems = 20; 64 $nbitems = 0; 65 64 $nbitems = 0; 65 66 66 while ($rs->fetch() && ($nbitems < $maxitems)) 67 67 { … … 74 74 } 75 75 $id = $rs->getFeedID(); 76 76 77 77 $content = '<p>IP: '.$rs->comment_ip; 78 78 79 79 if (trim($rs->comment_site)) { 80 80 $content .= '<br />URL: <a href="'.$rs->comment_site.'">'.$rs->comment_site.'</a>'; … … 82 82 $content .= "</p><hr />\n"; 83 83 $content .= $rs->comment_content; 84 84 85 85 echo 86 86 '<item>'."\n". 87 ' <title>'.html::escapeHTML($title).'</title>'."\n". 87 ' <title>'.html::escapeHTML($title).'</title>'."\n". 88 88 ' <link>'.$uri.'</link>'."\n". 89 89 ' <guid>'.$id.'</guid>'."\n". 90 90 ' <pubDate>'.$rs->getRFC822Date().'</pubDate>'."\n". 91 91 ' <dc:creator>'.html::escapeHTML($author).'</dc:creator>'."\n". 92 ' <description>'.html::escapeHTML($content).'</description>'."\n". 92 ' <description>'.html::escapeHTML($content).'</description>'."\n". 93 93 '</item>'; 94 94 } 95 96 echo "</channel>\n</rss>"; 95 96 echo "</channel>\n</rss>"; 97 97 } 98 98 } 99 ?>
Note: See TracChangeset
for help on using the changeset viewer.