aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_prefs.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-10-13 19:30:02 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-10-13 19:30:02 +0000
commitc941f666cf5184b508589fc151772f42f1a2d4c5 (patch)
tree88d74b4c9ac57e16682b93878885d6f809fe55a5 /phpBB/includes/ucp/ucp_prefs.php
parent4804c05bca3e49a62a3fb91a988364024e745a5c (diff)
downloadforums-c941f666cf5184b508589fc151772f42f1a2d4c5.tar
forums-c941f666cf5184b508589fc151772f42f1a2d4c5.tar.gz
forums-c941f666cf5184b508589fc151772f42f1a2d4c5.tar.bz2
forums-c941f666cf5184b508589fc151772f42f1a2d4c5.tar.xz
forums-c941f666cf5184b508589fc151772f42f1a2d4c5.zip
- ucp register/remind/activate fixes mostly regarding account activation
- general ucp fixing (profile and ucp_main) - created three new functions (return correct topic author string, generate topic related pagination and get topic type/status...). These general bits are used on several pages (subscribed topics, bookmarks, viewforum). - config basic schema fix - commented out inline fix for unread topic tracking in viewforum, instead tried another method (hopefully working as well) git-svn-id: file:///svn/phpbb/trunk@5001 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index a463df778a..27002cbeaf 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -21,7 +21,7 @@ class ucp_prefs extends module
$error = $data = array();
$s_hidden_fields = '';
- switch($mode)
+ switch ($mode)
{
case 'personal':
@@ -40,10 +40,9 @@ class ucp_prefs extends module
'notifypm' => true,
'popuppm' => false,
'allowpm' => true,
+ 'report_pm_notify' => false
);
- $var_ary['report_pm_notify'] = false;
-
foreach ($var_ary as $var => $default)
{
$data[$var] = request_var($var, $default);
@@ -89,6 +88,9 @@ class ucp_prefs extends module
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$viewemail = (isset($viewemail)) ? $viewemail : $user->data['user_allow_viewemail'];
@@ -214,6 +216,9 @@ class ucp_prefs extends module
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$sk = (isset($sk)) ? $sk : ((!empty($user->data['user_sortby_type'])) ? $user->data['user_sortby_type'] : 't');
@@ -310,6 +315,9 @@ class ucp_prefs extends module
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
+
+ // Replace "error" strings with their real, localised form
+ $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
$bbcode = (isset($bbcode)) ? $bbcode : $user->optionget('bbcode');