0
static function trackback_receive($url, $title, $excerpt, $blog_name) {
0
$count = $sql->count("comments",
0
- array("post_id = :id",
0
- array(":id" => $_GET['id'],
0
- ":url" => $_POST['url']));
0
+ array("post_id" => $_GET['id'],
0
+ "author_url" => $_POST['url']));
0
trackback_respond(true, __("A ping from that URL is already registered.", "comments"));
0
static function pingback($id, $to, $from, $title, $excerpt) {
0
$count = $sql->count("comments",
0
- array("post_id = :id",
0
+ array("post_id" => $id,
0
+ "author_url" => $from));
0
return new IXR_Error(48, __("A ping from that URL is already registered.", "comments"));
0
static function delete_post($post) {
0
- SQL::current()->delete("comments",
"post_id = :id", array(":id" => $post->id));
0
+ SQL::current()->delete("comments",
array("post_id" => $post->id));
0
static function delete_user($user) {
0
- SQL::current()->update("comments",
"user_id = :id", array("user_id" => 0), array(":id" => $user->id));
0
+ SQL::current()->update("comments",
array("user_id" => $user->id), array("user_id" => 0));
0
static function admin_comment_settings() {
0
$where[] = "status != 'spam'";
0
$visitor = Visitor::current();
0
- if (!$visitor->group()->can("edit_comment", "delete_comment", true)) {
0
- $where[] = "user_id = :visitor_id";
0
- $params[":visitor_id"] = $visitor->id;
0
+ if (!$visitor->group()->can("edit_comment", "delete_comment", true))
0
+ $where["user_id"] = $visitor->id;
0
AdminController::current()->context["comments"] = new Paginator(Comment::find(array("placeholders" => true, "where" => $where, "params" => $params)), 25);
0
if ($comment->status == "spam")
0
$false_positives[] = $comment->signature;
0
- $sql->update("comments",
"id = :id", array("status" => ":status"), array(":id" => $comment->id, ":status" => "denied"));
0
+ $sql->update("comments",
array("id" => $comment->id), array("status" => "denied"));
0
Flash::notice(__("Selected comments denied.", "comments"));
0
if ($comment->status == "spam")
0
$false_positives[] = $comment->signature;
0
- $sql->update("comments",
"id = :id", array("status" => ":status"), array(":id" => $comment->id, ":status" => "approved"));
0
+ $sql->update("comments",
array("id" => $comment->id), array("status" => "approved"));
0
Flash::notice(__("Selected comments approved.", "comments"));
0
if (!$comment->editable())
0
- $sql->update("comments",
"id = :id", array("status" => ":status"), array(":id" => $comment->id, ":status" => "spam"));
0
+ $sql->update("comments",
array("id" => $comment->id), array("status" => "spam"));
0
$false_negatives[] = $comment->signature;
0
array(":last_comment" => $_POST['last_comment'],
0
- ":current_ip" => ip2long($_SERVER['REMOTE_ADDR']),
0
- ":visitor_id" => $visitor->id
0
+ ":visitor_id" => $visitor->id));
0
while ($the_comment = $new_comments->fetchObject())
0
$comment = $comment->children("http://www.w3.org/2005/Atom");
0
$login = $comment->author->children("http://chyrp.net/export/1.0/")->login;
0
- $user_id = $sql->select("users", "id", "login = :login", "id DESC",
0
- array(":login" => $login))->fetchColumn();
0
+ $user_id = $sql->select("users", "id", array("login" => $login), "id DESC")->fetchColumn();
0
Comment::add(unfix($comment->content),
0
unfix($comment->author->name),
0
"created_at ASC", # order
0
- array(":post_id" => $post->id,
0
- ":current_ip" => ip2long($_SERVER['REMOTE_ADDR']),
0
- ":visitor_id" => $visitor->id
0
+ array(":visitor_id" => $visitor->id));
0
$post->comments = array();
0
foreach ($get_comments->fetchAll() as $comment)
0
- $options["params"][":current_ip"] = ip2long($_SERVER['REMOTE_ADDR']);
0
$options["params"][":visitor_id"] = Visitor::current()->id;
0
$options["group"][] = "id";