aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/exception.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-03-04 00:22:15 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-03-04 00:22:15 +0100
commitd26ad8ed2693b03a12eec4deec729e972579e5d9 (patch)
tree5e5089616cc4b398c1c698154ff5fdac8f6d1476 /phpBB/includes/db/migration/exception.php
parent8a9e1ca3f176946bc7b8ddb9be30ca8607685b80 (diff)
parentbee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff)
downloadforums-d26ad8ed2693b03a12eec4deec729e972579e5d9.tar
forums-d26ad8ed2693b03a12eec4deec729e972579e5d9.tar.gz
forums-d26ad8ed2693b03a12eec4deec729e972579e5d9.tar.bz2
forums-d26ad8ed2693b03a12eec4deec729e972579e5d9.tar.xz
forums-d26ad8ed2693b03a12eec4deec729e972579e5d9.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/avatars
Conflicts: phpBB/install/database_update.php
Diffstat (limited to 'phpBB/includes/db/migration/exception.php')
-rw-r--r--phpBB/includes/db/migration/exception.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/exception.php b/phpBB/includes/db/migration/exception.php
index ffdcd97780..e84330dd71 100644
--- a/phpBB/includes/db/migration/exception.php
+++ b/phpBB/includes/db/migration/exception.php
@@ -52,4 +52,28 @@ class phpbb_db_migration_exception extends \Exception
{
return $this->message . ': ' . var_export($this->parameters, true);
}
+
+ /**
+ * Get the parameters
+ *
+ * @return array
+ */
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+
+ /**
+ * Get localised message (with $user->lang())
+ *
+ * @param phpbb_user $user
+ * @return string
+ */
+ public function getLocalisedMessage(phpbb_user $user)
+ {
+ $parameters = $this->getParameters();
+ array_unshift($parameters, $this->getMessage());
+
+ return call_user_func_array(array($user, 'lang'), $parameters);
+ }
}