Make WordPress Core


Ignore:
Timestamp:
01/12/2010 09:11:52 PM (15 years ago)
Author:
wpmuguru
Message:

merge multisite admin - edit links,tags,cats,options, See #11644

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin

    • Property svn:ignore set to
      .categories.php.swp
  • trunk/wp-admin/options.php

    r12507 r12712  
    3939    wp_die(__('Cheatin’ uh?'));
    4040
     41if ( is_multisite() && is_super_admin() && $_GET[ 'adminhash' ] ) {
     42    $new_admin_details = get_option( 'adminhash' );
     43    if( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && $new_admin_details[ 'newemail' ] != '' ) {
     44        update_option( "admin_email", $new_admin_details[ 'newemail' ] );
     45        delete_option( "adminhash" );
     46        delete_option( "new_admin_email" );
     47        wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" );
     48        exit;
     49    } else {
     50        wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=false" );
     51        exit;
     52    }
     53}
     54
    4155switch($action) {
    4256
     
    5670    if ( 'options' == $option_page ) {
    5771        $options = explode(',', stripslashes( $_POST[ 'page_options' ] ));
     72        if ( !is_super_admin() )
     73            wp_die( __( 'Not allowed here' ) );
    5874    } else {
    5975        $options = $whitelist_options[ $option_page ];
     
    91107
    92108default:
     109    if ( !is_super_admin() )
     110        wp_die( __( 'Not admin' ) );
     111
    93112    include('admin-header.php'); ?>
    94113
     
    100119  <input type="hidden" name="action" value="update" />
    101120  <input type='hidden' name='option_page' value='options' />
     121<?php if ( is_multisite() ) { ?>
     122<p class="submit submit-top">
     123    <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button-primary" />
     124</p>
     125<?php } ?>
    102126  <table class="form-table">
    103127<?php
     
    107131    $disabled = '';
    108132    $option->option_name = esc_attr($option->option_name);
     133    if( $option->option_name == '' )
     134        continue;
    109135    if ( is_serialized($option->option_value) ) {
    110136        if ( is_serialized_string($option->option_value) ) {
Note: See TracChangeset for help on using the changeset viewer.