Skip to content

Commit

Permalink
Core is better at checking for version control than we are
Browse files Browse the repository at this point in the history
  • Loading branch information
pento committed Oct 28, 2013
1 parent 9065e5f commit 0339f56
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions automatic-updater.php
Expand Up @@ -138,9 +138,11 @@ function disabled_notice() {
function plugin_upgrade() {
if ( empty( $this->options ) ) {
// Don't automatically enable core updates in installs coming from a repo
$core_updates_enabled = true;
if ( is_dir( ABSPATH . '/.svn' ) || is_dir( ABSPATH . '/.git' ) )
$core_updates_enabled = false;
if ( ! class_exists( 'WP_Automatic_Updater' ) )
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';

$wpau = new WP_Automatic_Updater();
$core_updates_enabled = $wpau->is_vcs_checkout( ABSPATH );

$this->options = array(
'update' => array(
Expand Down

0 comments on commit 0339f56

Please sign in to comment.