aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/tool
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-02-23 13:50:53 -0500
committerDavid King <imkingdavid@gmail.com>2013-02-23 13:50:53 -0500
commit0987efa18980c2cf8deb1fcb13baa1a43ae6035b (patch)
treefc2f81b8467e9ce809f6c91b0cfb29e6592b3299 /phpBB/includes/db/migration/tool
parent3e90082dbb3a527846b9b0c3ae6407946a530fdb (diff)
parentf6bb14569b0a777d3511b732201af9d1a415f2ed (diff)
downloadforums-0987efa18980c2cf8deb1fcb13baa1a43ae6035b.tar
forums-0987efa18980c2cf8deb1fcb13baa1a43ae6035b.tar.gz
forums-0987efa18980c2cf8deb1fcb13baa1a43ae6035b.tar.bz2
forums-0987efa18980c2cf8deb1fcb13baa1a43ae6035b.tar.xz
forums-0987efa18980c2cf8deb1fcb13baa1a43ae6035b.zip
Merge remote-tracking branch 'EXreaction/ticket/11351' into develop
# By Nathaniel Guse (4) and Nathan Guse (1) # Via Nathan Guse * EXreaction/ticket/11351: [feature/migrations] getLocalisedMessage function for migration exception [feature/migrations] Fix unfulfillable function [feature/migrations] getParameters function for migration exception [feature/migrations] Add explanatory language string for migration errors [feature/migrations] Add language strings for migrations errors
Diffstat (limited to 'phpBB/includes/db/migration/tool')
-rw-r--r--phpBB/includes/db/migration/tool/config.php2
-rw-r--r--phpBB/includes/db/migration/tool/module.php6
-rw-r--r--phpBB/includes/db/migration/tool/permission.php6
3 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/db/migration/tool/config.php b/phpBB/includes/db/migration/tool/config.php
index d9cc20053e..458a25fb66 100644
--- a/phpBB/includes/db/migration/tool/config.php
+++ b/phpBB/includes/db/migration/tool/config.php
@@ -49,7 +49,7 @@ class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_interfac
{
if (isset($this->config[$config_name]))
{
- throw new phpbb_db_migration_exception('CONFIG_ALREADY_EXISTS', $config_name);
+ throw new phpbb_db_migration_exception('CONFIG_ALREADY_EXIST', $config_name);
}
$this->config->set($config_name, $config_value, !$is_dynamic);
diff --git a/phpBB/includes/db/migration/tool/module.php b/phpBB/includes/db/migration/tool/module.php
index afe1f21ec5..4d7fae2bb0 100644
--- a/phpBB/includes/db/migration/tool/module.php
+++ b/phpBB/includes/db/migration/tool/module.php
@@ -242,14 +242,14 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_interfac
if (!$module_id)
{
- throw new phpbb_db_migration_exception('MODULE_PARENT_NOT_EXIST', $parent);
+ throw new phpbb_db_migration_exception('MODULE_NOT_EXIST', $parent);
}
$parent = $data['parent_id'] = $module_id;
}
else if (!$this->exists($class, false, $parent))
{
- throw new phpbb_db_migration_exception('MODULE_PARENT_NOT_EXIST', $parent);
+ throw new phpbb_db_migration_exception('MODULE_NOT_EXIST', $parent);
}
if ($this->exists($class, $parent, $data['module_langname']))
@@ -477,7 +477,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_interfac
$result = $acp_modules->delete_module($module_id);
if (!empty($result))
{
- throw new phpbb_db_migration_exception('CANNOT_REMOVE_MODULE', $module_id);
+ throw new phpbb_db_migration_exception('MODULE_NOT_REMOVABLE', $module_id, $result);
}
}
diff --git a/phpBB/includes/db/migration/tool/permission.php b/phpBB/includes/db/migration/tool/permission.php
index 001d090f5a..4231fbe1dd 100644
--- a/phpBB/includes/db/migration/tool/permission.php
+++ b/phpBB/includes/db/migration/tool/permission.php
@@ -107,7 +107,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_inte
{
if ($this->exists($auth_option, $global))
{
- throw new phpbb_db_migration_exception('PERMISSION_ALREADY_EXISTS', $auth_option);
+ throw new phpbb_db_migration_exception('PERMISSION_ALREADY_EXIST', $auth_option);
}
// We've added permissions, so set to true to notify the user.
@@ -252,7 +252,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_inte
if ($role_id)
{
- throw new phpbb_db_migration_exception('ROLE_ALREADY_EXISTS', $old_role_name);
+ return;
}
$sql = 'SELECT MAX(role_order) AS max_role_order
@@ -290,7 +290,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_inte
if (!$role_id)
{
- throw new phpbb_db_migration_exception('ROLE_NOT_EXISTS', $old_role_name);
+ throw new phpbb_db_migration_exception('ROLE_NOT_EXIST', $old_role_name);
}
$sql = 'UPDATE ' . ACL_ROLES_TABLE . "