Permalink
Browse files

Merge pull request #2502 from joshp23/version_check

auto-update YOURLS version in database
  • Loading branch information...
ozh committed Jan 27, 2019
2 parents c527a5c + e6e8c16 commit f4574fe8828573d9ad4de34936a98af7d30aa6a8
Showing with 4 additions and 0 deletions.
  1. +4 −0 includes/functions.php
@@ -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;
}

0 comments on commit f4574fe

Please sign in to comment.