Changeset 34912 for trunk/src/wp-admin/includes/class-wp-upgrader.php
- Timestamp:
- 10/07/2015 05:11:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r34828 r34912 2369 2369 return false; 2370 2370 2371 $failure_data = get_ network_option( 'auto_core_update_failed' );2371 $failure_data = get_site_option( 'auto_core_update_failed' ); 2372 2372 if ( $failure_data ) { 2373 2373 // If this was a critical update failure, cannot update. … … 2781 2781 */ 2782 2782 protected function send_core_update_notification_email( $item ) { 2783 $notified = get_ network_option( 'auto_core_update_notified' );2783 $notified = get_site_option( 'auto_core_update_notified' ); 2784 2784 2785 2785 // Don't notify if we've already notified the same email address of the same version. 2786 if ( $notified && $notified['email'] == get_ network_option( 'admin_email' ) && $notified['version'] == $item->current )2786 if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current ) 2787 2787 return false; 2788 2788 … … 3109 3109 $critical_data['rollback_data'] = $rollback_result->get_error_data(); 3110 3110 } 3111 update_ network_option( 'auto_core_update_failed', $critical_data );3111 update_site_option( 'auto_core_update_failed', $critical_data ); 3112 3112 $this->send_email( 'critical', $core_update, $result ); 3113 3113 return; … … 3127 3127 $send = true; 3128 3128 $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro' ); 3129 if ( in_array( $error_code, $transient_failures ) && ! get_ network_option( 'auto_core_update_failed' ) ) {3129 if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) { 3130 3130 wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' ); 3131 3131 $send = false; 3132 3132 } 3133 3133 3134 $n = get_ network_option( 'auto_core_update_notified' );3134 $n = get_site_option( 'auto_core_update_notified' ); 3135 3135 // Don't notify if we've already notified the same email address of the same version of the same notification type. 3136 if ( $n && 'fail' == $n['type'] && $n['email'] == get_ network_option( 'admin_email' ) && $n['version'] == $core_update->current )3136 if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current ) 3137 3137 $send = false; 3138 3138 3139 update_ network_option( 'auto_core_update_failed', array(3139 update_site_option( 'auto_core_update_failed', array( 3140 3140 'attempted' => $core_update->current, 3141 3141 'current' => $wp_version, … … 3163 3163 */ 3164 3164 protected function send_email( $type, $core_update, $result = null ) { 3165 update_ network_option( 'auto_core_update_notified', array(3165 update_site_option( 'auto_core_update_notified', array( 3166 3166 'type' => $type, 3167 'email' => get_ network_option( 'admin_email' ),3167 'email' => get_site_option( 'admin_email' ), 3168 3168 'version' => $core_update->current, 3169 3169 'timestamp' => time(), … … 3321 3321 } 3322 3322 3323 $to = get_ network_option( 'admin_email' );3323 $to = get_site_option( 'admin_email' ); 3324 3324 $headers = ''; 3325 3325 … … 3495 3495 3496 3496 $email = array( 3497 'to' => get_ network_option( 'admin_email' ),3497 'to' => get_site_option( 'admin_email' ), 3498 3498 'subject' => $subject, 3499 3499 'body' => implode( "\n", $body ),
Note: See TracChangeset
for help on using the changeset viewer.