Drop the dual-use of db_version. Now it just stores the version. Post-upgrade hook triggered by separate binary db_upgraded option. fixes #9618
git-svn-id: http://svn.automattic.com/wordpress/trunk@11040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f98c5d7cd
commit
8f91d9a0b9
|
@ -18,9 +18,9 @@ if ( defined('ABSPATH') )
|
||||||
else
|
else
|
||||||
require_once('../wp-load.php');
|
require_once('../wp-load.php');
|
||||||
|
|
||||||
if ( get_option('db_version') == 'db_upgraded' ) {
|
if ( get_option('db_upgraded') ) {
|
||||||
$wp_rewrite->flush_rules();
|
$wp_rewrite->flush_rules();
|
||||||
update_option('db_version', $wp_db_version);
|
update_option( 'db_upgraded', false );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs on the next page load after successful upgrade
|
* Runs on the next page load after successful upgrade
|
||||||
|
|
|
@ -344,7 +344,8 @@ function upgrade_all() {
|
||||||
|
|
||||||
maybe_disable_automattic_widgets();
|
maybe_disable_automattic_widgets();
|
||||||
|
|
||||||
update_option('db_version', 'db_upgraded');
|
update_option( 'db_version', $wp_db_version );
|
||||||
|
update_option( 'db_upgraded', true );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue