mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
even more fixes. :o
git-svn-id: file:///svn/phpbb/trunk@7889 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -2016,7 +2016,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
if ($update)
|
||||
{
|
||||
$name = request_var('name', '');
|
||||
$name = request_var('name', '', true);
|
||||
$copyright = request_var('copyright', '', true);
|
||||
|
||||
$template_id = request_var('template_id', 0);
|
||||
@@ -2635,7 +2635,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$error = array();
|
||||
|
||||
$style_row = array(
|
||||
$mode . '_name' => request_var('name', ''),
|
||||
$mode . '_name' => request_var('name', '', true),
|
||||
$mode . '_copyright' => request_var('copyright', '', true),
|
||||
'template_id' => 0,
|
||||
'theme_id' => 0,
|
||||
|
@@ -4124,7 +4124,7 @@ function page_header($page_title = '', $display_online_list = true)
|
||||
'UA_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup', false),
|
||||
'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
|
||||
'U_MEMBERSLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
|
||||
'U_VIEWONLINE' => append_sid("{$phpbb_root_path}viewonline.$phpEx"),
|
||||
'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
|
||||
'U_LOGIN_LOGOUT' => $u_login_logout,
|
||||
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
|
||||
'U_SEARCH' => append_sid("{$phpbb_root_path}search.$phpEx"),
|
||||
|
@@ -665,7 +665,7 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';font-weight:bold;"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@@ -116,7 +116,7 @@ class bbcode_firstpass extends bbcode
|
||||
'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
|
||||
'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
|
||||
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
|
||||
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](https?://)([a-z0-9\-\.,\?!%\*_:;~\\&$@/=\+]+)\[/img\]#ie' => "\$this->bbcode_img('\$1\$2')")),
|
||||
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
|
||||
'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
|
||||
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
|
||||
'u' => array('bbcode_id' => 7, 'regexp' => array('#\[u\](.*?)\[/u\]#ise' => "\$this->bbcode_underline('\$1')")),
|
||||
@@ -278,6 +278,20 @@ class bbcode_firstpass extends bbcode
|
||||
$in = trim($in);
|
||||
$error = false;
|
||||
|
||||
$in = str_replace(' ', '%20', $in);
|
||||
|
||||
// Checking urls
|
||||
if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) && !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in))
|
||||
{
|
||||
return '[img]' . $in . '[/img]';
|
||||
}
|
||||
|
||||
// Try to cope with a common user error... not specifying a protocol but only a subdomain
|
||||
if (!preg_match('#^[a-z0-9]+://#i', $in))
|
||||
{
|
||||
$in = 'http://' . $in;
|
||||
}
|
||||
|
||||
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
|
||||
{
|
||||
$stats = @getimagesize($in);
|
||||
|
@@ -707,7 +707,7 @@ class ucp_groups
|
||||
$start = request_var('start', 0);
|
||||
|
||||
// Grab the leaders - always, on every page...
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.group_id = $group_id
|
||||
AND u.user_id = ug.user_id
|
||||
@@ -719,7 +719,9 @@ class ucp_groups
|
||||
{
|
||||
$template->assign_block_vars('leader', array(
|
||||
'USERNAME' => $row['username'],
|
||||
'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
|
||||
'USERNAME_COLOUR' => $row['user_colour'],
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'U_USER_VIEW' => get_username_string('profile', $row['user_id'], $row['username']),
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
@@ -738,7 +740,7 @@ class ucp_groups
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Grab the members
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.group_id = $group_id
|
||||
AND u.user_id = ug.user_id
|
||||
@@ -761,7 +763,9 @@ class ucp_groups
|
||||
|
||||
$template->assign_block_vars('member', array(
|
||||
'USERNAME' => $row['username'],
|
||||
'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
|
||||
'USERNAME_COLOUR' => $row['user_colour'],
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'U_USER_VIEW' => get_username_string('profile', $row['user_id'], $row['username']),
|
||||
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
|
||||
'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
|
||||
'USER_POSTS' => $row['user_posts'],
|
||||
|
@@ -163,18 +163,16 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
{
|
||||
foreach ($id_ary as $ug_id => $_id)
|
||||
{
|
||||
$user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="font-weight: bold; color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : '';
|
||||
|
||||
if ($type == 'u')
|
||||
{
|
||||
$link = ($ug_id != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $ug_id) . '"' . $user_colour . '>' : '';
|
||||
$address_list[$message_id][] = get_username_string('full', $ug_id, $recipient_list[$type][$ug_id]['name'], $recipient_list[$type][$ug_id]['colour']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="font-weight: bold; color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : '';
|
||||
$link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $ug_id) . '"' . $user_colour . '>';
|
||||
$address_list[$message_id][] = $link . $recipient_list[$type][$ug_id]['name'] . (($link) ? '</a>' : '');
|
||||
}
|
||||
|
||||
$address_list[$message_id][] = $link . $recipient_list[$type][$ug_id]['name'] . (($link) ? '</a>' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user