summaryrefslogtreecommitdiffstats
path: root/wp-admin/wpmu-edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/wpmu-edit.php')
-rw-r--r--wp-admin/wpmu-edit.php74
1 files changed, 37 insertions, 37 deletions
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php
index 26293d1..173286f 100644
--- a/wp-admin/wpmu-edit.php
+++ b/wp-admin/wpmu-edit.php
@@ -24,18 +24,18 @@ switch( $_GET['action'] ) {
wp_die( __("You probably need to go back to the <a href='wpmu-options.php'>options page</a>") );
update_site_option( "WPLANG", $_POST['WPLANG'] );
-
+
if( is_email( $_POST['admin_email'] ) )
update_site_option( "admin_email", $_POST['admin_email'] );
- $illegal_names = split( ' ', $_POST['illegal_names'] );
+ $illegal_names = split( ' ', $_POST['illegal_names'] );
foreach( (array) $illegal_names as $name ) {
$name = trim( $name );
if( $name != '' )
$names[] = trim( $name );
}
update_site_option( "illegal_names", $names );
-
+
update_site_option( "registration", $_POST['registration'] );
update_site_option( "registrationnotification", $_POST['registrationnotification'] );
@@ -49,7 +49,7 @@ switch( $_GET['action'] ) {
} else {
update_site_option( "limited_email_domains", '' );
}
-
+
if( $_POST['banned_email_domains'] != '' ) {
$banned_email_domains = split( "\n", stripslashes( $_POST[ 'banned_email_domains' ] ) );
foreach( (array) $banned_email_domains as $domain ) {
@@ -59,7 +59,7 @@ switch( $_GET['action'] ) {
} else {
update_site_option( "banned_email_domains", '' );
}
-
+
update_site_option( "menu_items", $_POST['menu_items'] );
update_site_option( "blog_upload_space", $_POST['blog_upload_space'] );
update_site_option( "upload_filetypes", $_POST['upload_filetypes'] );
@@ -67,7 +67,7 @@ switch( $_GET['action'] ) {
update_site_option( "first_post", $_POST['first_post'] );
update_site_option( "welcome_email", $_POST['welcome_email'] );
update_site_option( "fileupload_maxk", $_POST['fileupload_maxk'] );
-
+
$site_admins = explode( ' ', str_replace( ",", " ", $_POST['site_admins'] ) );
if ( is_array( $site_admins ) ) {
$mainblog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" );
@@ -88,7 +88,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( "updated", "true", $_SERVER['HTTP_REFERER'] ) );
exit();
break;
-
+
// Blogs
case "addblog":
check_admin_referer('add-blog');
@@ -97,12 +97,12 @@ switch( $_GET['action'] ) {
$domain = strtolower( wp_specialchars( $blog['domain'] ) );
$email = wp_specialchars( $blog['email'] );
$title = stripslashes( wp_specialchars( $blog['title'] ) );
-
+
if ( empty($domain) || empty($email))
wp_die( __('Missing blog address or email address.') );
if( !is_email( $email ) )
wp_die( __('Invalid email address') );
-
+
if( constant('VHOST') == 'yes' ) {
$newdomain = $domain.".".$current_site->domain;
$path = $base;
@@ -136,7 +136,7 @@ switch( $_GET['action'] ) {
wp_die( $blog_id->get_error_message() );
}
break;
-
+
case "updateblog":
check_admin_referer('editblog');
if( empty( $_POST ) )
@@ -148,7 +148,7 @@ switch( $_GET['action'] ) {
} else {
$_POST['option']['allowedthemes'] = '';
}
-
+
if( is_array( $_POST['option'] ) ) {
$c = 1;
$count = count( $_POST['option'] );
@@ -164,10 +164,10 @@ switch( $_GET['action'] ) {
if( get_blog_option( $id, 'siteurl' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
update_blog_option( $id, 'siteurl', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
-
+
if( get_blog_option( $id, 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
update_blog_option( $id, 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
-
+
// update blogs table
$result = $wpdb->query("UPDATE {$wpdb->blogs} SET
domain = '".$_POST['blog']['domain']."',
@@ -179,9 +179,9 @@ switch( $_GET['action'] ) {
deleted = '".$_POST['blog']['deleted']."',
spam = '".$_POST['blog']['spam']."'
WHERE blog_id = '$id'");
-
+
update_blog_status( $id, 'spam', $_POST['blog']['spam'] );
-
+
// user roles
if( is_array( $_POST['role'] ) == true ) {
$newroles = $_POST['role'];
@@ -242,16 +242,16 @@ switch( $_GET['action'] ) {
}
wpmu_admin_do_redirect( "wpmu-blogs.php?action=editblog&updated=true&id=".$id );
break;
-
+
case "deleteblog":
check_admin_referer('deleteblog');
if( $id != '0' && $id != '1' )
wpmu_delete_blog( $id, true );
-
+
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'delete'), $_POST[ 'ref' ] ) );
exit();
break;
-
+
case "allblogs":
check_admin_referer('allblogs');
foreach ( (array) $_POST['allblogs'] as $key => $val ) {
@@ -274,7 +274,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $blogfunction), $_SERVER['HTTP_REFERER'] ) );
exit();
break;
-
+
case "archiveblog":
check_admin_referer('archiveblog');
update_blog_status( $id, "archived", '1' );
@@ -282,7 +282,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'archive'), $_POST['ref'] ) );
exit();
break;
-
+
case "unarchiveblog":
check_admin_referer('unarchiveblog');
do_action( "unarchive_blog", $id );
@@ -290,7 +290,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'unarchive'), $_POST['ref'] ) );
exit();
break;
-
+
case "activateblog":
check_admin_referer('activateblog');
update_blog_status( $id, "deleted", '0' );
@@ -298,7 +298,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( "updated", array('updated' => 'true', 'action' => 'activate'), $_POST['ref'] ) );
exit();
break;
-
+
case "deactivateblog":
check_admin_referer('deactivateblog');
do_action( "deactivate_blog", $id );
@@ -306,7 +306,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'deactivate'), $_POST['ref'] ) );
exit();
break;
-
+
case "unspamblog":
check_admin_referer('unspamblog');
update_blog_status( $id, "spam", '0' );
@@ -314,7 +314,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'unspam'), $_POST['ref'] ) );
exit();
break;
-
+
case "spamblog":
check_admin_referer('spamblog');
update_blog_status( $id, "spam", '1' );
@@ -322,22 +322,22 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'spam'), $_POST['ref'] ) );
exit();
break;
-
+
case "mature":
update_blog_status( $id, 'mature', '1' );
do_action( 'mature_blog', $id );
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'mature'), $_POST['ref'] ) );
exit();
break;
-
+
case "unmature":
update_blog_status( $id, 'mature', '0' );
do_action( 'unmature_blog', $id );
-
+
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'umature'), $_POST['ref'] ) );
exit();
break;
-
+
// Themes
case "updatethemes":
if( is_array( $_POST['theme'] ) ) {
@@ -352,7 +352,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'themes'), $_SERVER['HTTP_REFERER'] ) );
exit();
break;
-
+
// Common
case "confirm":
global $wp_locale;
@@ -379,15 +379,15 @@ switch( $_GET['action'] ) {
<input type='hidden' name='id' value='<?php echo wp_specialchars( $id ); ?>' />
<input type='hidden' name='ref' value='<?php if( isset( $_GET['ref'] ) ) {echo wp_specialchars( $_GET['ref'] ); } else { echo $_SERVER['HTTP_REFERER']; } ?>' />
<?php wp_nonce_field( $_GET['action2'] ) ?>
- <p>
+ <p>
<?php echo wp_specialchars( $_GET['msg'] ) ?><br />
- <input class="button" type='submit' value='<?php _e("Confirm"); ?>' /></p>
+ <input class="button" type='submit' value='<?php _e("Confirm"); ?>' /></p>
</form>
</body>
</html>
<?php
break;
-
+
// Users
case "deleteuser":
check_admin_referer('deleteuser');
@@ -397,7 +397,7 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'delete'), $_POST['ref'] ) );
exit();
break;
-
+
case "allusers":
check_admin_referer('allusers');
foreach ( (array) $_POST['allusers'] as $key => $val ) {
@@ -424,11 +424,11 @@ switch( $_GET['action'] ) {
update_user_status( $val, "spam", '0', 1 );
}
}
- }
+ }
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $userfunction), $_SERVER['HTTP_REFERER'] ) );
exit();
break;
-
+
case "adduser":
check_admin_referer('add-user');
@@ -454,10 +454,10 @@ switch( $_GET['action'] ) {
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'add'), $_SERVER['HTTP_REFERER'] ) );
exit();
break;
-
+
default:
wpmu_admin_do_redirect( "wpmu-admin.php" );
- break;
+ break;
}
?>