52 // Ensure that Blogs appear in search engines by default |
52 // Ensure that Blogs appear in search engines by default |
53 $blog_public = 1; |
53 $blog_public = 1; |
54 if ( isset($_POST) && !empty($_POST) ) { |
54 if ( isset($_POST) && !empty($_POST) ) { |
55 $blog_public = isset($_POST['blog_public']); |
55 $blog_public = isset($_POST['blog_public']); |
56 } |
56 } |
57 |
57 |
58 if ( ! is_null( $error ) ) { |
58 if ( ! is_null( $error ) ) { |
59 ?> |
59 ?> |
60 <p><?php printf( __('<strong>ERROR</strong>: %s'), $error); ?></p> |
60 <p><?php printf( __('<strong>ERROR</strong>: %s'), $error); ?></p> |
61 <?php } ?> |
61 <?php } ?> |
62 <form id="setup" method="post" action="install.php?step=2"> |
62 <form id="setup" method="post" action="install.php?step=2"> |
66 <td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo ( isset($_POST['weblog_title']) ? esc_attr($_POST['weblog_title']) : '' ); ?>" /></td> |
66 <td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo ( isset($_POST['weblog_title']) ? esc_attr($_POST['weblog_title']) : '' ); ?>" /></td> |
67 </tr> |
67 </tr> |
68 <tr> |
68 <tr> |
69 <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th> |
69 <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th> |
70 <td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo ( isset($_POST['admin_email']) ? esc_attr($_POST['admin_email']) : '' ); ?>" /><br /> |
70 <td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo ( isset($_POST['admin_email']) ? esc_attr($_POST['admin_email']) : '' ); ?>" /><br /> |
71 <?php _e('Double-check your email address before continuing.'); ?> |
71 <?php _e('Double-check your email address before continuing.'); ?></td> |
72 </tr> |
72 </tr> |
73 <tr> |
73 <tr> |
74 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked($blog_public); ?> /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td> |
74 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked($blog_public); ?> /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td> |
75 </tr> |
75 </tr> |
76 </table> |
76 </table> |
79 <?php |
79 <?php |
80 } |
80 } |
81 |
81 |
82 // Let's check to make sure WP isn't already installed. |
82 // Let's check to make sure WP isn't already installed. |
83 if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');} |
83 if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');} |
|
84 |
|
85 $php_version = phpversion(); |
|
86 $mysql_version = $wpdb->db_version(); |
|
87 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
|
88 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); |
|
89 |
|
90 if ( !$mysql_compat && !$php_compat ) |
|
91 $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); |
|
92 elseif ( !$php_compat ) |
|
93 $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); |
|
94 elseif ( !$mysql_compat ) |
|
95 $compat = sprintf( __('You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); |
|
96 |
|
97 if ( !$mysql_compat || !$php_compat ) { |
|
98 display_header(); |
|
99 die('<h1>' . __('Insufficient Requirements') . '</h1><p>' . $compat . '</p></body></html>'); |
|
100 } |
84 |
101 |
85 switch($step) { |
102 switch($step) { |
86 case 0: |
103 case 0: |
87 case 1: // in case people are directly linking to this |
104 case 1: // in case people are directly linking to this |
88 display_header(); |
105 display_header(); |