Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:plater
wordpress
wordpress-sysconfdir.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wordpress-sysconfdir.patch of Package wordpress
diff -Pdpru wordpress.orig/wp-admin/setup-config.php wordpress/wp-admin/setup-config.php --- wordpress.orig/wp-admin/setup-config.php 2016-05-27 03:54:28.000000000 +0200 +++ wordpress/wp-admin/setup-config.php 2016-08-19 12:45:15.263204584 +0200 @@ -32,6 +32,13 @@ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); } +/** + * Move config to etc + * + */ +$_SESSION['WP_Config'] = '@WP_CONFIG_ROOT@/wp-config.php'; +$WP_Config = $_SESSION['WP_Config']; + require( ABSPATH . 'wp-settings.php' ); /** Load WordPress Administration Upgrade API */ @@ -145,6 +152,7 @@ switch($step) { ?> <h1 class="screen-reader-text"><?php _e( 'Before getting started' ) ?></h1> <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> +<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> @@ -355,7 +363,7 @@ switch($step) { } unset( $line ); - if ( ! is_writable(ABSPATH) ) : + if ( ! is_writable(dirname($WP_Config)) ) : setup_config_display_header(); ?> <p><?php @@ -393,12 +401,12 @@ if ( ! /iPad|iPod|iPhone/.test( navigato else $path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php'; - $handle = fopen( $path_to_wp_config, 'w' ); + $handle = fopen($WP_Config, 'w'); foreach ( $config_file as $line ) { fwrite( $handle, $line ); } fclose( $handle ); - chmod( $path_to_wp_config, 0666 ); + chmod($WP_Config, 0640); setup_config_display_header(); ?> <h1 class="screen-reader-text"><?php _e( 'Successful database connection' ) ?></h1> diff -Pdpru wordpress.orig/wp-config-sample.php wordpress/wp-config-sample.php --- wordpress.orig/wp-config-sample.php 2015-12-16 10:58:26.000000000 +0100 +++ wordpress/wp-config-sample.php 2016-08-19 12:46:09.138095109 +0200 @@ -87,3 +87,15 @@ 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'); diff -Pdpru wordpress.orig/wp-load.php wordpress/wp-load.php --- wordpress.orig/wp-load.php 2016-04-14 19:53:28.000000000 +0200 +++ wordpress/wp-load.php 2016-08-19 12:48:37.096057199 +0200 @@ -23,6 +23,14 @@ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __FILE__ ) . '/' ); } +/** + * @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']; + error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); /* @@ -33,15 +41,10 @@ error_reporting( E_CORE_ERROR | E_CORE_W * * 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 install */ - 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