More informative error message when remote publishing is disabled. Don't disable if upgrading. Props josephscott. see #7157

git-svn-id: https://develop.svn.wordpress.org/trunk@8202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-06-26 22:39:57 +00:00
parent db1134b9f1
commit 9cf90ec524
6 changed files with 32 additions and 36 deletions
+2 -2
View File
@@ -254,8 +254,8 @@ function populate_options() {
// 2.6
add_option('avatar_default', 'mystery');
add_option('enable_app',0);
add_option('enable_xmlrpc',0);
add_option('enable_app', 0);
add_option('enable_xmlrpc', 0);
// Delete unused options
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins');
+9 -5
View File
@@ -6,7 +6,7 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
require_once(ABSPATH . 'wp-admin/includes/schema.php');
if ( !function_exists('wp_install') ) :
function wp_install($blog_title, $user_name, $user_email, $public, $remote) {
function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
global $wp_rewrite;
wp_check_mysql_version();
@@ -18,8 +18,6 @@ function wp_install($blog_title, $user_name, $user_email, $public, $remote) {
update_option('blogname', $blog_title);
update_option('admin_email', $user_email);
update_option('blog_public', $public);
update_option('enable_app',$remote);
update_option('enable_xmlrpc',$remote);
$guessurl = wp_guess_url();
@@ -206,7 +204,7 @@ function upgrade_all() {
if ( $wp_current_db_version < 7935 )
upgrade_252();
if ( $wp_current_db_version < 8000 )
if ( $wp_current_db_version < 8201 )
upgrade_260();
maybe_disable_automattic_widgets();
@@ -744,7 +742,13 @@ function upgrade_252() {
}
function upgrade_260() {
populate_roles_260();
if ( $wp_current_db_version < 8000 )
populate_roles_260();
if ( $wp_current_db_version < 8201 ) {
update_option('enable_app', 1);
update_option('enable_xmlrpc', 1);
}
}
// The functions we use to actually do stuff
+1 -6
View File
@@ -53,10 +53,6 @@ switch($step) {
<tr>
<td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
</tr>
<tr>
<td colspan="2"><label><input type="checkbox" name="enable_remotepublishing" value="0" /> <?php _e('Enable remote publishing using the WordPress, Movable Type, MetaWeblog, Blogger and Atom publishing protocols for my blog.'); ?></label></td>
</tr>
</table>
</table>
<input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" />
</form>
@@ -72,7 +68,6 @@ switch($step) {
$weblog_title = stripslashes($_POST['weblog_title']);
$admin_email = stripslashes($_POST['admin_email']);
$public = (int) $_POST['blog_public'];
$remote = (int) $_POST['enable_remotepublishing'];
// check e-mail address
if (empty($admin_email)) {
// TODO: poka-yoke
@@ -83,7 +78,7 @@ switch($step) {
}
$wpdb->show_errors();
$result = wp_install($weblog_title, 'admin', $admin_email, $public, $remote);
$result = wp_install($weblog_title, 'admin', $admin_email, $public);
extract($result, EXTR_SKIP);
?>