summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-12 15:57:18 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-12 15:57:18 +0000
commitd56d78df31bea4849162fd0ea5dc8a46e7e1d50c (patch)
tree6476651fd724718c784f8f6a820a8ac224c3aff0
parent358eee66d74cd8ad22cf05be05dfd5d6d8e601be (diff)
downloadwordpress-mu-d56d78df31bea4849162fd0ea5dc8a46e7e1d50c.tar.gz
wordpress-mu-d56d78df31bea4849162fd0ea5dc8a46e7e1d50c.tar.xz
wordpress-mu-d56d78df31bea4849162fd0ea5dc8a46e7e1d50c.zip
Added backend code for "registration notification" feature
Default language is in wp-content/languages/ - fixes #438, thanks mastermind! git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1067 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/wpmu-edit.php1
-rw-r--r--wp-admin/wpmu-options.php14
2 files changed, 13 insertions, 2 deletions
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php
index be25f88..5665924 100644
--- a/wp-admin/wpmu-edit.php
+++ b/wp-admin/wpmu-edit.php
@@ -25,6 +25,7 @@ switch( $_REQUEST[ 'action' ] ) {
}
update_site_option( "illegal_names", $names );
update_site_option( "registration", $wpdb->escape( $_POST[ 'registration' ] ) );
+ update_site_option( "registrationnotification", $wpdb->escape( $_POST[ 'registrationnotification' ] ) );
if( $_POST[ 'limited_email_domains' ] != '' ) {
update_site_option( "limited_email_domains", split( ' ', $_POST[ 'limited_email_domains' ] ) );
} else {
diff --git a/wp-admin/wpmu-options.php b/wp-admin/wpmu-options.php
index 9025e99..8361389 100644
--- a/wp-admin/wpmu-options.php
+++ b/wp-admin/wpmu-options.php
@@ -35,7 +35,7 @@ if (isset($_GET['updated'])) {
<?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?></td>
</tr>
<tr valign="top">
- <th scope="row"><?php _e('Allow new blog registrations') ?></th>
+ <th scope="row"><?php _e('Allow new registrations') ?></th>
<?php
if( !get_site_option('registration') )
update_site_option( 'registration', 'all' );
@@ -47,6 +47,16 @@ if (isset($_GET['updated'])) {
<?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?></td>
</tr>
<tr valign="top">
+ <th scope="row"><?php _e('Registration notification') ?></th>
+ <?php
+ if( !get_site_option('registrationnotification') )
+ update_site_option( 'registrationnotification', 'yes' );
+ ?>
+ <td><input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked' : ''; ?> /> Yes<br />
+ <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked' : ''; ?> /> No<br />
+ <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?></td>
+ </tr>
+ <tr valign="top">
<th scope="row"><?php _e('Welcome Email:') ?></th>
<td><textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea>
<br />
@@ -105,7 +115,7 @@ if (isset($_GET['updated'])) {
<legend><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></legend>
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
<?php
- $lang_files = glob( ABSPATH . WPINC . "/languages/*.mo" );
+ $lang_files = glob( ABSPATH . "wp-content/languages/*.mo" );
$lang = get_site_option( "WPLANG" );
if( is_array( $lang_files ) ) {
?>