aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-04 12:30:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-04 12:30:21 +0000
commita465b06923af558429b3c7642c52309d61574029 (patch)
treeb31ac1e61d9db47aa6939b7a55cd0aae303ae459 /phpBB/includes/functions.php
parentf7b51337c55f88f19f8b9406b64e7d03150efa2c (diff)
downloadforums-a465b06923af558429b3c7642c52309d61574029.tar
forums-a465b06923af558429b3c7642c52309d61574029.tar.gz
forums-a465b06923af558429b3c7642c52309d61574029.tar.bz2
forums-a465b06923af558429b3c7642c52309d61574029.tar.xz
forums-a465b06923af558429b3c7642c52309d61574029.zip
added class for disabled options in ACP
E_USER_ERROR now using language keys if available [related to #10445] UCP/MCP title tags [#10441] Check $start parameter in viewforum [#10435] Check for postable forum for moving user posts within users ACP [#10433] Show error if admin tries to put forums beneath linked forums [related to #10433] Correctly catch attachments while moving posts [#10431] language change in install.html [#10425] Updated AUTHORS file git-svn-id: file:///svn/phpbb/trunk@7456 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php36
1 files changed, 29 insertions, 7 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 7782cba893..3bb3266528 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3516,6 +3516,31 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
case E_USER_ERROR:
+ if (!empty($user) && !empty($user->lang))
+ {
+ $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text;
+ $msg_title = (!isset($msg_title)) ? $user->lang['GENERAL_ERROR'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title);
+
+ $l_return_index = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $phpbb_root_path . '">', '</a>');
+ $l_notify = '';
+
+ if (!empty($config['board_contact']))
+ {
+ $l_notify = '<p>' . sprintf($user->lang['NOTIFY_ADMIN_EMAIL'], $config['board_contact']) . '</p>';
+ }
+ }
+ else
+ {
+ $msg_title = 'General Error';
+ $l_return_index = '<a href="' . $phpbb_root_path . '">Return to index page</a>';
+ $l_notify = '';
+
+ if (!empty($config['board_contact']))
+ {
+ $l_notify = '<p>Please notify the board administrator or webmaster: <a href="mailto:' . $config['board_contact'] . '">' . $config['board_contact'] . '</a></p>';
+ }
+ }
+
garbage_collection();
// Try to not call the adm page data...
@@ -3538,19 +3563,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo '<body id="errorpage">';
echo '<div id="wrap">';
echo ' <div id="page-header">';
- echo ' <a href="' . $phpbb_root_path . '">Return to forum index</a>';
+ echo ' ' . $l_return_index;
echo ' </div>';
echo ' <div class="panel">';
echo ' <div id="content">';
- echo ' <h1>General Error</h1>';
+ echo ' <h1>' . $msg_title . '</h1>';
echo ' <div>' . $msg_text . '</div>';
- if (!empty($config['board_contact']))
- {
- echo ' <p>Please notify the board administrator or webmaster: <a href="mailto:' . $config['board_contact'] . '">' . $config['board_contact'] . '</a></p>';
- }
-
+ echo $l_notify;
+
echo ' </div>';
echo ' </div>';
echo ' <div id="page-footer">';