Introduce update_blog_details(). Add some phpdoc. Fix some warnings. see #11644

git-svn-id: https://develop.svn.wordpress.org/trunk@12806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-01-22 23:35:59 +00:00
parent e28471d816
commit 325e92da49
2 changed files with 104 additions and 28 deletions
+3 -6
View File
@@ -183,7 +183,7 @@ switch ( $_GET['action'] ) {
wp_die( __('You probably need to go back to the <a href="ms-sites.php">sites page</a>') );
// themes
if ( is_array( $_POST[ 'theme' ] ) )
if ( isset($_POST[ 'theme' ]) && is_array( $_POST[ 'theme' ] ) )
$_POST[ 'option' ][ 'allowedthemes' ] = $_POST[ 'theme' ];
else
$_POST[ 'option' ][ 'allowedthemes' ] = '';
@@ -215,10 +215,7 @@ switch ( $_GET['action'] ) {
// update blogs table
$blog_data = stripslashes_deep($_POST[ 'blog' ]);
$result = $wpdb->update( $wpdb->blogs, $blog_data, array('blog_id' => $id) );
update_blog_status( $id, 'spam', $_POST[ 'blog' ][ 'spam' ] );
update_option( 'blog_public', $_POST[ 'blog' ][ 'public' ] );
update_blog_details($id, $blog_data);
// get blog prefix
$blog_prefix = $wpdb->get_blog_prefix( $id );
@@ -237,7 +234,7 @@ switch ( $_GET['action'] ) {
}
// remove user
if ( is_array( $_POST[ 'blogusers' ] ) ) {
if ( isset($_POST[ 'blogusers' ]) && is_array( $_POST[ 'blogusers' ] ) ) {
reset( $_POST[ 'blogusers' ] );
foreach ( (array) $_POST[ 'blogusers' ] as $key => $val )
remove_user_from_blog( $key, $id );