1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/10411-2

* 'develop' of https://github.com/phpbb/phpbb3:
  [ticket/11367] Always freeresult
  [ticket/11367] Migrator throws error if migrations table does not exist
  [feature/migrations] Inject migrator rather than the container.
  [feature/migrations] Use the user class for language handling
  [feature/migrations] Fully revert the removal of the user_msnm field
  [feature/migrations] Revert unrelated change to schema_data.sql
  [feature/migrations] Remove user_msnm migration
  [feature/migrations] Correct depends_on
  [feature/migrations] Subdirectories for migration data
  [feature/migrations] Reports table schema changes in recent develop
  [feature/migrations] Automatically populate migrations table on install
  [feature/migrations] effectively installed check for migration data
  [feature/migrations] Comments for the return in the custom functions
  [feature/migrations] Order the migrations schema in schema_data.sql
  [feature/migrations] Fix migrations installer, schema for schema_data.sql
  [feature/migrations] Make depends_on static to call it without dependencies
  [feature/migrations] Remove hardcoded language, use lang instead.
  [feature/migrations] Revert schema for migration data
  [feature/migrations] Replace database_update.php with migrations updater
  [feature/migrations] Rebuilding migrations data on develop
This commit is contained in:
Joas Schilling
2013-02-27 00:12:51 +01:00
47 changed files with 3361 additions and 2834 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -114,6 +114,7 @@ class install_install extends module
$this->add_bots($mode, $sub);
$this->email_admin($mode, $sub);
$this->disable_avatars_if_unwritable();
$this->populate_migrations($phpbb_container->get('migrator'), $phpbb_root_path);
// Remove the lock file
@unlink($phpbb_root_path . 'cache/install_lock');
@@ -1880,6 +1881,21 @@ class install_install extends module
}
}
/**
* Populate migrations for the installation
*
* This "installs" all migrations from (root path)/includes/db/migrations/data.
* "installs" means it adds all migrations to the migrations table, but does not
* perform any of the actions in the migrations.
*
* @param phpbb_db_migrator $migrator
* @param string $phpbb_root_path
*/
function populate_migrations($migrator, $phpbb_root_path)
{
$migrator->populate_migrations_from_directory($phpbb_root_path . 'includes/db/migration/data/');
}
/**
* Generate a list of available mail server authentication methods
*/