Changeset 636

Show
Ignore:
Timestamp:
07/05/06 11:55:16 (2 years ago)
Author:
donncha
Message:

WP Merge.
Delete feed code and sql

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r614 r636  
    414414 
    415415        if (isset ($_POST['role']) && current_user_can('edit_users')) { 
    416                 if ($user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap('edit_users')) 
     416                if($user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap('edit_users')) 
    417417                        $user->role = $_POST['role']; 
    418418        } 
     
    713713    <td> 
    714714      <?php echo $pad; ?><?php the_title() ?> 
    715       <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td> 
     715      <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?> 
    716716    </td>  
    717717    <td><?php the_author() ?></td> 
     
    19671967} 
    19681968 
     1969function wp_reset_vars($vars) { 
     1970        for ($i=0; $i<count($vars); $i += 1) { 
     1971                $var = $vars[$i]; 
     1972                global $$var; 
     1973 
     1974                if (!isset($$var)) { 
     1975                        if (empty($_POST["$var"])) { 
     1976                                if (empty($_GET["$var"])) 
     1977                                        $$var = ''; 
     1978                                else 
     1979                                        $$var = $_GET["$var"]; 
     1980                        } else { 
     1981                                $$var = $_POST["$var"]; 
     1982                        } 
     1983                } 
     1984        } 
     1985} 
     1986 
    19691987function autocomplete_css() { 
    19701988        ?> 
  • trunk/wp-admin/admin.php

    r581 r636  
    3434$time_format = get_settings('time_format'); 
    3535 
    36 $wpvarstoreset = array('profile','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); 
    37 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    38     $wpvar = $wpvarstoreset[$i]; 
    39     if (!isset($$wpvar)) { 
    40         if (empty($_POST["$wpvar"])) { 
    41             if (empty($_GET["$wpvar"])) { 
    42                 $$wpvar = ''; 
    43             } else { 
    44                 $$wpvar = $_GET["$wpvar"]; 
    45             } 
    46         } else { 
    47             $$wpvar = $_POST["$wpvar"]; 
    48         } 
    49     } 
    50 
     36wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); 
    5137 
    5238wp_enqueue_script( 'fat' ); 
  • trunk/wp-admin/categories.php

    r599 r636  
    55$parent_file = 'edit.php'; 
    66 
    7 $wpvarstoreset = array('action','cat'); 
    8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    9     $wpvar = $wpvarstoreset[$i]; 
    10     if (!isset($$wpvar)) { 
    11         if (empty($_POST["$wpvar"])) { 
    12             if (empty($_GET["$wpvar"])) { 
    13                 $$wpvar = ''; 
    14             } else { 
    15                 $$wpvar = $_GET["$wpvar"]; 
    16             } 
    17         } else { 
    18             $$wpvar = $_POST["$wpvar"]; 
    19         } 
    20     } 
    21 
     7wp_reset_vars(array('action', 'cat')); 
    228 
    239switch($action) { 
  • trunk/wp-admin/comment.php

    r599 r636  
    44$parent_file = 'edit.php'; 
    55$submenu_file = 'edit-comments.php'; 
    6 $wpvarstoreset = array('action'); 
    76 
    8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    9         $wpvar = $wpvarstoreset[$i]; 
    10         if (!isset($$wpvar)) { 
    11                 if (empty($_POST["$wpvar"])) { 
    12                         if (empty($_GET["$wpvar"])) { 
    13                                 $$wpvar = ''; 
    14                         } else { 
    15                         $$wpvar = $_GET["$wpvar"]; 
    16                         } 
    17                 } else { 
    18                         $$wpvar = $_POST["$wpvar"]; 
    19                 } 
    20         } 
    21 
     7wp_reset_vars(array('action')); 
    228 
    239if ( isset( $_POST['deletecomment'] ) ) 
  • trunk/wp-admin/index.php

    r632 r636  
    5656?> 
    5757</ul> 
    58  
    5958</div> 
    6059<?php endif; ?> 
     
    113112<?php do_action('activity_box_end'); ?> 
    114113</div> 
     114 
    115115<h3><?php _e('Welcome to WordPress MU'); ?></h3> 
    116116 
  • trunk/wp-admin/inline-uploading.php

    r599 r636  
    88        die(__('You do not have permission to upload files.')); 
    99 
    10 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment'); 
    11  
    12 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    13         $wpvar = $wpvarstoreset[$i]; 
    14         if (!isset($$wpvar)) { 
    15                 if (empty($_POST["$wpvar"])) { 
    16                         if (empty($_GET["$wpvar"])) { 
    17                                 $$wpvar = ''; 
    18                         } else { 
    19                         $$wpvar = $_GET["$wpvar"]; 
    20                         } 
    21                 } else { 
    22                         $$wpvar = $_POST["$wpvar"]; 
    23                 } 
    24         } 
    25 
     10wp_reset_vars(array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment')); 
    2611 
    2712$post = (int) $post; 
  • trunk/wp-admin/link-add.php

    r550 r636  
    77 
    88 
    9 $wpvarstoreset = array('action', 'cat_id', 'linkurl', 'name', 'image', 
     9wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 
    1010                       'description', 'visible', 'target', 'category', 'link_id', 
    1111                       'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 
    12                        'notes', 'linkcheck[]'); 
    13 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    14     $wpvar = $wpvarstoreset[$i]; 
    15     if (!isset($$wpvar)) { 
    16         if (empty($_POST["$wpvar"])) { 
    17             if (empty($_GET["$wpvar"])) { 
    18                 $$wpvar = ''; 
    19             } else { 
    20                 $$wpvar = $_GET["$wpvar"]; 
    21             } 
    22         } else { 
    23             $$wpvar = $_POST["$wpvar"]; 
    24         } 
    25     } 
    26 
     12                       'notes', 'linkcheck[]')); 
    2713 
    2814wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') ); 
  • trunk/wp-admin/link-manager.php

    r595 r636  
    1111wp_enqueue_script( 'listman' ); 
    1212 
    13 $wpvarstoreset = array ('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'); 
    14  
    15 for ($i = 0; $i < count($wpvarstoreset); $i += 1) { 
    16         $wpvar = $wpvarstoreset[$i]; 
    17         if (!isset ($$wpvar)) { 
    18                 if (empty ($_POST["$wpvar"])) { 
    19                         if (empty ($_GET["$wpvar"])) { 
    20                                 $$wpvar = ''; 
    21                         } else { 
    22                                 $$wpvar = $_GET["$wpvar"]; 
    23                         } 
    24                 } else { 
    25                         $$wpvar = $_POST["$wpvar"]; 
    26                 } 
    27         } 
    28 
     13wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 
    2914 
    3015if (empty ($cat_id)) 
     
    10792<option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('URI') ?></option> 
    10893</select> 
    109 <input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /> 
     94<input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /></p> 
    11095</form> 
    11196 
     
    177162 
    178163                echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; 
    179                 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." class='delete' onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the &quot;%s&quot; bookmark to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($link->link_name), js_escape($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>'; 
     164                echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the &quot;%s&quot; bookmark to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($link->link_name), js_escape($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>'; 
    180165                echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; 
    181166                echo "\n    </tr>\n"; 
     
    188173 
    189174<p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?> &raquo;" onclick="return confirm('<?php _e("You are about to delete these bookmarks permanently \\n  \'Cancel\' to stop, \'OK\' to delete.") ?>')" /></p> 
     175</form> 
    190176</div> 
    191 </form> 
    192  
    193177<?php 
    194178if( wp_cache_get( "checked_bookmarks_table", "options" ) == false ) { 
  • trunk/wp-admin/link.php

    r599 r636  
    22require_once ('admin.php'); 
    33 
    4 $wpvarstoreset = array ('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'); 
    5  
    6 for ($i = 0; $i < count($wpvarstoreset); $i += 1) { 
    7         $wpvar = $wpvarstoreset[$i]; 
    8         if (!isset ($$wpvar)) { 
    9                 if (empty ($_POST["$wpvar"])) { 
    10                         if (empty ($_GET["$wpvar"])) { 
    11                                 $$wpvar = ''; 
    12                         } else { 
    13                                 $$wpvar = $_GET["$wpvar"]; 
    14                         } 
    15                 } else { 
    16                         $$wpvar = $_POST["$wpvar"]; 
    17                 } 
    18         } 
    19 
     4wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 
    205 
    216if ('' != $_POST['deletebookmarks']) 
  • trunk/wp-admin/menu.php

    r621 r636  
    55// The minimum level the user needs to access the item: between 0 and 10 
    66// The URL of the item's file 
     7$menu[0] = array(__('Dashboard'), 'read', 'index.php'); 
     8 
     9if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php') ) 
     10        $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php'); 
     11else 
     12        $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 
     13if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') ) 
     14        $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); 
     15else 
     16        $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 
     17 
    718 
    819$menu_perms = get_site_option( "menu_items" ); 
     
    1021        $menu_perms = array(); 
    1122 
    12 $menu[0] = array(__('Dashboard'), 'read', 'index.php'); 
    13 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 
    14 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 
    1523$menu[20] = array(__('Bookmarks'), 'manage_links', 'link-manager.php'); 
    1624$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); 
     
    2230        $menu[35] = array(__('Profile'), 'read', 'profile.php'); 
    2331$menu[40] = array(__('Options'), 'manage_options', 'options-general.php'); 
     32 
    2433 
    2534$submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php'); 
     
    118127        $submenu[ 'wpmu-admin.php' ][5] = array( 'Blogs', '10', 'wpmu-blogs.php' ); 
    119128        $submenu[ 'wpmu-admin.php' ][10] = array( 'Users', '10', 'wpmu-users.php' ); 
    120         $submenu[ 'wpmu-admin.php' ][15] = array( 'Feeds', '10', 'wpmu-feeds.php' ); 
    121129        $submenu[ 'wpmu-admin.php' ][20] = array( 'Themes', '10', 'wpmu-themes.php' ); 
    122130        $submenu[ 'wpmu-admin.php' ][25] = array( 'Options', '10', 'wpmu-options.php' ); 
  • trunk/wp-admin/moderation.php

    r599 r636  
    66wp_enqueue_script( 'admin-comments' ); 
    77 
    8 $wpvarstoreset = array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky'); 
    9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    10         $wpvar = $wpvarstoreset[$i]; 
    11         if (!isset($$wpvar)) { 
    12                 if (empty($_POST["$wpvar"])) { 
    13                         if (empty($_GET["$wpvar"])) { 
    14                                 $$wpvar = ''; 
    15                         } else { 
    16                                 $$wpvar = $_GET["$wpvar"]; 
    17                         } 
    18                 } else { 
    19                         $$wpvar = $_POST["$wpvar"]; 
    20                 } 
    21         } 
    22 
     8wp_reset_vars(array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky')); 
    239 
    2410$comment = array(); 
  • trunk/wp-admin/options-head.php

    r136 r636  
    1 <?php 
    2  
    3 $wpvarstoreset = array('action','standalone', 'option_group_id'); 
    4 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    5         $wpvar = $wpvarstoreset[$i]; 
    6         if (!isset($$wpvar)) { 
    7                 if (empty($_POST["$wpvar"])) { 
    8                         if (empty($_GET["$wpvar"])) { 
    9                                 $$wpvar = ''; 
    10                         } else { 
    11                                 $$wpvar = $_GET["$wpvar"]; 
    12                         } 
    13                 } else { 
    14                         $$wpvar = $_POST["$wpvar"]; 
    15                 } 
    16         } 
    17 
    18 ?> 
     1<?php wp_reset_vars(array('action', 'standalone', 'option_group_id')); ?> 
    192 
    203<br clear="all" /> 
  • trunk/wp-admin/options.php

    r595 r636  
    66$parent_file = 'options-general.php'; 
    77 
    8 $wpvarstoreset = array('action'); 
    9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    10         $wpvar = $wpvarstoreset[$i]; 
    11         if (!isset($$wpvar)) { 
    12                 if (empty($_POST["$wpvar"])) { 
    13                         if (empty($_GET["$wpvar"])) { 
    14                                 $$wpvar = ''; 
    15                         } else { 
    16                                 $$wpvar = $_GET["$wpvar"]; 
    17                         } 
    18                 } else { 
    19                         $$wpvar = $_POST["$wpvar"]; 
    20                 } 
    21         } 
    22 
     8wp_reset_vars(array('action')); 
    239 
    2410if ( !current_user_can('manage_options') ) 
  • trunk/wp-admin/page.php

    r599 r636  
    66 
    77$wp_rewrite->flush_rules(); 
    8  
    9 $wpvarstoreset = array('action'); 
    10  
    11 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    12         $wpvar = $wpvarstoreset[$i]; 
    13         if (!isset($$wpvar)) { 
    14                 if (empty($_POST["$wpvar"])) { 
    15                         if (empty($_GET["$wpvar"])) { 
    16                                 $$wpvar = ''; 
    17                         } else { 
    18                         $$wpvar = $_GET["$wpvar"]; 
    19                         } 
    20                 } else { 
    21                         $$wpvar = $_POST["$wpvar"]; 
    22                 } 
    23         } 
    24 
     8wp_reset_vars(array('action')); 
    259 
    2610if (isset($_POST['deletepost'])) { 
  • trunk/wp-admin/plugin-editor.php

    r599 r636  
    66$parent_file = 'plugins.php'; 
    77 
    8 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file'); 
    9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    10         $wpvar = $wpvarstoreset[$i]; 
    11         if (!isset($$wpvar)) { 
    12                 if (empty($_POST["$wpvar"])) { 
    13                         if (empty($_GET["$wpvar"])) { 
    14                                 $$wpvar = ''; 
    15                         } else { 
    16                                 $$wpvar = $_GET["$wpvar"]; 
    17                         } 
    18                 } else { 
    19                         $$wpvar = $_POST["$wpvar"]; 
    20                 } 
    21         } 
    22 
     8wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 
    239 
    2410$plugins = get_plugins(); 
     
    3925 
    4026        if ( !current_user_can('edit_plugins') ) 
    41         die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 
     27               die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 
    4228 
    4329        $newcontent = stripslashes($_POST['newcontent']); 
     
    5945        require_once('admin-header.php'); 
    6046        if ( !current_user_can('edit_plugins') ) 
    61         die('<p>'.__('You have do not have sufficient permissions to edit plugins for this blog.').'</p>'); 
     47               die('<p>'.__('You do not have sufficient permissions to edit plugins for this blog.').'</p>'); 
    6248 
    6349        update_recently_edited("wp-content/plugins/$file"); 
  • trunk/wp-admin/post.php

    r599 r636  
    44$parent_file = 'edit.php'; 
    55$submenu_file = 'edit.php'; 
    6 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' ); 
    76 
    8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    9         $wpvar = $wpvarstoreset[$i]; 
    10         if (!isset($$wpvar)) { 
    11                 if (empty($_POST["$wpvar"])) { 
    12                         if (empty($_GET["$wpvar"])) { 
    13                                 $$wpvar = ''; 
    14                         } else { 
    15                         $$wpvar = $_GET["$wpvar"]; 
    16                         } 
    17                 } else { 
    18                         $$wpvar = $_POST["$wpvar"]; 
    19                 } 
    20         } 
    21 
     7wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder')); 
    228 
    239if ( isset( $_POST['deletepost'] ) ) 
  • trunk/wp-admin/templates.php

    r599 r636  
    55$parent_file =  'edit.php'; 
    66 
    7 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file'); 
    8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    9         $wpvar = $wpvarstoreset[$i]; 
    10         if (!isset($$wpvar)) { 
    11                 if (empty($_POST["$wpvar"])) { 
    12                         if (empty($_GET["$wpvar"])) { 
    13                                 $$wpvar = ''; 
    14                         } else { 
    15                                 $$wpvar = $_GET["$wpvar"]; 
    16                         } 
    17                 } else { 
    18                         $$wpvar = $_POST["$wpvar"]; 
    19                 } 
    20         } 
    21 
     7wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 
    228 
    239$recents = get_option('recently_edited'); 
     
    6652 
    6753        if ( ! current_user_can('edit_files') ) 
    68         die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 
     54               die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 
    6955 
    7056        if ( strstr( $file, 'wp-config.php' ) ) 
  • trunk/wp-admin/theme-editor.php

    r599 r636  
    66$parent_file = 'themes.php'; 
    77 
    8 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file', 'theme'); 
    9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    10         $wpvar = $wpvarstoreset[$i]; 
    11         if (!isset($$wpvar)) { 
    12                 if (empty($_POST["$wpvar"])) { 
    13                         if (empty($_GET["$wpvar"])) { 
    14                                 $$wpvar = ''; 
    15                         } else { 
    16                                 $$wpvar = $_GET["$wpvar"]; 
    17                         } 
    18                 } else { 
    19                         $$wpvar = $_POST["$wpvar"]; 
    20                 } 
    21         } 
    22 
     8wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme')); 
    239 
    2410$themes = get_themes(); 
     
    5238 
    5339        if ( !current_user_can('edit_themes') ) 
    54         die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 
     40               die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 
    5541 
    5642        $newcontent = stripslashes($_POST['newcontent']); 
     
    7359        require_once('admin-header.php'); 
    7460        if ( !current_user_can('edit_themes') ) 
    75         die('<p>'.__('You have do not have sufficient permissions to edit themes for this blog.').'</p>'); 
     61               die('<p>'.__('You do not have sufficient permissions to edit themes for this blog.').'</p>'); 
    7662 
    7763        update_recently_edited($file); 
  • trunk/wp-admin/upgrade-schema.php

    r611 r636  
    280280        add_option('template', 'default'); 
    281281        add_option('stylesheet', 'default'); 
    282         add_option('comment_whitelist', 0); 
     282        add_option('comment_whitelist', 1); 
    283283        add_option('page_uris'); 
    284284        add_option('blacklist_keys'); 
    285285        add_option('comment_registration', 0); 
    286         add_option('open_proxy_check', 1); 
     286        add_option('open_proxy_check', 0); 
    287287        add_option('rss_language', 'en'); 
    288288        add_option('html_type', 'text/html'); 
     
    310310        add_option('default_link_category', 2); 
    311311        add_option('show_on_front', 'posts'); 
    312  
    313         add_site_option( 'customizefeed1', '0' ); 
    314         add_site_option( 'customizefeed2', '0' ); 
    315         add_site_option( 'dashboardfeed1', 'http://wordpress.org/development/feed/' ); 
    316         add_site_option( 'dashboardfeed2', 'http://planet.wordpress.org/feed/' ); 
    317         add_site_option( 'dashboardfeed1name', 'WordPress Development Blog' ); 
    318         add_site_option( 'dashboardfeed2name', 'Other WordPress News' ); 
    319312 
    320313        // Delete unused options 
  • trunk/wp-admin/user-edit.php

    r599 r636  
    99$submenu_file = 'users.php'; 
    1010 
    11 $wpvarstoreset = array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'); 
    12 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 
    13         $wpvar = $wpvarstoreset[$i]; 
    14         if (!isset($$wpvar)) { 
    15                 if (empty($_POST["$wpvar"])) { 
    16                         if (empty($_GET["$wpvar"])) { 
    17                                 $$wpvar = ''; 
    18                         } else { 
    19                                 $$wpvar = $_GET["$wpvar"]; 
    20                         } 
    21                 } else { 
    22                         $$wpvar = $_POST["$wpvar"]; 
    23                 } 
    24         } 
    25 
     11wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer')); 
    2612 
    2713$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer)); 
     
    10389<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" /> 
    10490</label></p> 
     91 
    10592<p><label><?php _e('Role:') ?><br /> 
    10693<?php 
  • trunk/wp-admin/wp-admin.css

    r559 r636  
    904904        padding-bottom: 15px; 
    905905        padding-right: 2px; 
     906} 
     907 
     908#moremeta fieldset.dbx-box-closed { 
     909        background: url(images/box-butt.gif) no-repeat bottom; 
     910        padding-bottom: 9px; 
    906911} 
    907912 
  • trunk/wp-includes/default-filters.php

    r592 r636  
    4343add_filter('comment_text', 'convert_chars'); 
    4444add_filter('comment_text', 'make_clickable'); 
     45add_filter('comment_text', 'force_balance_tags', 25); 
    4546add_filter('comment_text', 'wpautop', 30); 
    4647add_filter('comment_text', 'convert_smilies', 20); 
  • trunk/wp-includes/formatting.php

    r595 r636  
    7171        $pee = preg_replace('!<p>\s*(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|hr|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)!', "$1", $pee); 
    7272        $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*</p>!', "$1", $pee);  
    73         if ($br) $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
     73        if ($br) { 
     74                $pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\\0")', $pee); 
     75                $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
     76                $pee = str_replace('<WPPreserveNewline />', "\n", $pee); 
     77        } 
    7478        $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee); 
    7579        $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!', '$1', $pee); 
     
    506510} 
    507511 
     512function force_balance_tags($text) { 
     513        return balanceTags($text, 0, true); 
     514} 
    508515 
    509516function format_to_edit($content, $richedit = false) { 
  • trunk/wp-includes/functions.php

    r599 r636  
    830830 
    831831function wp_nonce_url($actionurl, $action = -1) { 
    832         return add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl); 
     832        return wp_specialchars(add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl)); 
    833833} 
    834834 
     
    10371037        if ( get_option('open_proxy_check') && isset($ipnum) ) { 
    10381038                $rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) ); 
    1039                 $lookup = $rev_ip . '.opm.blitzed.org.'; 
     1039                $lookup = $rev_ip . '.sbl-xbl.spamhaus.org.'; 
    10401040                if ( $lookup != gethostbyname( $lookup ) ) 
    10411041                        return true; 
  • trunk/wp-includes/post.php

    r592 r636  
    12601260 
    12611261        if ( $file ) 
    1262                 add_post_meta($post_ID, '_wp_attached_file', $file ); 
     1262                add_post_meta($post_ID, '_wp_attached_file', quotemeta( $file ) ); 
    12631263 
    12641264        clean_post_cache($post_ID); 
  • trunk/wp-includes/query.php

    r592 r636  
    556556                        $q['page'] = trim($q['page'], '/'); 
    557557                        $q['page'] = (int) $q['page']; 
     558                        $q['page'] = abs($q['page']); 
    558559                } 
    559560 
     
    843844 
    844845                if ( $this->is_attachment ) { 
    845                         $where .= ' AND (post_type = "attachment")'
     846                        $where .= " AND (post_type = 'attachment')"
    846847                } elseif ($this->is_page) { 
    847                         $where .= ' AND (post_type = "page")'
     848                        $where .= " AND (post_type = 'page')"
    848849                } elseif ($this->is_single) { 
    849                         $where .= ' AND (post_type = "post")'
     850                        $where .= " AND (post_type = 'post')"
    850851                } else { 
    851852                        $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; 
     
    876877                // Paging 
    877878                if (empty($q['nopaging']) && ! $this->is_single && ! $this->is_page) { 
    878                         $page = $q['paged']
     879                        $page = abs(intval($q['paged']))
    879880                        if (empty($page)) { 
    880881                                $page = 1; 
     
    882883 
    883884                        if (($q['what_to_show'] == 'posts')) { 
     885                                $q['offset'] = abs(intval($q['offset'])); 
    884886                                if ( empty($q['offset']) ) { 
    885887                                        $pgstrt = ''; 
     
    887889                                        $limits = 'LIMIT '.$pgstrt.$q['posts_per_page']; 
    888890                                } else { // we're ignoring $page and using 'offset' 
    889                                         $pgstrt = intval($q['offset']) . ', '; 
     891                                        $pgstrt = $q['offset'] . ', '; 
    890892                                        $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; 
    891893                                } 
  • trunk/wp-login.php

    r599 r636  
    208208                                $error = __('Your session has expired.'); 
    209209                } 
     210        } else if ( $user_login || $user_pass ) { 
     211                $error = __('<strong>Error</strong>: The password field is empty.'); 
    210212        } 
    211213?>