Ticket #26879: 26879.diff
File 26879.diff, 13.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/css/install.css
60 60 border: 0; 61 61 font-variant: normal; 62 62 } 63 63 64 #logo { 64 65 margin: 6px 0 14px 0; 65 66 border-bottom: none; … … 175 176 font-size: 18px; 176 177 } 177 178 178 #error-page {179 body.error-page { 179 180 margin-top: 50px; 180 181 } 181 182 182 #error-page p {183 body.error-page p { 183 184 font-size: 14px; 184 185 line-height: 18px; 185 186 margin: 25px 0 20px; 186 187 } 187 188 188 #error-page code, .code {189 font-family: Consolas, Monaco, monospace;190 }191 192 189 #pass-strength-result { 193 190 background-color: #eee; 194 191 border-color: #ddd !important; -
src/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 <code>wp-config.php</code>. This connects WordPress with your database, where your content and settings will be stored. Need more help? Check out our <a href='https://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 .= '<p style="text-align: center;">' . __( "Oops, the Table Prefix field can't be empty. Please go back and try again." ) . '</p>'; 177 $die .= '<p style="text-align: center;">' . __( "Need more help? Check out our <a href='https://codex.wordpress.org/Editing_wp-config.php#table_prefix'>documentation</a>." ) . '</p>'; 178 $die .= ( __( $tryagain_link ) ); 179 wp_die( $die ); 180 } 176 181 177 182 // 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 ) ); 183 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) { 184 $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>'; 185 $die .= '<p style="text-align: center;">' . __( "Need more help? Check out our <a href='https://codex.wordpress.org/Editing_wp-config.php#table_prefix'>documentation</a>." ) . '</p>'; 186 $die .= ( __( $tryagain_link ) ); 187 wp_die( $die ); 188 } 180 189 181 190 // Test the db connection. 182 191 /**#@+ … … 260 269 setup_config_display_header(); 261 270 ?> 262 271 <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>272 <p><?php _e( 'To continue, manually create a file named <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 273 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php 265 274 foreach( $config_file as $line ) { 266 275 echo htmlentities($line, ENT_COMPAT, 'UTF-8'); -
src/wp-includes/functions.php
2159 2159 $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>"; 2160 2160 break; 2161 2161 endswitch; 2162 } elseif ( is_string( $message ) ) {2162 } elseif ( is_string( $message ) && empty( $r['raw'] ) ) { 2163 2163 $message = "<p>$message</p>"; 2164 2164 } 2165 2165 … … 2183 2183 $text_direction = 'rtl'; 2184 2184 elseif ( function_exists( 'is_rtl' ) && is_rtl() ) 2185 2185 $text_direction = 'rtl'; 2186 2187 $site_url = wp_guess_url(); 2188 2189 $classes = 'wp-core-ui'; 2190 if ( ! empty( $r['error'] ) ) { 2191 $classes .= ' error-page'; 2192 } 2193 if ( 'rtl' === $text_direction ) { 2194 $classes .= ' rtl'; 2195 } 2186 2196 ?> 2187 2197 <!DOCTYPE html> 2188 2198 <!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono … … 2191 2201 <head> 2192 2202 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2193 2203 <title><?php echo $title ?></title> 2194 <style type="text/css"> 2195 html { 2196 background: #eee; 2197 } 2198 body { 2199 background: #fff; 2200 color: #333; 2201 font-family: "Open Sans", sans-serif; 2202 margin: 2em auto; 2203 padding: 1em 2em; 2204 max-width: 700px; 2205 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13); 2206 box-shadow: 0 1px 3px rgba(0,0,0,0.13); 2207 } 2208 h1 { 2209 border-bottom: 1px solid #dadada; 2210 clear: both; 2211 color: #666; 2212 font: 24px "Open Sans", sans-serif; 2213 margin: 30px 0 0 0; 2214 padding: 0; 2215 padding-bottom: 7px; 2216 } 2217 #error-page { 2218 margin-top: 50px; 2219 } 2220 #error-page p { 2221 font-size: 14px; 2222 line-height: 1.5; 2223 margin: 25px 0 20px; 2224 } 2225 #error-page code { 2226 font-family: Consolas, Monaco, monospace; 2227 } 2228 ul li { 2229 margin-bottom: 10px; 2230 font-size: 14px ; 2231 } 2232 a { 2233 color: #21759B; 2234 text-decoration: none; 2235 } 2236 a:hover { 2237 color: #D54E21; 2238 } 2239 .button { 2240 background: #f7f7f7; 2241 border: 1px solid #cccccc; 2242 color: #555; 2243 display: inline-block; 2244 text-decoration: none; 2245 font-size: 13px; 2246 line-height: 26px; 2247 height: 28px; 2248 margin: 0; 2249 padding: 0 10px 1px; 2250 cursor: pointer; 2251 -webkit-border-radius: 3px; 2252 -webkit-appearance: none; 2253 border-radius: 3px; 2254 white-space: nowrap; 2255 -webkit-box-sizing: border-box; 2256 -moz-box-sizing: border-box; 2257 box-sizing: border-box; 2258 2259 -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); 2260 box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08); 2261 vertical-align: top; 2262 } 2263 2264 .button.button-large { 2265 height: 29px; 2266 line-height: 28px; 2267 padding: 0 12px; 2268 } 2269 2270 .button:hover, 2271 .button:focus { 2272 background: #fafafa; 2273 border-color: #999; 2274 color: #222; 2275 } 2276 2277 .button:focus { 2278 -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); 2279 box-shadow: 1px 1px 1px rgba(0,0,0,.2); 2280 } 2281 2282 .button:active { 2283 background: #eee; 2284 border-color: #999; 2285 color: #333; 2286 -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); 2287 box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ); 2288 } 2289 2290 <?php if ( 'rtl' == $text_direction ) : ?> 2291 body { font-family: Tahoma, Arial; } 2292 <?php endif; ?> 2293 </style> 2204 <link rel="stylesheet" type="text/css" href="<?php echo $site_url; ?>/wp-admin/css/install.css?ver=20140309" /> 2205 <link rel="stylesheet" type="text/css" href="<?php echo $site_url; ?>/wp-includes/css/buttons.css?ver=20140309" /> 2294 2206 </head> 2295 <body id="error-page">2207 <body class="<?php echo $classes; ?>"> 2296 2208 <?php endif; // ! did_action( 'admin_head' ) ?> 2297 2209 <?php echo $message; ?> 2298 2210 </body> -
src/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>'; 56 $die = '<h1 id="logo"><a href="https://wordpress.org/">WordPress</a></h1>'; 57 $die .= '<h1>' . __( 'Welcome to WordPress' ) . '</h1>'; 58 $die .= '<p>' . __( "In just a few minutes, you'll be all set up with WordPress and ready to create your own corner of the web." ) . '</p>'; 59 $die .= '<p>' . __( "This free and Open Source software is built and maintained by a community of hundreds of volunteers. Transform your website with countless of <a href='https://wordpress.org/plugins/'>plugins</a> and <a href='https://wordpress.org/themes/'>themes</a> available from right within WordPress." ) . '</p>'; 60 $die .= '<p>' . __( "Write your blog, build your first website, launch your business, share your photos with your friends. You can do just about anything you can imagine." ) . '</p>'; 61 $die .= '<p><a href="' . $path . '" class="button button-large">' . __( "Let's Get Started!" ) . '</a>'; 60 62 61 wp_die( $die, __( 'W ordPress › Error') );63 wp_die( $die, __( 'Welcome to WordPress!' ), array( 'error' => false, 'raw' => true ) ); 62 64 }