Changeset 1067

Show
Ignore:
Timestamp:
10/12/07 15:57:18 (1 year ago)
Author:
donncha
Message:

Added backend code for "registration notification" feature
Default language is in wp-content/languages/ - fixes #438, thanks mastermind!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/wpmu-edit.php

    r1066 r1067  
    2626                update_site_option( "illegal_names", $names ); 
    2727                update_site_option( "registration", $wpdb->escape( $_POST[ 'registration' ] ) ); 
     28                update_site_option( "registrationnotification", $wpdb->escape( $_POST[ 'registrationnotification' ] ) ); 
    2829                if( $_POST[ 'limited_email_domains' ] != '' ) { 
    2930                        update_site_option( "limited_email_domains", split( ' ', $_POST[ 'limited_email_domains' ] ) ); 
  • trunk/wp-admin/wpmu-options.php

    r1064 r1067  
    3636                </tr>  
    3737                <tr valign="top">  
    38                 <th scope="row"><?php _e('Allow new blog registrations') ?></th>  
     38                <th scope="row"><?php _e('Allow new registrations') ?></th>  
    3939                <?php 
    4040                if( !get_site_option('registration') ) 
     
    4646                <input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked' : ''; ?> /> Enabled for blogs only. Only logged in users can create new blogs.<br /> 
    4747                <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?></td>  
     48                </tr>  
     49                <tr valign="top">  
     50                <th scope="row"><?php _e('Registration notification') ?></th>  
     51                <?php 
     52                if( !get_site_option('registrationnotification') ) 
     53                        update_site_option( 'registrationnotification', 'yes' ); 
     54                ?> 
     55                <td><input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked' : ''; ?> /> Yes<br /> 
     56                <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked' : ''; ?> /> No<br /> 
     57                <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?></td>  
    4858                </tr>  
    4959                <tr valign="top">  
     
    106116                <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    107117                <?php 
    108                 $lang_files = glob( ABSPATH . WPINC . "/languages/*.mo" ); 
     118                $lang_files = glob( ABSPATH . "wp-content/languages/*.mo" ); 
    109119                $lang = get_site_option( "WPLANG" ); 
    110120                if( is_array( $lang_files ) ) {