aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migrator.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-02-25 13:12:57 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-02-25 13:12:57 -0600
commite632049e197131df9fbe8c078007cf37cf94c241 (patch)
treef305a7163e264f2ad9eb23c0d224c91b8a848e34 /phpBB/includes/db/migrator.php
parent7a8ae493009eac3d4f5c97279f0be6e10c588002 (diff)
parentf6a894f07700627b675c2b16aab4714df5819a23 (diff)
downloadforums-e632049e197131df9fbe8c078007cf37cf94c241.tar
forums-e632049e197131df9fbe8c078007cf37cf94c241.tar.gz
forums-e632049e197131df9fbe8c078007cf37cf94c241.tar.bz2
forums-e632049e197131df9fbe8c078007cf37cf94c241.tar.xz
forums-e632049e197131df9fbe8c078007cf37cf94c241.zip
Merge branch 'feature/migrations-data' of github.com:EXreaction/phpbb3 into feature/migrations-data
# By Dhruv (19) and others # Via Nathaniel Guse (3) and others * 'feature/migrations-data' of github.com:EXreaction/phpbb3: (38 commits) [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 [ticket/11179] remove extra & in function call [ticket/11179] correct start parameter in sphinx search [ticket/11179] correct start parameter in native author search [ticket/11179] correct start parameter in native keyword search [ticket/11179] fix success query path for postgres [ticket/11179] fix success query path for mysql [ticket/11179] minor fixes [ticket/11179] pass start param by reference in postgres [ticket/11179] correct start param in author search of postgres [ticket/11179] correct start parameter in psql keyword search [ticket/11179] pass start param by reference in author search [ticket/11179] correct start parameter for author search [ticket/11179] use FOUND_ROWS query to re-search with changed start param [ticket/11179] pass start parameter by reference [ticket/11179] correct the start parameter while retrieving from cache [ticket/11179] add search query in case initial one fails [ticket/11359] html escape sphinx config data ...
Diffstat (limited to 'phpBB/includes/db/migrator.php')
-rw-r--r--phpBB/includes/db/migrator.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php
index 4456600b0a..41d996b1e3 100644
--- a/phpBB/includes/db/migrator.php
+++ b/phpBB/includes/db/migrator.php
@@ -228,9 +228,10 @@ class phpbb_db_migrator
{
foreach ($this->migrations as $name)
{
- if ($this->unfulfillable($name))
+ $unfulfillable = $this->unfulfillable($name);
+ if ($unfulfillable !== false)
{
- throw new phpbb_db_migration_exception('MIGRATION NOT FULFILLABLE', $name);
+ throw new phpbb_db_migration_exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable);
}
}
}
@@ -674,7 +675,7 @@ class phpbb_db_migrator
* Checks if a migration's dependencies can even theoretically be satisfied.
*
* @param string $name The class name of the migration
- * @return bool Whether the migration cannot be fulfilled
+ * @return bool|string False if fulfillable, string of missing migration name if unfulfillable
*/
public function unfulfillable($name)
{
@@ -685,7 +686,7 @@ class phpbb_db_migrator
if (!class_exists($name))
{
- return true;
+ return $name;
}
$migration = $this->get_migration($name);
@@ -693,9 +694,10 @@ class phpbb_db_migrator
foreach ($depends as $depend)
{
- if ($this->unfulfillable($depend))
+ $unfulfillable = $this->unfulfillable($depend);
+ if ($unfulfillable !== false)
{
- return true;
+ return $unfulfillable;
}
}
@@ -715,7 +717,7 @@ class phpbb_db_migrator
{
// skip unfulfillable migrations, but fulfillables mean we
// are not finished yet
- if ($this->unfulfillable($name))
+ if ($this->unfulfillable($name) !== false)
{
continue;
}