Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
608B

  1. <?php
  2. /**
  3. * @package util
  4. */
  5. use Friendica\App;
  6. /*
  7. * require boot.php
  8. */
  9. require_once("boot.php");
  10. $a = new App(dirname(__DIR__));
  11. @include(".htconfig.php");
  12. $lang = get_browser_language();
  13. load_translation_table($lang);
  14. require_once("include/dba.php");
  15. dba::connect($db_host, $db_user, $db_pass, $db_data, false);
  16. unset($db_host, $db_user, $db_pass, $db_data);
  17. $build = get_config('system', 'build');
  18. echo "Old DB VERSION: " . $build . "\n";
  19. echo "New DB VERSION: " . DB_UPDATE_VERSION . "\n";
  20. if ($build != DB_UPDATE_VERSION) {
  21. echo "Updating database...";
  22. update_db($a);
  23. echo "Done\n";
  24. }