From 6f37638caee649060dc9f933af6773652a813035 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 29 Jun 2007 13:00:54 +0000 Subject: [PATCH] - fixing some very very nasty opera bugs by changing the clearing method we use. - also properly apply preg_quote to some strings. git-svn-id: file:///svn/phpbb/trunk@7808 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/admin.css | 7 +++---- phpBB/docs/CHANGELOG.html | 6 +++--- phpBB/download.php | 4 ++-- phpBB/includes/acp/acp_attachments.php | 2 +- phpBB/includes/session.php | 8 ++++---- phpBB/includes/ucp/ucp_prefs.php | 1 + phpBB/styles/prosilver/template/editor.js | 4 ++-- phpBB/styles/prosilver/template/posting_buttons.html | 5 +++-- phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 2 +- phpBB/styles/prosilver/template/ucp_prefs_personal.html | 2 +- phpBB/styles/prosilver/theme/tweaks.css | 7 ++++--- 11 files changed, 25 insertions(+), 23 deletions(-) diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index f81c56846d..44f89fea33 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1221,20 +1221,19 @@ input.disabled { } /* Nice method for clearing floated blocks without having to insert any extra markup - From http://www.positioniseverything.net/easyclearing.html */ + From http://www.positioniseverything.net/easyclearing.html .clearfix:after, #tabs:after, .row:after, #content:after, fieldset dl:after, #page-body:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; -} +}*/ -/* Hide from Mac IE, Windows IE uses this as it doesn't support the :after method above \*/ .clearfix, #tabs, .row, #content, fieldset dl, #page-body { height: 1%; + overflow: auto; } -/* End hide */ /* Syntax Highlighting ---------------------------------------- */ diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index b7201dface..7e24558e3c 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -195,9 +195,9 @@ p a {
  • [Fix] Display custom profile field "date" based on users language (Bug #12787)
  • [Fix] Allow adding of help language files within subdirectories (Bug #12783)
  • [Fix] Correctly apply smileys on posting having # within their emotion code
  • -
  • [Fix] Correctly convert smileys having double quotes within their emotion code (Bug #12731)
  • -
  • [Fix] The converter now adds the protocol to user website profile fields missing it (Bug #12819)
  • - +
  • [Fix] Correctly escape banned ip/email using wildcard for ban check (Bug #12815)
  • +
  • [Fix] Fixed some very nasty opera bugs (dropdown list bug, cpu spike bug) (Bug #12763, #11609)
  • +
  • [Fix] Font colour list having the correct height in IE (Bug #9571)
  • diff --git a/phpBB/download.php b/phpBB/download.php index c24ea81425..382c528db9 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -544,7 +544,7 @@ function download_allowed() { foreach ($iplist as $ip) { - if (preg_match('#^' . str_replace('*', '.*?', preg_quote($site_ip, '#')) . '$#i', $ip)) + if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_ip, '#')) . '$#i', $ip)) { if ($row['ip_exclude']) { @@ -561,7 +561,7 @@ function download_allowed() if ($site_hostname) { - if (preg_match('#^' . str_replace('*', '.*?', preg_quote($site_hostname, '#')) . '$#i', $hostname)) + if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_hostname, '#')) . '$#i', $hostname)) { if ($row['ip_exclude']) { diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 1db18f6d5c..a0aaf8d67e 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -78,7 +78,7 @@ class acp_attachments } $db->sql_freeresult($result); - $l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((sizeof($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']'; + $l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']'; $display_vars = array( 'title' => 'ACP_ATTACHMENT_SETTINGS', diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 35edf92749..9e70779556 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -884,13 +884,13 @@ class session { if (!is_array($user_ips)) { - $ip_banned = preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ips); + $ip_banned = preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips); } else { foreach ($user_ips as $user_ip) { - if (preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip)) + if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ip)) { $ip_banned = true; break; @@ -901,7 +901,7 @@ class session if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) || $ip_banned || - (!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $user_email))) + (!empty($row['ban_email']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_email'], '#')) . '$#i', $user_email))) { if (!empty($row['ban_exclude'])) { @@ -917,7 +917,7 @@ class session { $ban_triggered_by = 'user'; } - else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ips)) + else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips)) { $ban_triggered_by = 'ip'; } diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 8a10254a6e..b0e8f098c2 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -123,6 +123,7 @@ class ucp_prefs 'S_DST' => $data['dst'], 'DATE_FORMAT' => $data['dateformat'], + 'A_DATE_FORMAT' => addslashes($data['dateformat']), 'S_DATEFORMAT_OPTIONS' => $dateformat_options, 'S_CUSTOM_DATEFORMAT' => $s_custom, 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 38dd77bdbe..500ea91c51 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -74,7 +74,7 @@ function bbstyle(bbnumber) function bbfontstyle(bbopen, bbclose) { theSelection = false; - + var textarea = document.forms[form_name].elements[text_name]; textarea.focus(); @@ -325,7 +325,7 @@ function colorPalette(dir, width, height) for (b = 0; b < 5; b++) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write(''); + document.write(''); document.write('#' + color + ''); document.writeln(''); } diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 5f1f061532..56f8cdf709 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -62,7 +62,8 @@ -
    +
    {L_VIEW_PREVIOUS_HISTORY} {L_VIEW_NEXT_HISTORY}
    diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index fea21f9693..6ffe6f69c3 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -107,7 +107,7 @@