Changeset 636
- Timestamp:
- 07/05/06 11:55:16 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (3 diffs)
- trunk/wp-admin/admin.php (modified) (1 diff)
- trunk/wp-admin/categories.php (modified) (1 diff)
- trunk/wp-admin/comment.php (modified) (1 diff)
- trunk/wp-admin/index.php (modified) (2 diffs)
- trunk/wp-admin/inline-uploading.php (modified) (1 diff)
- trunk/wp-admin/link-add.php (modified) (1 diff)
- trunk/wp-admin/link-manager.php (modified) (4 diffs)
- trunk/wp-admin/link.php (modified) (1 diff)
- trunk/wp-admin/menu.php (modified) (4 diffs)
- trunk/wp-admin/moderation.php (modified) (1 diff)
- trunk/wp-admin/options-head.php (modified) (1 diff)
- trunk/wp-admin/options.php (modified) (1 diff)
- trunk/wp-admin/page.php (modified) (1 diff)
- trunk/wp-admin/plugin-editor.php (modified) (3 diffs)
- trunk/wp-admin/post.php (modified) (1 diff)
- trunk/wp-admin/templates.php (modified) (2 diffs)
- trunk/wp-admin/theme-editor.php (modified) (3 diffs)
- trunk/wp-admin/upgrade-schema.php (modified) (2 diffs)
- trunk/wp-admin/user-edit.php (modified) (2 diffs)
- trunk/wp-admin/wp-admin.css (modified) (1 diff)
- trunk/wp-includes/default-filters.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (2 diffs)
- trunk/wp-includes/functions.php (modified) (2 diffs)
- trunk/wp-includes/post.php (modified) (1 diff)
- trunk/wp-includes/query.php (modified) (5 diffs)
- trunk/wp-login.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r614 r636 414 414 415 415 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')) 417 417 $user->role = $_POST['role']; 418 418 } … … 713 713 <td> 714 714 <?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>'); ?> 716 716 </td> 717 717 <td><?php the_author() ?></td> … … 1967 1967 } 1968 1968 1969 function 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 1969 1987 function autocomplete_css() { 1970 1988 ?> trunk/wp-admin/admin.php
r581 r636 34 34 $time_format = get_settings('time_format'); 35 35 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 } 36 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); 51 37 52 38 wp_enqueue_script( 'fat' ); trunk/wp-admin/categories.php
r599 r636 5 5 $parent_file = 'edit.php'; 6 6 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 } 7 wp_reset_vars(array('action', 'cat')); 22 8 23 9 switch($action) { trunk/wp-admin/comment.php
r599 r636 4 4 $parent_file = 'edit.php'; 5 5 $submenu_file = 'edit-comments.php'; 6 $wpvarstoreset = array('action');7 6 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 } 7 wp_reset_vars(array('action')); 22 8 23 9 if ( isset( $_POST['deletecomment'] ) ) trunk/wp-admin/index.php
r632 r636 56 56 ?> 57 57 </ul> 58 59 58 </div> 60 59 <?php endif; ?> … … 113 112 <?php do_action('activity_box_end'); ?> 114 113 </div> 114 115 115 <h3><?php _e('Welcome to WordPress MU'); ?></h3> 116 116 trunk/wp-admin/inline-uploading.php
r599 r636 8 8 die(__('You do not have permission to upload files.')); 9 9 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 } 10 wp_reset_vars(array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment')); 26 11 27 12 $post = (int) $post; trunk/wp-admin/link-add.php
r550 r636 7 7 8 8 9 $wpvarstoreset =array('action', 'cat_id', 'linkurl', 'name', 'image',9 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 10 10 'description', 'visible', 'target', 'category', 'link_id', 11 11 '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[]')); 27 13 28 14 wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') ); trunk/wp-admin/link-manager.php
r595 r636 11 11 wp_enqueue_script( 'listman' ); 12 12 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 } 13 wp_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[]')); 29 14 30 15 if (empty ($cat_id)) … … 107 92 <option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('URI') ?></option> 108 93 </select> 109 <input type="submit" name="action" value="<?php _e('Update »') ?>" /> 94 <input type="submit" name="action" value="<?php _e('Update »') ?>" /></p> 110 95 </form> 111 96 … … 177 162 178 163 echo '<td><a href="link.php?link_id='.$link->link_id.'&action=edit" class="edit">'.__('Edit').'</a></td>'; 179 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." class='delete'onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the "%s" bookmark to %s.\\n"Cancel" to stop, "OK" 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.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the "%s" bookmark to %s.\\n"Cancel" to stop, "OK" to delete."), js_escape($link->link_name), js_escape($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>'; 180 165 echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; 181 166 echo "\n </tr>\n"; … … 188 173 189 174 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?> »" onclick="return confirm('<?php _e("You are about to delete these bookmarks permanently \\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /></p> 175 </form> 190 176 </div> 191 </form>192 193 177 <?php 194 178 if( wp_cache_get( "checked_bookmarks_table", "options" ) == false ) { trunk/wp-admin/link.php
r599 r636 2 2 require_once ('admin.php'); 3 3 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 } 4 wp_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[]')); 20 5 21 6 if ('' != $_POST['deletebookmarks']) trunk/wp-admin/menu.php
r621 r636 5 5 // The minimum level the user needs to access the item: between 0 and 10 6 6 // The URL of the item's file 7 $menu[0] = array(__('Dashboard'), 'read', 'index.php'); 8 9 if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php') ) 10 $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php'); 11 else 12 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 13 if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') ) 14 $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); 15 else 16 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 17 7 18 8 19 $menu_perms = get_site_option( "menu_items" ); … … 10 21 $menu_perms = array(); 11 22 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');15 23 $menu[20] = array(__('Bookmarks'), 'manage_links', 'link-manager.php'); 16 24 $menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); … … 22 30 $menu[35] = array(__('Profile'), 'read', 'profile.php'); 23 31 $menu[40] = array(__('Options'), 'manage_options', 'options-general.php'); 32 24 33 25 34 $submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php'); … … 118 127 $submenu[ 'wpmu-admin.php' ][5] = array( 'Blogs', '10', 'wpmu-blogs.php' ); 119 128 $submenu[ 'wpmu-admin.php' ][10] = array( 'Users', '10', 'wpmu-users.php' ); 120 $submenu[ 'wpmu-admin.php' ][15] = array( 'Feeds', '10', 'wpmu-feeds.php' );121 129 $submenu[ 'wpmu-admin.php' ][20] = array( 'Themes', '10', 'wpmu-themes.php' ); 122 130 $submenu[ 'wpmu-admin.php' ][25] = array( 'Options', '10', 'wpmu-options.php' ); trunk/wp-admin/moderation.php
r599 r636 6 6 wp_enqueue_script( 'admin-comments' ); 7 7 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 } 8 wp_reset_vars(array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky')); 23 9 24 10 $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')); ?> 19 2 20 3 <br clear="all" /> trunk/wp-admin/options.php
r595 r636 6 6 $parent_file = 'options-general.php'; 7 7 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 } 8 wp_reset_vars(array('action')); 23 9 24 10 if ( !current_user_can('manage_options') ) trunk/wp-admin/page.php
r599 r636 6 6 7 7 $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 } 8 wp_reset_vars(array('action')); 25 9 26 10 if (isset($_POST['deletepost'])) { trunk/wp-admin/plugin-editor.php
r599 r636 6 6 $parent_file = 'plugins.php'; 7 7 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 } 8 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 23 9 24 10 $plugins = get_plugins(); … … 39 25 40 26 if ( !current_user_can('edit_plugins') ) 41 die('<p>'.__('You havedo 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>'); 42 28 43 29 $newcontent = stripslashes($_POST['newcontent']); … … 59 45 require_once('admin-header.php'); 60 46 if ( !current_user_can('edit_plugins') ) 61 die('<p>'.__('You havedo 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>'); 62 48 63 49 update_recently_edited("wp-content/plugins/$file"); trunk/wp-admin/post.php
r599 r636 4 4 $parent_file = 'edit.php'; 5 5 $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' );7 6 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 } 7 wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder')); 22 8 23 9 if ( isset( $_POST['deletepost'] ) ) trunk/wp-admin/templates.php
r599 r636 5 5 $parent_file = 'edit.php'; 6 6 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 } 7 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 22 8 23 9 $recents = get_option('recently_edited'); … … 66 52 67 53 if ( ! current_user_can('edit_files') ) 68 die('<p>'.__('You havedo 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>'); 69 55 70 56 if ( strstr( $file, 'wp-config.php' ) ) trunk/wp-admin/theme-editor.php
r599 r636 6 6 $parent_file = 'themes.php'; 7 7 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 } 8 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme')); 23 9 24 10 $themes = get_themes(); … … 52 38 53 39 if ( !current_user_can('edit_themes') ) 54 die('<p>'.__('You havedo 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>'); 55 41 56 42 $newcontent = stripslashes($_POST['newcontent']); … … 73 59 require_once('admin-header.php'); 74 60 if ( !current_user_can('edit_themes') ) 75 die('<p>'.__('You havedo 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>'); 76 62 77 63 update_recently_edited($file); trunk/wp-admin/upgrade-schema.php
r611 r636 280 280 add_option('template', 'default'); 281 281 add_option('stylesheet', 'default'); 282 add_option('comment_whitelist', 0);282 add_option('comment_whitelist', 1); 283 283 add_option('page_uris'); 284 284 add_option('blacklist_keys'); 285 285 add_option('comment_registration', 0); 286 add_option('open_proxy_check', 1);286 add_option('open_proxy_check', 0); 287 287 add_option('rss_language', 'en'); 288 288 add_option('html_type', 'text/html'); … … 310 310 add_option('default_link_category', 2); 311 311 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' );319 312 320 313 // Delete unused options trunk/wp-admin/user-edit.php
r599 r636 9 9 $submenu_file = 'users.php'; 10 10 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 } 11 wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer')); 26 12 27 13 $wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer)); … … 103 89 <input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" /> 104 90 </label></p> 91 105 92 <p><label><?php _e('Role:') ?><br /> 106 93 <?php trunk/wp-admin/wp-admin.css
r559 r636 904 904 padding-bottom: 15px; 905 905 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; 906 911 } 907 912 trunk/wp-includes/default-filters.php
r592 r636 43 43 add_filter('comment_text', 'convert_chars'); 44 44 add_filter('comment_text', 'make_clickable'); 45 add_filter('comment_text', 'force_balance_tags', 25); 45 46 add_filter('comment_text', 'wpautop', 30); 46 47 add_filter('comment_text', 'convert_smilies', 20); trunk/wp-includes/formatting.php
r595 r636 71 71 $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); 72 72 $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 } 74 78 $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); 75 79 $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!', '$1', $pee); … … 506 510 } 507 511 512 function force_balance_tags($text) { 513 return balanceTags($text, 0, true); 514 } 508 515 509 516 function format_to_edit($content, $richedit = false) { trunk/wp-includes/functions.php
r599 r636 830 830 831 831 function 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)); 833 833 } 834 834 … … 1037 1037 if ( get_option('open_proxy_check') && isset($ipnum) ) { 1038 1038 $rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) ); 1039 $lookup = $rev_ip . '. opm.blitzed.org.';1039 $lookup = $rev_ip . '.sbl-xbl.spamhaus.org.'; 1040 1040 if ( $lookup != gethostbyname( $lookup ) ) 1041 1041 return true; trunk/wp-includes/post.php
r592 r636 1260 1260 1261 1261 if ( $file ) 1262 add_post_meta($post_ID, '_wp_attached_file', $file);1262 add_post_meta($post_ID, '_wp_attached_file', quotemeta( $file ) ); 1263 1263 1264 1264 clean_post_cache($post_ID); trunk/wp-includes/query.php
r592 r636 556 556 $q['page'] = trim($q['page'], '/'); 557 557 $q['page'] = (int) $q['page']; 558 $q['page'] = abs($q['page']); 558 559 } 559 560 … … 843 844 844 845 if ( $this->is_attachment ) { 845 $where .= ' AND (post_type = "attachment")';846 $where .= " AND (post_type = 'attachment')"; 846 847 } elseif ($this->is_page) { 847 $where .= ' AND (post_type = "page")';848 $where .= " AND (post_type = 'page')"; 848 849 } elseif ($this->is_single) { 849 $where .= ' AND (post_type = "post")';850 $where .= " AND (post_type = 'post')"; 850 851 } else { 851 852 $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; … … 876 877 // Paging 877 878 if (empty($q['nopaging']) && ! $this->is_single && ! $this->is_page) { 878 $page = $q['paged'];879 $page = abs(intval($q['paged'])); 879 880 if (empty($page)) { 880 881 $page = 1; … … 882 883 883 884 if (($q['what_to_show'] == 'posts')) { 885 $q['offset'] = abs(intval($q['offset'])); 884 886 if ( empty($q['offset']) ) { 885 887 $pgstrt = ''; … … 887 889 $limits = 'LIMIT '.$pgstrt.$q['posts_per_page']; 888 890 } else { // we're ignoring $page and using 'offset' 889 $pgstrt = intval($q['offset']). ', ';891 $pgstrt = $q['offset'] . ', '; 890 892 $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; 891 893 } trunk/wp-login.php
r599 r636 208 208 $error = __('Your session has expired.'); 209 209 } 210 } else if ( $user_login || $user_pass ) { 211 $error = __('<strong>Error</strong>: The password field is empty.'); 210 212 } 211 213 ?>
