Invalidate the plugin update cache if plugins are deleted. Fixes #7304 for trunk.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-07-16 21:53:32 +00:00
parent 99fd979933
commit 4b4f85c2d4
1 changed files with 7 additions and 1 deletions

View File

@ -120,6 +120,12 @@ function wp_update_plugins() {
$plugin_changed = true;
}
foreach ( (array) $current->response as $plugin_file => $update_details ) {
if ( ! isset($plugins[ $plugin_file ]) ) {
$plugin_changed = true;
}
}
// Bail if we've checked in the last 12 hours and if nothing has changed
if ( $time_not_changed && !$plugin_changed )
return false;
@ -159,4 +165,4 @@ if ( defined( 'WP_ADMIN' ) && WP_ADMIN )
else
add_action( 'init', 'wp_update_plugins' );
?>
?>