Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tw_rocks_49
wordpress
wordpress-sysconfdir.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wordpress-sysconfdir.patch of Package wordpress
Index: wordpress/wp-admin/setup-config.php =================================================================== --- wordpress.orig/wp-admin/setup-config.php +++ wordpress/wp-admin/setup-config.php @@ -159,6 +159,7 @@ switch ( $step ) { ?> <h1 class="screen-reader-text"><?php _e( 'Before getting started' ); ?></h1> <p><?php _e( 'Welcome to WordPress. Before getting started, you will need to know the following items.' ); ?></p> +<p><?php _e( "You should already have created this database, and granted access for user you're going to define here." ); ?></p> <ol> <li><?php _e( 'Database name' ); ?></li> <li><?php _e( 'Database username' ); ?></li> @@ -391,7 +392,7 @@ switch ( $step ) { } unset( $line ); - if ( ! is_writable( ABSPATH ) ) : + if ( ! is_writable(dirname($WP_Config)) ) : setup_config_display_header(); ?> <p> @@ -443,7 +444,7 @@ if ( ! /iPad|iPod|iPhone/.test( navigato } $error_message = ''; - $handle = fopen( $path_to_wp_config, 'w' ); + $handle = fopen($WP_Config, 'w'); /* * Why check for the absence of false instead of checking for resource with is_resource()? * To future-proof the check for when fopen returns object instead of resource, i.e. a known @@ -472,7 +473,7 @@ if ( ! /iPad|iPod|iPhone/.test( navigato } } - chmod( $path_to_wp_config, 0666 ); + chmod($WP_Config, 0640); setup_config_display_header(); if ( false !== $handle ) : Index: wordpress/wp-config-sample.php =================================================================== --- wordpress.orig/wp-config-sample.php +++ wordpress/wp-config-sample.php @@ -94,3 +94,16 @@ if ( ! defined( 'ABSPATH' ) ) { /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php'; + +/** Sets up 'direct' method for wordpress, auto update without FTP + * FS_METHOD forces the filesystem method. It should only be "direct", "ssh2", "ftpext", or "ftpsockets". + * Generally, You should only change this if you are experiencing update problems, If you change it, and it doesnt help change it back/remove it, + * Under most circumstances, setting it to 'ftpsockets' will work if the automatically chosen method does not. + * + * (Primary Preference) "direct" forces it to use Direct File I/O requests from within PHP, this is fraught with opening up security issues on poorly configured hosts, This is chosen automatically when appropriate. + * (Secondary Preference) "ssh2" is to force the usage of the SSH PHP Extension if installed + * (3rd Preference) "ftpext" is to force the usage of the FTP PHP Extension for FTP Access, and finally + * (4th Preference) "ftpsockets" utilises the PHP Sockets Class for FTP Access. + */ +define('FS_METHOD','direct'); + Index: wordpress/wp-load.php =================================================================== --- wordpress.orig/wp-load.php +++ wordpress/wp-load.php @@ -21,6 +21,14 @@ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } +/** + * @global WP_Config $_SESSION['WP_Config'] + * force reading of config file, because we removed sensitive values + * in the previous iteration + */ +$_SESSION['WP_Config'] = ('@WP_CONFIG_ROOT@/wp-config.php'); +$WP_Config = $_SESSION['WP_Config']; + /* * The error_reporting() function can be disabled in php.ini. On systems where that is the case, * it's best to add a dummy function to the wp-config.php file, but as this call to the function @@ -44,15 +52,10 @@ if ( function_exists( 'error_reporting' * * If neither set of conditions is true, initiate loading the setup process. */ -if ( file_exists( ABSPATH . 'wp-config.php' ) ) { +if ( file_exists($WP_Config) ) { /** The config file resides in ABSPATH */ - require_once ABSPATH . 'wp-config.php'; - -} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) { - - /** The config file resides one level above ABSPATH but is not part of another installation */ - require_once dirname( ABSPATH ) . '/wp-config.php'; + require_once($WP_Config); } else {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor