Skip to content

Commit

Permalink
installed_version now gets updated correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Ellis committed Sep 6, 2011
1 parent 96ceaf2 commit 2d6aa4c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions social.php
Expand Up @@ -273,12 +273,14 @@ public function init() {
update_option(Social::$prefix . $key, $value);
}

if ($key == 'installed_version' and (int)$value < (int)Social::$version) {
if ($key == 'installed_version' and version_compare($value, Social::$version, '<')) {
// Need to run an upgrade
Social::$upgrade = true;
$this->option($key, Social::$version, true);
}
else {
$this->option($key, $value);
}

$this->option($key, $value);
}

$url = plugins_url('', SOCIAL_FILE);
Expand Down

0 comments on commit 2d6aa4c

Please sign in to comment.