aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/db/migration/tool/config.php4
-rw-r--r--phpBB/includes/db/migration/tool/module.php6
-rw-r--r--phpBB/includes/db/migration/tool/permission.php6
-rw-r--r--phpBB/includes/db/migrator.php9
4 files changed, 16 insertions, 9 deletions
diff --git a/phpBB/includes/db/migration/tool/config.php b/phpBB/includes/db/migration/tool/config.php
index 458a25fb66..0b626bf455 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_EXIST', $config_name);
+ return;
}
$this->config->set($config_name, $config_value, !$is_dynamic);
@@ -105,7 +105,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_NOT_EXIST', $config_name);
+ return;
}
$this->config->delete($config_name);
diff --git a/phpBB/includes/db/migration/tool/module.php b/phpBB/includes/db/migration/tool/module.php
index ad94c5aadb..ec683d36af 100644
--- a/phpBB/includes/db/migration/tool/module.php
+++ b/phpBB/includes/db/migration/tool/module.php
@@ -236,7 +236,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_interfac
if ($this->exists($class, $parent, $data['module_langname']))
{
- throw new phpbb_db_migration_exception('MODULE_ALREADY_EXIST', $data['module_langname']);
+ return;
}
if (!class_exists('acp_modules'))
@@ -369,7 +369,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_interfac
{
if (!$this->exists($class, $parent, $module))
{
- throw new phpbb_db_migration_exception('MODULE_NOT_EXIST', ((isset($this->user->lang[$module])) ? $this->user->lang[$module] : $module));
+ return;
}
$parent_sql = '';
@@ -442,7 +442,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('MODULE_NOT_REMOVABLE', $module_id, $result);
+ return;
}
}
diff --git a/phpBB/includes/db/migration/tool/permission.php b/phpBB/includes/db/migration/tool/permission.php
index 4231fbe1dd..3b196fdbc2 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_EXIST', $auth_option);
+ return;
}
// We've added permissions, so set to true to notify the user.
@@ -190,7 +190,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_NOT_EXIST', $auth_option);
+ return;
}
if ($global)
@@ -315,7 +315,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_inte
if (!$role_id)
{
- throw new phpbb_db_migration_exception('ROLE_NOT_EXIST', $role_name);
+ return;
}
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php
index ed818b5b4d..9d7cede95b 100644
--- a/phpBB/includes/db/migrator.php
+++ b/phpBB/includes/db/migrator.php
@@ -60,7 +60,9 @@ class phpbb_db_migrator
protected $migrations = array();
/**
- * 'name' and 'class' of the last migration run
+ * 'name,' 'class,' and 'state' of the last migration run
+ *
+ * 'effectively_installed' set and set to true if the migration was effectively_installed
*
* @var array
*/
@@ -199,6 +201,7 @@ class phpbb_db_migrator
$this->last_run_migration = array(
'name' => $name,
'class' => $migration,
+ 'state' => $state,
);
if (!isset($this->migration_state[$name]))
@@ -213,6 +216,8 @@ class phpbb_db_migrator
'migration_start_time' => 0,
'migration_end_time' => 0,
);
+
+ $this->last_run_migration['effectively_installed'] = true;
}
else
{
@@ -557,6 +562,8 @@ class phpbb_db_migrator
}
$this->migration_state[$name] = $state;
+
+ $this->last_run_migration['state'] = $state;
}
/**