]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/edit.php
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / edit.php
index b7cdcf45b57028652f4f006e4085ce95e165a55a..467a9bb540314d995ca9aac9c967a9bd50a39201 100644 (file)
@@ -20,8 +20,8 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
        }
 
        $sendback = wp_get_referer();
        }
 
        $sendback = wp_get_referer();
-       if (strpos($sendback, 'post.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';
-       elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
+       if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php');
+       elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
 
        wp_redirect($sendback);
        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
 
        wp_redirect($sendback);
@@ -116,6 +116,7 @@ endif;
 ?>
 
 <p id="post-search">
 ?>
 
 <p id="post-search">
+       <label class="hidden" for="post-search-input"><?php _e( 'Search Posts' ); ?>:</label>
        <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
        <input type="submit" value="<?php _e( 'Search Posts' ); ?>" class="button" />
 </p>
        <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
        <input type="submit" value="<?php _e( 'Search Posts' ); ?>" class="button" />
 </p>
@@ -205,7 +206,7 @@ if ( $page_links )
 
 if ( 1 == count($posts) && is_singular() ) :
 
 
 if ( 1 == count($posts) && is_singular() ) :
 
-       $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
+       $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
        if ( $comments ) :
                // Make sure comments, post, and post_author are cached
                update_comment_cache($comments);
        if ( $comments ) :
                // Make sure comments, post, and post_author are cached
                update_comment_cache($comments);