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.

37 lines
628B

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