Changeset 12697 for trunk/wp-includes/functions.php
- Timestamp:
- 01/11/2010 09:49:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12686 r12697 328 328 329 329 // prevent non-existent options from triggering multiple queries 330 $notoptions = wp_cache_get( 'notoptions', 'options' ); 331 if ( isset( $notoptions[$setting] ) ) 332 return $default; 330 if ( defined( 'WP_INSTALLING' ) && is_multisite() ) { 331 $notoptions = array(); 332 } else { 333 $notoptions = wp_cache_get( 'notoptions', 'options' ); 334 if ( isset( $notoptions[$setting] ) ) 335 return $default; 336 } 333 337 334 338 $alloptions = wp_load_alloptions(); … … 412 416 global $wpdb; 413 417 414 $alloptions = wp_cache_get( 'alloptions', 'options' ); 418 if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) 419 $alloptions = wp_cache_get( 'alloptions', 'options' ); 415 420 416 421 if ( !$alloptions ) { … … 422 427 foreach ( (array) $alloptions_db as $o ) 423 428 $alloptions[$o->option_name] = $o->option_value; 424 wp_cache_add( 'alloptions', $alloptions, 'options' ); 429 if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) 430 wp_cache_add( 'alloptions', $alloptions, 'options' ); 425 431 } 426 432 return $alloptions; … … 624 630 global $_wp_using_ext_object_cache, $wpdb; 625 631 632 if( is_multisite() ) 633 do_action( 'delete_transient_' . $transient ); 634 626 635 if ( $_wp_using_ext_object_cache ) { 627 636 return wp_cache_delete($transient, 'transient'); … … 690 699 function set_transient($transient, $value, $expiration = 0) { 691 700 global $_wp_using_ext_object_cache, $wpdb; 701 702 if( is_multisite() ) 703 $value = apply_filters( 'pre_set_transient_' . $transient, $value ); 692 704 693 705 if ( $_wp_using_ext_object_cache ) { … … 2174 2186 if ( $upload['error'] !== false ) 2175 2187 return $upload; 2188 2189 if( is_multisite() ) { 2190 /* WPMU check file before writing it */ 2191 $upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) ); 2192 if( is_array( $upload_bits_error ) == false ) { 2193 $upload[ 'error' ] = $upload_bits_error; 2194 return $upload; 2195 } 2196 } 2176 2197 2177 2198 $filename = wp_unique_filename( $upload['path'], $name );
Note: See TracChangeset
for help on using the changeset viewer.