aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-02-15 22:19:24 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-02-15 22:19:24 -0600
commitf6bb14569b0a777d3511b732201af9d1a415f2ed (patch)
tree52a076b7bb09cbb9e9034855af5adfc61ec28f9e /phpBB
parentf9a1b27a99e30a41db4facd415b39a690614d6c6 (diff)
downloadforums-f6bb14569b0a777d3511b732201af9d1a415f2ed.tar
forums-f6bb14569b0a777d3511b732201af9d1a415f2ed.tar.gz
forums-f6bb14569b0a777d3511b732201af9d1a415f2ed.tar.bz2
forums-f6bb14569b0a777d3511b732201af9d1a415f2ed.tar.xz
forums-f6bb14569b0a777d3511b732201af9d1a415f2ed.zip
[feature/migrations] getLocalisedMessage function for migration exception
PHPBB3-11351
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/db/migration/exception.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/exception.php b/phpBB/includes/db/migration/exception.php
index b3abcdb5e5..e84330dd71 100644
--- a/phpBB/includes/db/migration/exception.php
+++ b/phpBB/includes/db/migration/exception.php
@@ -62,4 +62,18 @@ class phpbb_db_migration_exception extends \Exception
{
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);
+ }
}