Changeset 1132
- Timestamp:
- 10/26/07 11:09:56 (1 year ago)
- Files:
-
- trunk/index-install.php (modified) (1 diff)
- trunk/wp-admin/wpmu-edit.php (modified) (2 diffs)
- trunk/wp-admin/wpmu-options.php (modified) (2 diffs)
- trunk/wp-includes/wpmu-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/index-install.php
r1114 r1132 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', 'yes')" );372 371 $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); 373 372 $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
r1122 r1132 37 37 update_site_option( "illegal_names", $names ); 38 38 update_site_option( "registration", $_POST['registration'] ); 39 update_site_option( "xmlrpc_active", $_POST[ 'xmlrpc_active' ] );40 39 update_site_option( "registrationnotification", $_POST['registrationnotification'] ); 41 40 … … 77 76 update_site_option( 'site_admins' , $site_admins ); 78 77 } 78 79 // Update more options here 80 do_action( 'update_wpmu_options' ); 79 81 80 82 wp_redirect( add_query_arg( "updated", "true", $_SERVER['HTTP_REFERER'] ) ); trunk/wp-admin/wpmu-options.php
r1121 r1132 70 70 </td> 71 71 </tr> 72 73 <tr valign="top">74 <th scope="row"><?php _e('Enable posting by XMLRPC') ?></th>75 <?php76 if( !get_site_option('xmlrpc_active') )77 update_site_option( 'xmlrpc_active', 'yes' );78 ?>79 <td>80 <input name="xmlrpc_active" type="radio" id="xmlrpc_active1" value='yes' <?php echo get_site_option('xmlrpc_active') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br />81 <input name="xmlrpc_active" type="radio" id="xmlrpc_active2" value='no' <?php echo get_site_option('xmlrpc_active') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br />82 <?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>') ?>83 </td>84 </tr>85 72 86 73 <tr valign="top"> … … 205 192 </table> 206 193 </fieldset> 194 195 <?php 196 // Add more options here 197 do_action( 'wpmu_options' ); 198 ?> 207 199 208 200 <p class="submit"> trunk/wp-includes/wpmu-functions.php
r1118 r1132 1869 1869 } 1870 1870 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' ); 1871 1872 function is_xmlrpc_active() {1873 global $HTTP_RAW_POST_DATA;1874 if ($HTTP_RAW_POST_DATA)1875 $data = $HTTP_RAW_POST_DATA;1876 1877 // add this to a blog's options table to enable xmlrpc on that blog1878 if( get_option( 'xmlrpc_active' ) == 'yes' )1879 return true;1880 1881 // kill everything but pingbacks if xmlrpc is disabled1882 if( defined( 'XMLRPC_REQUEST' ) && strpos( $data, '<methodName>pingback.ping</methodName>' ) === false && (get_option( 'xmlrpc_active' ) == 'no' || get_site_option( 'xmlrpc_active' ) != 'yes' ) )1883 die();1884 }1885 add_action( 'init', 'is_xmlrpc_active' );1886 1871 ?>
