diff --git wp-admin/setup-config.php wp-admin/setup-config.php
index 1ad40fc..9550e9d 100644
|
|
switch($step) { |
215 | 215 | <td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td> |
216 | 216 | <td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td> |
217 | 217 | </tr> |
| 218 | <?php |
| 219 | $tmp_file = tempnam(sys_get_temp_dir(), 'wp'); |
| 220 | $tmp_file_owner = fileowner($tmp_file); |
| 221 | unlink($tmp_file); |
| 222 | ?> |
| 223 | <?php if (is_writable(ABSPATH) && $tmp_file_owner != fileowner(__FILE__)): ?> |
| 224 | <tr> |
| 225 | <td scope="row" colspan="3"> |
| 226 | <input name="wp_config_write" id="wp_config_write" type="checkbox" value="1" /> |
| 227 | <?php _e( 'Allow other system users to write into wp-config.php' ); ?> |
| 228 | </td> |
| 229 | </tr> |
| 230 | <?php endif; ?> |
218 | 231 | </table> |
219 | 232 | <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="1" /><?php } ?> |
220 | 233 | <input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" /> |
… |
… |
switch($step) { |
232 | 245 | $pwd = trim( wp_unslash( $_POST[ 'pwd' ] ) ); |
233 | 246 | $dbhost = trim( wp_unslash( $_POST[ 'dbhost' ] ) ); |
234 | 247 | $prefix = trim( wp_unslash( $_POST[ 'prefix' ] ) ); |
| 248 | $wp_config_write = isset($_POST[ 'wp_config_write']) && '1' === $_POST[ 'wp_config_write']; |
235 | 249 | |
236 | 250 | $step_1 = 'setup-config.php?step=1'; |
237 | 251 | $install = 'install.php'; |
… |
… |
if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) { |
398 | 412 | fwrite( $handle, $line ); |
399 | 413 | } |
400 | 414 | fclose( $handle ); |
401 | | chmod( $path_to_wp_config, 0666 ); |
| 415 | chmod( $path_to_wp_config, $wp_config_write ? 0666 : 0600 ); |
402 | 416 | setup_config_display_header(); |
403 | 417 | ?> |
404 | 418 | <h1 class="screen-reader-text"><?php _e( 'Successful database connection' ) ?></h1> |