From 879bc89524aa98874d6de45dc057cb7ff45bd7ed Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 8 Jun 2010 19:27:55 +0200 Subject: [PATCH 1/6] [ticket/9643] Only split $port from $sqlserver, if it's not an IPv6 address. PHPBB3-9643 --- phpBB/includes/db/postgres.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index b3139b3d79..2a885f1d04 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -46,7 +46,10 @@ class dbal_postgres extends dbal if ($sqlserver) { - if (strpos($sqlserver, ':') !== false) + // $sqlserver can carry a port separated by : for compatibility reasons + // If $sqlserver has more than one : it's probably an IPv6 address. + // In this case we only allow passing a port via the $port variable. + if (substr_count($sqlserver, ':') === 1) { list($sqlserver, $port) = explode(':', $sqlserver); } From 46cae83264905a25e47355dfb7923df2d9ec252f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 14 Jun 2010 22:27:23 +0200 Subject: [PATCH 2/6] [ticket/9655] Pass E_USER_WARNING, so it doesn't look like a successful action. PHPBB3-9655 --- phpBB/includes/acp/acp_captcha.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php index 56a57e319c..1893eed14f 100644 --- a/phpBB/includes/acp/acp_captcha.php +++ b/phpBB/includes/acp/acp_captcha.php @@ -89,14 +89,14 @@ class acp_captcha } else { - trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action)); + trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING); } } trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action)); } else if ($submit) { - trigger_error($user->lang['FORM_INVALID'] . adm_back_link()); + trigger_error($user->lang['FORM_INVALID'] . adm_back_link(), E_USER_WARNING); } else { From e66c089626eb1bd24751893778b04c941dcf1cf8 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 15 Jun 2010 20:11:00 +0200 Subject: [PATCH 3/6] [ticket/9112] Make sure current user can see most active forum/topic. PHPBB3-9112 --- phpBB/includes/functions_display.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index ea77551fc4..8d25ec3c34 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -969,11 +969,16 @@ function display_user_activity(&$userdata) $forum_ary = array_unique($forum_ary); $forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : ''; + $fid_m_approve = $auth->acl_getf('m_approve', true); + $sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', array_keys($fid_m_approve)) : ''; + // Obtain active forum $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts FROM ' . POSTS_TABLE . ' WHERE poster_id = ' . $userdata['user_id'] . " AND post_postcount = 1 + AND (post_approved = 1 + $sql_m_approve) $forum_sql GROUP BY forum_id ORDER BY num_posts DESC"; @@ -996,6 +1001,8 @@ function display_user_activity(&$userdata) FROM ' . POSTS_TABLE . ' WHERE poster_id = ' . $userdata['user_id'] . " AND post_postcount = 1 + AND (post_approved = 1 + $sql_m_approve) $forum_sql GROUP BY topic_id ORDER BY num_posts DESC"; From 6221ba4dd172428cf10eedad429a76d390aa2219 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 20 Jun 2010 13:38:36 +0200 Subject: [PATCH 4/6] [ticket/9665] Allow preview of signature when it is the string "0". Since only the SIGNATURE_PREVIEW parameter is evaluated in the templates will not allow the signature to be "0". however does allow "0". PHPBB3-9665 --- phpBB/styles/prosilver/template/ucp_profile_signature.html | 2 +- phpBB/styles/subsilver2/template/ucp_profile_signature.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html index 5d25d2d9f4..ab23b84076 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_signature.html +++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html @@ -4,7 +4,7 @@

{L_TITLE}

- +

{L_SIGNATURE_PREVIEW}

diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html index 2b396ea0df..a33726e166 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html @@ -93,7 +93,7 @@ - + {L_SIGNATURE_PREVIEW} From 52c3b51c95b408a284bd278379679ad00a2151af Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 14 Jun 2010 22:34:31 +0200 Subject: [PATCH 5/6] [ticket/9656] Remove @ from phpinfo() to get correct error_reporting value. PHPBB3-9656 --- phpBB/includes/acp/acp_php_info.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php index 9935c0466e..0499095004 100644 --- a/phpBB/includes/acp/acp_php_info.php +++ b/phpBB/includes/acp/acp_php_info.php @@ -35,9 +35,9 @@ class acp_php_info $this->tpl_name = 'acp_php_info'; $this->page_title = 'ACP_PHP_INFO'; - + ob_start(); - @phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); + phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); $phpinfo = ob_get_clean(); $phpinfo = trim($phpinfo); From ac45f07402314b20bf7211ae9c63396d44c174ef Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 13 Jun 2010 20:31:33 +0200 Subject: [PATCH 6/6] [ticket/9653] Valid XHTML with code BBCode in subsilver2 viewtopic signatures PHPBB3-9653 --- phpBB/styles/subsilver2/template/viewtopic_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 8f01c64c0e..bba00ce685 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -238,7 +238,7 @@

{L_DOWNLOAD_NOTICE}
-
_________________
{postrow.SIGNATURE}
+

_________________
{postrow.SIGNATURE}