mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Permalinks: After [37747], make sure $usingpi
, $writable
, and $update_required
are defined before checking them on permalinks update.
Props Clorith. Fixes #37380. Built from https://develop.svn.wordpress.org/trunk@38066 git-svn-id: http://core.svn.wordpress.org/trunk@38007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1e8f430f9
commit
07c9671cac
@ -66,6 +66,30 @@ if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpo
|
||||
$blog_prefix = '/blog';
|
||||
}
|
||||
|
||||
$category_base = get_option( 'category_base' );
|
||||
$tag_base = get_option( 'tag_base' );
|
||||
$update_required = false;
|
||||
|
||||
if ( $iis7_permalinks ) {
|
||||
if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
|
||||
$writable = true;
|
||||
else
|
||||
$writable = false;
|
||||
} elseif ( $is_nginx ) {
|
||||
$writable = false;
|
||||
} else {
|
||||
if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) {
|
||||
$writable = true;
|
||||
} else {
|
||||
$writable = false;
|
||||
$existing_rules = array_filter( extract_from_markers( $home_path . '.htaccess', 'WordPress' ) );
|
||||
$new_rules = array_filter( explode( "\n", $wp_rewrite->mod_rewrite_rules() ) );
|
||||
$update_required = ( $new_rules !== $existing_rules );
|
||||
}
|
||||
}
|
||||
|
||||
$usingpi = $wp_rewrite->using_index_permalinks();
|
||||
|
||||
if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
|
||||
check_admin_referer('update-permalink');
|
||||
|
||||
@ -124,30 +148,6 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$category_base = get_option( 'category_base' );
|
||||
$tag_base = get_option( 'tag_base' );
|
||||
$update_required = false;
|
||||
|
||||
if ( $iis7_permalinks ) {
|
||||
if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
|
||||
$writable = true;
|
||||
else
|
||||
$writable = false;
|
||||
} elseif ( $is_nginx ) {
|
||||
$writable = false;
|
||||
} else {
|
||||
if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) {
|
||||
$writable = true;
|
||||
} else {
|
||||
$writable = false;
|
||||
$existing_rules = array_filter( extract_from_markers( $home_path . '.htaccess', 'WordPress' ) );
|
||||
$new_rules = array_filter( explode( "\n", $wp_rewrite->mod_rewrite_rules() ) );
|
||||
$update_required = ( $new_rules !== $existing_rules );
|
||||
}
|
||||
}
|
||||
|
||||
$usingpi = $wp_rewrite->using_index_permalinks();
|
||||
|
||||
flush_rewrite_rules();
|
||||
|
||||
require( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-beta3-38065';
|
||||
$wp_version = '4.6-beta3-38066';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user