Show
Ignore:
Timestamp:
10/12/07 16:21:15 (1 year ago)
Author:
donncha
Message:

Merge with WP 2.3 - testing use only!
Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-comments-post.php

    r972 r1069  
    11<?php 
    2 if ($_SERVER["REQUEST_METHOD"] != "POST") { 
    3     header('Allow: POST'); 
    4         header("HTTP/1.1 405 Method Not Allowed"); 
    5         header("Content-type: text/plain"); 
    6     exit; 
     2if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { 
     3       header('Allow: POST'); 
     4        header('HTTP/1.1 405 Method Not Allowed'); 
     5        header('Content-Type: text/plain'); 
     6       exit; 
    77} 
    88require( dirname(__FILE__) . '/wp-config.php' ); 
     
    2020        do_action('comment_closed', $comment_post_ID); 
    2121        wp_die( __('Sorry, comments are closed for this item.') ); 
    22 } elseif ( 'draft' == $status->post_status ) { 
     22} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) { 
    2323        do_action('comment_on_draft', $comment_post_ID); 
    2424        exit; 
     
    6464 
    6565$comment = get_comment($comment_id); 
    66 if ( !$user->ID ) : 
     66if ( !$user->ID ) { 
    6767        setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); 
    6868        setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); 
    6969        setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); 
    70 endif; 
     70
    7171 
    7272$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id;