WordPress.org

Make WordPress Core

Changeset 16673


Ignore:
Timestamp:
12/01/2010 10:12:09 PM (11 years ago)
Author:
ryan
Message:

Deprecate and ignore the refresh arg. fixes #15605

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r15746 r16673  
    433433add_action( 'wpmueditblogaction', 'upload_space_setting' );
    434434
    435 function update_user_status( $id, $pref, $value, $refresh = 1 ) {
     435function update_user_status( $id, $pref, $value, $deprecated = null ) {
    436436    global $wpdb;
    437437
     438    if ( null !== $deprecated  )
     439        _deprecated_argument( __FUNCTION__, '3.1.0' );
     440
    438441    $wpdb->update( $wpdb->users, array( $pref => $value ), array( 'ID' => $id ) );
    439442
    440     if ( $refresh == 1 )
    441         refresh_user_details( $id );
     443    clean_user_cache( $id );
    442444
    443445    if ( $pref == 'spam' ) {
  • trunk/wp-includes/ms-blogs.php

    r16597 r16673  
    301301
    302302    if ( isset($details[ 'public' ]) )
    303         update_blog_option( $blog_id, 'blog_public', $details[ 'public' ], false );
     303        update_blog_option( $blog_id, 'blog_public', $details[ 'public' ] );
    304304
    305305    refresh_blog_details($blog_id);
     
    422422 * @param string $key The option key
    423423 * @param mixed $value The option value
    424  * @param bool $refresh Whether to refresh blog details or not
    425  */
    426 function update_blog_option( $id, $key, $value, $refresh = true ) {
     424 */
     425function update_blog_option( $id, $key, $value, $deprecated = null ) {
    427426    $id = (int) $id;
     427
     428    if ( null !== $deprecated  )
     429        _deprecated_argument( __FUNCTION__, '3.1.0' );
    428430
    429431    switch_to_blog($id);
     
    431433    restore_current_blog();
    432434
    433     if ( $refresh == true )
    434         refresh_blog_details( $id );
     435    refresh_blog_details( $id );
     436
    435437    wp_cache_set( $id."-".$key."-blog_option", $value, 'site-options');
    436438}
     
    615617 * @param string $pref A field name
    616618 * @param string $value Value for $pref
    617  * @param bool $refresh Whether to refresh the blog details cache. Default is true.
    618619 * @return string $value
    619620 */
    620 function update_blog_status( $blog_id, $pref, $value, $refresh = true ) {
     621function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
    621622    global $wpdb;
     623
     624    if ( null !== $deprecated  )
     625        _deprecated_argument( __FUNCTION__, '3.1.0' );
    622626
    623627    if ( !in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
     
    626630    $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) );
    627631
    628     if ( $refresh )
    629         refresh_blog_details($blog_id);
     632    refresh_blog_details($blog_id);
    630633
    631634    if ( 'spam' == $pref )
Note: See TracChangeset for help on using the changeset viewer.