| 46 | | |
| 47 | | if ( isset( $_POST['WPLANG'] ) && ( '' === $_POST['WPLANG'] || in_array( $_POST['WPLANG'], get_available_languages() ) ) ) |
| 48 | | update_site_option( 'WPLANG', $_POST['WPLANG'] ); |
| 49 | | |
| 50 | | if ( is_email( $_POST['admin_email'] ) ) |
| 51 | | update_site_option( 'admin_email', $_POST['admin_email'] ); |
| 52 | | |
| 53 | | $illegal_names = explode( ' ', $_POST['illegal_names'] ); |
| 54 | | foreach ( (array) $illegal_names as $name ) { |
| 55 | | $name = trim( $name ); |
| 56 | | if ( $name != '' ) |
| 57 | | $names[] = trim( $name ); |
| 58 | | } |
| 59 | | update_site_option( 'illegal_names', $names ); |
| 60 | | |
| 61 | | if ( $_POST['limited_email_domains'] != '' ) { |
| 62 | | $limited_email_domains = str_replace( ' ', "\n", $_POST['limited_email_domains'] ); |
| 63 | | $limited_email_domains = explode( "\n", stripslashes( $limited_email_domains ) ); |
| 64 | | $limited_email = array(); |
| 65 | | foreach ( (array) $limited_email_domains as $domain ) { |
| 66 | | $domain = trim( $domain ); |
| 67 | | if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) |
| 68 | | $limited_email[] = trim( $domain ); |
| 69 | | } |
| 70 | | update_site_option( 'limited_email_domains', $limited_email ); |
| 71 | | } else { |
| 72 | | update_site_option( 'limited_email_domains', '' ); |
| 73 | | } |
| 74 | | |
| 75 | | if ( $_POST['banned_email_domains'] != '' ) { |
| 76 | | $banned_email_domains = explode( "\n", stripslashes( $_POST['banned_email_domains'] ) ); |
| 77 | | $banned = array(); |
| 78 | | foreach ( (array) $banned_email_domains as $domain ) { |
| 79 | | $domain = trim( $domain ); |
| 80 | | if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) |
| 81 | | $banned[] = trim( $domain ); |
| 82 | | } |
| 83 | | update_site_option( 'banned_email_domains', $banned ); |
| 84 | | } else { |
| 85 | | update_site_option( 'banned_email_domains', '' ); |
| 86 | | } |
| 87 | | |
| 88 | | $options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled' ); |
| | 46 | |
| | 52 | |
| | 53 | $options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled', 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email' ); |