Skip to content

Commit

Permalink
Merge pull request #2502 from joshp23/version_check
Browse files Browse the repository at this point in the history
auto-update YOURLS version in database
  • Loading branch information
ozh committed Jan 27, 2019
2 parents c527a5c + e6e8c16 commit f4574fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/functions.php
Expand Up @@ -1060,6 +1060,10 @@ function yourls_upgrade_is_needed() {
if( $currentsql < YOURLS_DB_VERSION )
return true;

// Check if YOURLS_VERSION exist && match value stored in YOURLS_DB_TABLE_OPTIONS, update DB if required
if( $currentver < YOURLS_VERSION )
yourls_update_option( 'version', YOURLS_VERSION );

return false;
}

Expand Down

0 comments on commit f4574fe

Please sign in to comment.