Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Formatted versions as strings in DB check

  • Loading branch information...
commit 6a189dafcb0b4a235f8d2eb16f921204cba9a29f 1 parent c685339
@67726e 67726e authored
Showing with 7 additions and 17 deletions.
  1. +7 −17 wordpress-plugin/infinite-scroll.php
View
24 wordpress-plugin/infinite-scroll.php
@@ -57,7 +57,6 @@ class Infinite_Scroll {
* Construct the primary class and auto-load all child classes
*/
function __construct() {
-
self::$instance = &$this;
$this->file = __FILE__;
$this->admin = new Infinite_Scroll_Admin( $this );
@@ -84,7 +83,6 @@ function __construct() {
//404 fix
add_action( 'wp', array( &$this, 'paged_404_fix' ) );
-
}
@@ -163,16 +161,15 @@ function i18n() {
* Fires on admin init to support SVN
*/
function upgrade_check() {
-
- if ( !is_int($this->options->db_version) || $this->options->db_version == $this->version )
+ if ($this->options->db_version == $this->version) {
return;
+ }
$this->upgrade( $this->options->db_version, $this->version );
do_action( $this->prefix . 'upgrade', $this->version, $this->options->db_version );
$this->options->db_version = $this->version;
-
}
@@ -182,8 +179,7 @@ function upgrade_check() {
* @param int $to version going to
*/
function upgrade( $from , $to ) {
-
- if ($from < 2.5) {
+ if ($from < "2.5") {
//array of option conversions in the form of from => to
$map = array(
'js_calls' => 'callback',
@@ -258,24 +254,18 @@ function upgrade( $from , $to ) {
$this->options->set_options( $new );
delete_option( 'infscr_options' );
- //migrate presets
- if ( $from < 2.5 )
- $this->presets->migrate();
+ $this->presets->migrate();
}
-
+
//migrate loading image
- if ($from < 2.6) {
-
+ if ($from < '2.6') {
$old = get_option("infinite_scroll");
$new = $old;
-
$new["loading"]["img"] = $old["img"];
unset($new["img"]);
$this->options->set_options($new);
-
- }
-
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.