Changeset 22185
- Timestamp:
- 10/11/2012 12:37:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-blogs.php
r22108 r22185 293 293 $update_details[$field] = $details[$field]; 294 294 295 $wpdb->update( $wpdb->blogs, $update_details, array('blog_id' => $blog_id) ); 295 $result = $wpdb->update( $wpdb->blogs, $update_details, array('blog_id' => $blog_id) ); 296 297 if ( false === $result ) 298 return false; 296 299 297 300 // If spam status changed, issue actions. 298 301 if ( $details[ 'spam' ] != $current_details[ 'spam' ] ) { 299 302 if ( $details[ 'spam' ] == 1 ) 300 do_action( "make_spam_blog", $blog_id );303 do_action( 'make_spam_blog', $blog_id ); 301 304 else 302 do_action( "make_ham_blog", $blog_id ); 303 } 304 305 if ( isset($details[ 'public' ]) ) { 305 do_action( 'make_ham_blog', $blog_id ); 306 } 307 308 // If mature status changed, issue actions. 309 if ( $details[ 'mature' ] != $current_details[ 'mature' ] ) { 310 if ( $details[ 'mature' ] == 1 ) 311 do_action( 'mature_blog', $blog_id ); 312 else 313 do_action( 'unmature_blog', $blog_id ); 314 } 315 316 // If archived status changed, issue actions. 317 if ( $details[ 'archived' ] != $current_details[ 'archived' ] ) { 318 if ( $details[ 'archived' ] == 1 ) 319 do_action( 'archive_blog', $blog_id ); 320 else 321 do_action( 'unarchive_blog', $blog_id ); 322 } 323 324 // If deleted status changed, issue actions. 325 if ( $details[ 'deleted' ] != $current_details[ 'deleted' ] ) { 326 if ( $details[ 'deleted' ] == 1 ) 327 do_action( 'make_delete_blog', $blog_id ); 328 else 329 do_action( 'make_undelete_blog', $blog_id ); 330 } 331 332 if ( isset( $details[ 'public' ] ) ) { 306 333 switch_to_blog( $blog_id ); 307 334 update_option( 'blog_public', $details[ 'public' ] ); … … 643 670 _deprecated_argument( __FUNCTION__, '3.1' ); 644 671 645 if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )672 if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) ) 646 673 return $value; 647 674 648 $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) ); 649 650 refresh_blog_details($blog_id); 675 $result = $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) ); 676 677 if ( false === $result ) 678 return false; 679 680 refresh_blog_details( $blog_id ); 651 681 652 682 if ( 'spam' == $pref ) … … 656 686 elseif ( 'archived' == $pref ) 657 687 ( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id ); 658 elseif ( ' archived' == $pref )659 ( $value == 1 ) ? do_action( ' archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );688 elseif ( 'deleted' == $pref ) 689 ( $value == 1 ) ? do_action( 'make_delete_blog', $blog_id ) : do_action( 'make_undelete_blog', $blog_id ); 660 690 661 691 return $value;
Note: See TracChangeset
for help on using the changeset viewer.