Changeset 1077
- Timestamp:
- 10/15/07 17:12:03 (1 year ago)
- Files:
-
- trunk/index-install.php (modified) (1 diff)
- trunk/wp-admin/wpmu-edit.php (modified) (1 diff)
- trunk/wp-admin/wpmu-options.php (modified) (1 diff)
- trunk/wp-includes/wpmu-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/index-install.php
r1070 r1077 369 369 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); 370 370 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'registration', 'none')" ); 371 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'xmlrpc_active', 'no')" ); 371 372 $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); 372 373 $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (1, 'Uncategorized', 'uncategorized', NOW())" ); trunk/wp-admin/wpmu-edit.php
r1067 r1077 26 26 update_site_option( "illegal_names", $names ); 27 27 update_site_option( "registration", $wpdb->escape( $_POST[ 'registration' ] ) ); 28 update_site_option( "xmlrpc_active", $wpdb->escape( $_POST[ 'xmlrpc_active' ] ) ); 28 29 update_site_option( "registrationnotification", $wpdb->escape( $_POST[ 'registrationnotification' ] ) ); 29 30 if( $_POST[ 'limited_email_domains' ] != '' ) { trunk/wp-admin/wpmu-options.php
r1067 r1077 56 56 <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked' : ''; ?> /> No<br /> 57 57 <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?></td> 58 </tr> 59 <tr valign="top"> 60 <th scope="row"><?php _e('Enable posting by XMLRPC') ?></th> 61 <?php 62 if( !get_site_option('xmlrpc_active') ) 63 update_site_option( 'xmlrpc_active', 'no' ); 64 ?> 65 <td><input name="xmlrpc_active" type="radio" id="xmlrpc_active1" value='yes' <?php echo get_site_option('xmlrpc_active') == 'yes' ? 'checked' : ''; ?> /> Yes<br /> 66 <input name="xmlrpc_active" type="radio" id="xmlrpc_active2" value='no' <?php echo get_site_option('xmlrpc_active') == 'no' ? 'checked' : ''; ?> /> No<br /> 67 <?php _e('This is an advanced technique for making posts to blogs. It is used by <a href="http://codex.wordpress.org/Weblog_Client">blog clients</a> like Ecto, Flock and Microsoft Live Writer and by Flickr to post pictures to blogs. Unfortunately it is also extensively used by spammers. <em>Disabled by Default</em>') ?></td> 58 68 </tr> 59 69 <tr valign="top"> trunk/wp-includes/wpmu-functions.php
r1076 r1077 1924 1924 } 1925 1925 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' ); 1926 1927 function is_xmlrpc_active() { 1928 global $HTTP_RAW_POST_DATA; 1929 if ($HTTP_RAW_POST_DATA) 1930 $data = $HTTP_RAW_POST_DATA; 1931 1932 // kill everything but pingbacks if xmlrpc is disabled 1933 if( defined( 'XMLRPC_REQUEST' ) && strpos( $data, '<methodName>pingback.ping</methodName>' ) === false && get_site_option( 'xmlrpc_active' ) != 'yes' ) 1934 die(); 1935 } 1936 add_action( 'init', 'is_xmlrpc_active' ); 1926 1937 ?>
