diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/install.php --- a/wp/wp-admin/install.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/install.php Fri Sep 05 18:40:08 2025 +0200 @@ -6,7 +6,7 @@ * @subpackage Administration */ -// Sanity check. +// Confidence check. if ( false ) { ?> @@ -42,7 +42,7 @@ require_once ABSPATH . 'wp-admin/includes/translation-install.php'; /** Load wpdb */ -require_once ABSPATH . WPINC . '/wp-db.php'; +require_once ABSPATH . WPINC . '/class-wpdb.php'; nocache_headers(); @@ -80,7 +80,7 @@ } // End display_header(). /** - * Display installer setup form. + * Displays installer setup form. * * @since 2.8.0 * @@ -96,7 +96,7 @@ // Ensure that sites appear in search engines by default. $blog_public = 1; if ( isset( $_POST['weblog_title'] ) ) { - $blog_public = isset( $_POST['blog_public'] ); + $blog_public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : $blog_public; } $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; @@ -123,8 +123,8 @@ echo ''; } else { ?> - -

+ +

@@ -140,14 +140,16 @@
- +
+ +
+
-
-

+

@@ -160,7 +162,7 @@ - + @@ -175,30 +177,38 @@ - -

+ +

- + + + /> -
- /> +
+ /> -

+

-
@@ -216,7 +226,7 @@ die( '

' . __( 'Already Installed' ) . '

' . '

' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '

' . - '

' . __( 'Log In' ) . '

' . + '

' . __( 'Log In' ) . '

' . '' ); } @@ -225,17 +235,18 @@ * @global string $wp_version The WordPress version string. * @global string $required_php_version The required PHP version string. * @global string $required_mysql_version The required MySQL version string. + * @global wpdb $wpdb WordPress database abstraction object. */ -global $wp_version, $required_php_version, $required_mysql_version; +global $wp_version, $required_php_version, $required_mysql_version, $wpdb; -$php_version = phpversion(); +$php_version = PHP_VERSION; $mysql_version = $wpdb->db_version(); $php_compat = version_compare( $php_version, $required_php_version, '>=' ); $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); $version_url = sprintf( /* translators: %s: WordPress version. */ - esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ), + esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); @@ -318,7 +329,7 @@ */ $language = ''; if ( ! empty( $_REQUEST['language'] ) ) { - $language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] ); + $language = sanitize_locale_name( $_REQUEST['language'] ); } elseif ( isset( $GLOBALS['wp_local_package'] ) ) { $language = $GLOBALS['wp_local_package']; } @@ -434,7 +445,7 @@ -

+