function __construct($url) { parent::__construct($url); $this->tag = @$_REQUEST['tag']; // find all blog items $this->pages = Resolver::find_all_pages('blog'); }
function __construct($root, $tag = false) { $this->pages = Resolver::find_all_pages($root); $this->tag = $tag; }
$comments = Comments::get_all($page->url, true); $change = false; foreach ($comments as $comment) { if ($comment->is_spam() && $comment->visible) { $comment->visible = false; $change = true; $total_change++; } } Comments::set_all($page->url, $comments); } $p->body .= "Hidden {$total_change} comments"; } $num_new_spam = 0; $p->body .= '<table class="spam">'; foreach (Resolver::find_all_pages('blog') as $page) { $comments = Comments::get_all($page->url, true); $com_body = array(); foreach ($comments as $comment) { $is_spam = ($comment->visible ? 'visible' : 'hidden') . ' ' . ($comment->is_spam() ? 'spam' : 'nonspam'); if ($comment->visible || !$comment->is_spam()) { $com_body[] = "<td class='{$is_spam} summary'>" . htmlspecialchars($comment->author_name) . ', ' . htmlspecialchars($comment->author_email) . ', ' . htmlspecialchars($comment->author_url) . ', ' . htmlspecialchars($comment->author_ip) . "<td class='{$is_spam} summary'>" . htmlspecialchars(substr($comment->body, 0, 100)); //"<td class='$is_spam summary'>" . $comment->body_html(); } if ($comment->visible && $comment->is_spam()) { $num_new_spam++; } } if ($com_body) { $p->body .= "<tr class='first'><td rowspan='" . count($com_body) . "'><a href='" . htmlspecialchars($page->url) . "'>" . $page->title . '</a>'; $p->body .= implode('<tr>', $com_body);