aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-24 14:59:26 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-24 14:59:26 +0000
commitd529f78adb85698c9382ad29e4583f309eaf850a (patch)
tree58f973b636dac28e93c10274fc58b3bff777afc8 /phpBB/includes/functions.php
parenta0c3a326bd0e0162217589c57af90e7b477e4e88 (diff)
downloadforums-d529f78adb85698c9382ad29e4583f309eaf850a.tar
forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.gz
forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.bz2
forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.xz
forums-d529f78adb85698c9382ad29e4583f309eaf850a.zip
rather large update, most important things done:
- implemented provided patch/diff file for bug #5350 (Highway of Life) with some tiny changes and alterations - more username/colour changes/fixes - added a note about PM rule-dependant message removals so the user is not wondering too much if he can't remember his rules. :) - some column changes to fix unicode issues - bugfixes git-svn-id: file:///svn/phpbb/trunk@6650 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index dac39e5940..001702a39e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1865,7 +1865,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
}
}
- // The result parameter is always an array, holding the relevant informations...
+ // The result parameter is always an array, holding the relevant information...
if ($result['status'] == LOGIN_SUCCESS)
{
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
@@ -2676,7 +2676,7 @@ function get_backtrace()
$trace['file'] = substr($trace['file'], 1);
$args = array();
- // If include/require/include_once is not called, do not show arguments - they may contain sensible informations
+ // If include/require/include_once is not called, do not show arguments - they may contain sensible information
if (!in_array($trace['function'], array('include', 'require', 'include_once')))
{
unset($trace['args']);
@@ -2773,11 +2773,12 @@ function truncate_string($string, $max_length = 60, $allow_reply = true)
* @param int $user_id The users id
* @param string $username The users name
* @param string $username_colour The users colour
-* @param string $guest_username optional field to specify the guest username. It will be used in favor of the GUEST language variable then.
+* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.
+* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &amp;u={user_id}
*
* @return string A string consisting of what is wanted based on $mode.
*/
-function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false)
+function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
global $phpbb_root_path, $phpEx, $user;
@@ -2796,7 +2797,8 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// Only show the link if not anonymous
if ($user_id && $user_id != ANONYMOUS)
{
- $profile_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . (int) $user_id);
+ $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
+ $profile_url .= '&amp;u=' . (int) $user_id;
$full_string = '<a href="' . $profile_url . '"' . (($username_colour) ? ' style="color: ' . $username_colour . '; font-weight: bold;"' : '') . '>' . $username . '</a>';
}
else
@@ -3116,7 +3118,7 @@ function page_header($page_title = '', $display_online_list = true)
$reading_sql .
((!$config['load_online_guests']) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . '
AND u.user_id = s.session_user_id
- ORDER BY u.username ASC, s.session_ip ASC';
+ ORDER BY u.username_clean ASC, s.session_ip ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))