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.

38 lines
656B

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