Ticket #26879: 26879-9.diff
File 26879-9.diff, 11.7 KB (added by , 11 years ago) |
---|
-
wp-admin/css/install.css
7 7 background: #fff; 8 8 color: #555; 9 9 font-family: "Open Sans", sans-serif; 10 margin: 140px auto 25px;11 padding: 20px 20px 10px 20px;10 margin: 8em auto; 11 padding: 1em 2em; 12 12 max-width: 700px; 13 13 -webkit-font-smoothing: subpixel-antialiased; 14 14 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); … … 187 187 188 188 #error-page code, .code { 189 189 font-family: Consolas, Monaco, monospace; 190 background: aliceblue; 190 191 } 191 192 192 193 #pass-strength-result { -
wp-admin/setup-config.php
112 112 setup_config_display_header(); 113 113 ?> 114 114 115 <p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p> 115 <p><?php _e( "OK! We need some information about your database." )?></p> 116 <p><?php _e("This information is available through your web host. If you don't have it, you'll need to get in touch with them. Here's what you need:" ) ?></p> 116 117 <ol> 117 118 <li><?php _e( 'Database name' ); ?></li> 118 119 <li><?php _e( 'Database username' ); ?></li> 119 120 <li><?php _e( 'Database password' ); ?></li> 120 121 <li><?php _e( 'Database host' ); ?></li> 121 <li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>122 122 </ol> 123 <p>< strong><?php _e( "If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>." ); ?></strong></p>124 <p><?php _e( "I n all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready…" ); ?></p>123 <p><?php _e( "Once you fill in this information, WordPress will create a configuration file called wp-config.php. This connects WordPress with your database (that's where your content, settings, photos, and all that paraphernalia is stored). Need more help? Check out our <a href='http://codex.wordpress.org/Editing_wp-config.php'>documentation</a>." ); ?></p> 124 <p><?php _e( "If you’re all ready…" ); ?></p> 125 125 126 <p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&noapi'; ?>" class="button button-large"><?php _e( 'Let’s go!' ); ?></a></p>126 <p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&noapi'; ?>" class="button button-large"><?php _e( 'Let’s Go!' ); ?></a></p> 127 127 <?php 128 128 break; 129 129 … … 131 131 setup_config_display_header(); 132 132 ?> 133 133 <form method="post" action="setup-config.php?step=2"> 134 <p><?php _e( "Below you should enter your database connection details. If you’re not sure about these, contact your host." ); ?></p>134 <p><?php _e( "Below you should enter your MySQL database connection details. If you’re not sure about these, contact your host." ); ?></p> 135 135 <table class="form-table"> 136 136 <tr> 137 137 <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th> 138 138 <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td> 139 <td><?php _e( 'The name of the database you want to run WP in.' ); ?></td>139 <td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td> 140 140 </tr> 141 141 <tr> 142 142 <th scope="row"><label for="uname"><?php _e( 'User Name' ); ?></label></th> 143 143 <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td> 144 <td><?php _e( 'Your MySQL username' ); ?></td>144 <td><?php _e( 'Your database username.' ); ?></td> 145 145 </tr> 146 146 <tr> 147 147 <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th> 148 148 <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" /></td> 149 <td><?php _e( ' …and your MySQLpassword.' ); ?></td>149 <td><?php _e( 'Your database password.' ); ?></td> 150 150 </tr> 151 151 <tr> 152 152 <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th> … … 169 169 foreach ( array( 'dbname', 'uname', 'pwd', 'dbhost', 'prefix' ) as $key ) 170 170 $$key = trim( wp_unslash( $_POST[ $key ] ) ); 171 171 172 $tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try again' ) . '</a>';172 $tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try Again' ) . '</a>'; 173 173 174 if ( empty( $prefix ) ) 175 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' . $tryagain_link ) ); 174 // Validate $prefix: it must not be empty 175 if ( empty( $prefix ) ): 176 $die = '<h1 id="logo">' . __( "<a href='http://wordpress.org/'>WordPress</a>" ) . '</h1>'; 177 $die .= '<p style="text-align: center;">' . __( "Oops, the Table Prefix field can't be empty. Please go back and try again." ) . '</p>'; 178 $die .= '<p style="text-align: center;">' . __( "Need more help? Check out our <a href='http://codex.wordpress.org/Editing_wp-config.php#table_prefix'>documentation</a>." ) . '</p>'; 179 $die .= ( __( $tryagain_link ) ); 180 wp_die( $die, __( 'WordPress › Error' ) ); 181 endif; 176 182 177 183 // Validate $prefix: it can only contain letters, numbers and underscores. 178 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 179 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' . $tryagain_link ) ); 184 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ): 185 $die = '<h1 id="logo">' . __( "<a href='http://wordpress.org/'>WordPress</a>" ) . '</h1>'; 186 $die .= '<p style="text-align: center;">' . __( "Oops, the Table Prefix field can only contain numbers, letters, and underscores. Please go back and try again. ") . '</p>'; 187 $die .= '<p style="text-align: center;">' . __( " Need more help? Check out our <a href='http://codex.wordpress.org/Editing_wp-config.php#table_prefix'>documentation</a>." ) . '</p>'; 188 $die .= ( __( $tryagain_link ) ); 189 wp_die( $die, __( 'WordPress › Error' ) ); 190 endif; 180 191 181 192 // Test the db connection. 182 193 /**#@+ … … 259 270 if ( ! is_writable(ABSPATH) ) : 260 271 setup_config_display_header(); 261 272 ?> 262 <p><?php _e( "Sorry, but I can’t write the <code>wp-config.php</code> file." ); ?></p> 263 <p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p> 273 <p><?php _e( 'Please manually create a file called <code>wp-config.php</code> in the root directory where the rest of your WordPress files are located and copy and paste the following text into the file:' ); ?></p> 264 274 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php 265 275 foreach( $config_file as $line ) { 266 276 echo htmlentities($line, ENT_COMPAT, 'UTF-8'); -
wp-includes/functions.php
2194 2194 <style type="text/css"> 2195 2195 html { 2196 2196 background: #eee; 2197 margin: 0 20px; 2197 2198 } 2198 2199 body { 2199 2200 background: #fff; 2200 color: # 333;2201 color: #555; 2201 2202 font-family: "Open Sans", sans-serif; 2202 margin: 2em auto;2203 margin: 8em auto; 2203 2204 padding: 1em 2em; 2204 2205 max-width: 700px; 2206 -webkit-font-smoothing: subpixel-antialiased; 2205 2207 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); 2206 2208 box-shadow: 0 1px 3px rgba(0,0,0,0.13); 2207 2209 } … … 2214 2216 padding: 0; 2215 2217 padding-bottom: 7px; 2216 2218 } 2217 #error-page {2218 margin-top: 50px;2219 }2220 2219 #error-page p { 2221 2220 font-size: 14px; 2222 2221 line-height: 1.5; 2223 margin: 25px 0 20px;2222 padding-bottom: 2px; 2224 2223 } 2225 2224 #error-page code { 2226 2225 font-family: Consolas, Monaco, monospace; 2227 2226 } 2227 #logo { 2228 margin: 6px 0 14px 0; 2229 border-bottom: none; 2230 text-align:center; 2231 } 2232 #logo a { 2233 background-image: url('../wp-admin/images/w-logo-blue.png'); 2234 background-image: none, url('../wp-admin/images/wordpress-logo.svg'); 2235 background-size: 80px 80px; 2236 background-position: center top; 2237 background-repeat: no-repeat; 2238 color: #999; 2239 height: 80px; 2240 font-size: 20px; 2241 font-weight: normal; 2242 line-height: 1.3em; 2243 margin: -154px auto 25px; 2244 padding: 0; 2245 text-decoration: none; 2246 width: 80px; 2247 text-indent: -9999px; 2248 outline: none; 2249 overflow: hidden; 2250 display: block; 2251 } 2252 2228 2253 ul li { 2229 2254 margin-bottom: 10px; 2230 2255 font-size: 14px ; -
wp-includes/wp-db.php
972 972 $this->ready = false; 973 973 if ( ! did_action( 'template_redirect' ) ) { 974 974 wp_load_translations_early(); 975 $this->bail( sprintf( __( '<h1>Can’t select database</h1> 975 $this->bail( sprintf( __( '<h1 id="logo"><a href="http://wordpress.org/">WordPress</a></h1> 976 <h1>Can’t select database</h1> 976 977 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p> 977 978 <ul> 978 979 <li>Are you sure it exists?</li> … … 1355 1356 } 1356 1357 1357 1358 $this->bail( sprintf( __( " 1359 <h1 id='logo'><a href='http://wordpress.org/'>WordPress</a></h1> 1358 1360 <h1>Error establishing a database connection</h1> 1359 1361 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p> 1360 1362 <ul> -
wp-load.php
53 53 $path = wp_guess_url() . '/wp-admin/setup-config.php'; 54 54 55 55 // Die with an error message 56 $die = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';57 $die .= '< p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';58 $die .= '<p>' . __( " You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';59 $die .= '<p ><a href="' . $path . '" class="button button-large">' . __( "Create a Configuration File" ) . '</a>';60 61 wp_die( $die, __( 'WordPress › Error') );56 $die = '<h1 id="logo">' . __( "<a href='http://wordpress.org/'>WordPress</a>" ) . '</h1>'; 57 $die .= '<h1 style="text-align: center;">' . __( "Welcome to WordPress!" ) . '</h1>'; 58 $die .= '<p>' . __( "WordPress is web software you can use to create a beautiful website, blog, or almost <a href='http://wordpress.org/showcase/'>anything you can imagine</a>. This free and Open Source software is built and maintained by a community of hundreds of volunteers, and there are countless of <a href='http://wordpress.org/plugins/'>plugins</a> and <a href='http://wordpress.org/themes/'>themes</a> available to transform your website." ) . '</p>'; 59 $die .= '<p style="text-align: center;"><a href="' . $path . '" class="button button-large">' . __( "Let's Get Started!" ) . '</a>'; 60 61 wp_die( $die, __( "Welcome to WordPress!" ) ); 62 62 }