diff options
-rw-r--r-- | wp-admin/admin-functions.php | 40 | ||||
-rw-r--r-- | wp-admin/edit-category-form.php | 4 | ||||
-rw-r--r-- | wp-admin/edit-form-advanced.php | 5 | ||||
-rw-r--r-- | wp-admin/edit-link-form.php | 7 | ||||
-rw-r--r-- | wp-admin/wpmu-blogs.php | 10 | ||||
-rw-r--r-- | wp-admin/wpmu-edit.php | 8 | ||||
-rw-r--r-- | wp-admin/wpmu-users.php | 7 |
7 files changed, 15 insertions, 66 deletions
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index e2ef065..03a6887 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -2233,46 +2233,6 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) { } } -function autocomplete_css() { - ?> -<style type='text/css'> - div.autocomplete { - position:absolute; - width:200px; - background-color:white; - border:1px solid #888; - margin:0px; - padding:0px; - } - div.autocomplete ul { - list-style-type:none; - margin:0px; - padding:0px; - } - div.autocomplete ul li.selected { background-color: #ffb;} - div.autocomplete ul li { - list-style-type:none; - display:block; - margin:0; - padding:2px; - height:32px; - cursor:pointer; - } -</style> -<?php -} -function autocomplete_textbox( $url, $search_field, $results_field ) { - wp_print_scripts('scriptaculous-controls'); - ?> - -<script type="text/javascript"> -function load_autocompleter() { - new Ajax.Autocompleter("<?php echo $search_field ?>", "<?php echo $results_field ?>", "<?php echo $url ?>", {paramName: "search", minChars: 3}); -} -addLoadEvent( load_autocompleter ); -</script> -<?php -} function update_blog_public($old_value, $value) { global $wpdb; diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 2c0e036..a0c9f38 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -23,11 +23,10 @@ if ( ! empty($cat_ID) ) { <input type="hidden" name="action" value="<?php echo $action ?>" /> <input type="hidden" name="cat_ID" value="<?php echo $category->cat_ID ?>" /> <?php wp_nonce_field($nonce_action); ?> -<?php autocomplete_css(); ?> <table class="editform" width="100%" cellspacing="2" cellpadding="5"> <tr> <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th> - <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->cat_name); ?>" size="40" /><div id="searchresults" class="autocomplete"></div></td> + <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->cat_name); ?>" size="40" /></td> </tr> <tr> <th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th> @@ -40,7 +39,6 @@ if ( ! empty($cat_ID) ) { <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description); ?></textarea></td> </tr> </table> -<?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "cat_name", "searchresults" ); ?> <p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> <?php do_action('edit_category_form', $category); ?> </form> diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index c2e6439..c07ae4c 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -63,7 +63,6 @@ function focusit() { addLoadEvent(focusit); </script> <?php endif; ?> -<?php autocomplete_css(); ?> <div id="poststuff"> <div id="moremeta"> @@ -73,10 +72,6 @@ addLoadEvent(focusit); <h3 class="dbx-handle"><?php _e('Categories') ?></h3> <div class="dbx-content"> <p id="jaxcat"></p> -<?php if ( current_user_can('manage_categories') ) : ?> -<div id="searchresults" class="autocomplete"></div> -<?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "newcat", "searchresults" ); ?> -<?php endif; ?> <ul id="categorychecklist"><?php dropdown_categories(); ?></ul></div> </fieldset> diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index c81ff05..3935584 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -39,16 +39,11 @@ function xfn_check($class, $value = '', $type = 'check') { <div id="moremeta">
<div id="grabit" class="dbx-group">
-<?php autocomplete_css(); ?>
<fieldset id="categorydiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
<div class="dbx-content">
<p id="jaxcat"></p>
-<?php if ( current_user_can('manage_categories') ) : ?>
-<div id="searchresults" class="autocomplete"></div>
-<?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "newcat", "searchresults" ); ?>
-<?php endif; ?>
-<ul id="categorychecklist"><?php dropdown_categories(get_option('default_link_category')); ?></ul>
+<ul id="categorychecklist"><?php dropdown_link_categories(get_option('default_link_category')); ?></ul>
</div>
</fieldset>
diff --git a/wp-admin/wpmu-blogs.php b/wp-admin/wpmu-blogs.php index 8026db4..11bd3e4 100644 --- a/wp-admin/wpmu-blogs.php +++ b/wp-admin/wpmu-blogs.php @@ -199,11 +199,10 @@ switch( $_GET[ 'action' ] ) { } print "<h3>" . __('Add a new user') . "</h3>"; ?> -<?php autocomplete_css(); ?> <p><?php _e('As you type WordPress will offer you a choice of usernames.<br /> Click them to select and hit <em>Update Options</em> to add the user.') ?></p> <table> <tr><th scope="row"><?php _e('User Login:') ?> </th><td><input type="text" name="newuser" id="newuser"></td></tr> -<tr><td></td><td><div id="searchresults" class="autocomplete"></div></td> </tr> +<tr><td></td><td></td> </tr> <tr> <th scope="row"><?php _e('Role:') ?></th> <td><select name="new_role" id="new_role"><?php @@ -222,8 +221,7 @@ switch( $_GET[ 'action' ] ) { </div> <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> -</p> -<?php autocomplete_textbox( "wpmu-edit.php?action=searchusers&search=", "newuser", "searchresults" ); ?> +</p> </td> </table> @@ -313,7 +311,7 @@ function check_all_rows() { </script> <h2><?php _e ('Blogs') ?></h2> -<form name="searchform" action="wpmu-blogs.php" method="get" style="float: left; width: 16em; margin-right: 3em;"> +<form name="searchform" action="wpmu-blogs.php" method="get" style="float: left; margin-right: 3em;"> <table><td> <fieldset> <legend><?php _e('Search Blogs…') ?></legend> @@ -328,7 +326,7 @@ function check_all_rows() { ?><a href="/wp-admin/wpmu-users.php?action=users&s=<?php echo wp_specialchars($_GET[ 's' ], 1) ?>"><?php _e('Search Users:') ?> <?php echo wp_specialchars($_GET[ 's' ], 1) ?></a><?php } ?> - </td><td> + </td><td valign='top'> <fieldset> <legend><?php _e('Blog Navigation') ?></legend> <?php diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php index dd7bd06..f2a308b 100644 --- a/wp-admin/wpmu-edit.php +++ b/wp-admin/wpmu-edit.php @@ -24,7 +24,7 @@ switch( $_REQUEST[ 'action' ] ) { update_site_option( "limited_email_domains", '' ); } if( $_POST[ 'banned_email_domains' ] != '' ) { - update_site_option( "banned_email_domains", split( ' ', $_POST[ 'banned_email_domains' ] ) ); + update_site_option( "banned_email_domains", split( ' ', stripslashes($_POST[ 'banned_email_domains' ]) ) ); } else { update_site_option( "banned_email_domains", '' ); } @@ -212,6 +212,7 @@ switch( $_REQUEST[ 'action' ] ) { $userdata = get_userdata($userid); $_POST[ 'pass1' ] = $_POST[ 'pass2' ] = $pass; $_POST[ 'email' ] = $userdata->user_email; + $_POST[ 'rich_editing' ] = $userdata->rich_editing; edit_user( $userid ); if( $cap == null ) $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE user_id = '{$userid}' AND meta_key = '{$wpmuBaseTablePrefix}{$wpdb->blogid}_capabilities' AND meta_value = 'a:0:{}'" ); @@ -240,7 +241,7 @@ switch( $_REQUEST[ 'action' ] ) { check_admin_referer('deleteblog'); if( $id != '0' && $id != '1' ) wpmu_delete_blog( $id, true ); - wp_redirect( add_query_arg( "updated", "blogdeleted", $_POST[ 'ref' ] ) ); + wp_redirect( add_query_arg( "updated", "blogdeleted", $_SERVER[ 'HTTP_REFERER' ] ) ); die(); break; case "allblogs": @@ -254,7 +255,8 @@ switch( $_REQUEST[ 'action' ] ) { if( $_POST[ 'blogfunction' ] == 'delete' ) { wpmu_delete_blog( $val, true ); } elseif( $_POST[ 'blogfunction' ] == 'spam' ) { - update_blog_status( $val, "spam", '1' ); + update_blog_status( $val, "spam", '1', 0 ); + set_time_limit(60); } } } diff --git a/wp-admin/wpmu-users.php b/wp-admin/wpmu-users.php index 986361b..6a4f97e 100644 --- a/wp-admin/wpmu-users.php +++ b/wp-admin/wpmu-users.php @@ -32,7 +32,7 @@ switch( $_REQUEST[ 'action' ] ) { if( $_POST[ 'userfunction' ] == 'delete' ) { wpmu_delete_user($val); } elseif( $_POST[ 'userfunction' ] == 'spam' ) { - $blogs = get_blogs_of_user( $val ); + $blogs = get_blogs_of_user( $val, true ); if( is_array( $blogs ) ) { while( list( $key, $details ) = each( $blogs ) ) { update_blog_status( $details->userblog_id, "spam", '1' ); @@ -43,7 +43,7 @@ switch( $_REQUEST[ 'action' ] ) { } } } - wpmu_admin_do_redirect( $_SERVER['HTTP_REFERER'] ); + wp_redirect( add_query_arg( "updated", "true", $_SERVER[ 'HTTP_REFERER' ] ) ); die(); break; } @@ -294,7 +294,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { break; case 'blogs': - $blogs = get_blogs_of_user( $user[ 'ID' ] ); + $blogs = get_blogs_of_user( $user[ 'ID' ], true ); ?> <td><?php if( is_array( $blogs ) ) while( list( $key, $val ) = each( $blogs ) ) { @@ -341,6 +341,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { <p><input type=button value="<?php _e('Check All') ?>" onClick="this.value=check_all_rows()" /> </p> <p><?php _e('Selected Users:') ?></p> <ul> + <?php wp_nonce_field( "allusers" ); ?> <li><input type='radio' name='userfunction' id='delete' value='delete' /> <label for='delete'><?php _e('Delete') ?></label></li> <li><input type='radio' name='userfunction' id='spam' value='spam' /> <label for='spam'><?php _e('Mark as Spammers') ?></label></li> </ul> |