diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/db/migration/exception.php | 14 |
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); + } } |