aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_modules.html24
-rw-r--r--phpBB/includes/functions.php8
-rw-r--r--phpBB/includes/message_parser.php27
-rw-r--r--phpBB/includes/ucp/ucp_register.php6
4 files changed, 31 insertions, 34 deletions
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index bec0e76def..fb6e494568 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -155,6 +155,19 @@
</table>
<!-- ENDIF -->
+ <div class="clearfix">&nbsp;</div>
+
+ <form id="quick" method="post" action="{U_ACTION}">
+
+ <fieldset class="quick" style="float: right;">
+ <input type="hidden" name="action" value="quickadd" />
+
+ <select name="quick_install">{S_INSTALL_OPTIONS}</select>
+ <input class="button2" name="quickadd" type="submit" value="{L_ADD_MODULE}" />
+ </fieldset>
+
+ </form>
+
<form id="module" method="post" action="{U_ACTION}">
<fieldset class="quick" style="float: left;">
@@ -167,16 +180,7 @@
</form>
- <form id="quick" method="post" action="{U_ACTION}">
-
- <fieldset class="quick">
- <input type="hidden" name="action" value="quickadd" />
-
- <select name="quick_install">{S_INSTALL_OPTIONS}</select>
- <input class="button2" name="quickadd" type="submit" value="{L_ADD_MODULE}" />
- </fieldset>
-
- </form>
+ <div class="clearfix">&nbsp;</div>
<form id="mselect" method="post" action="{U_SEL_ACTION}">
<fieldset class="quick">
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 504aa44dae..479acc291e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1868,19 +1868,19 @@ function make_clickable($text, $server_url = false)
// Be sure to not let the matches cross over. ;)
// relative urls for this board
- $magic_url_match[] = '#(^|[\n \]]|\()(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
+ $magic_url_match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
$magic_url_replace[] = "'\$1<!-- l --><a href=\"\$2/' . preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}/', '\\1', '\$3') . '\">' . preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}/', '\\1', '\$3') . '</a><!-- l -->'";
// matches a xxxx://aaaaa.bbb.cccc. ...
- $magic_url_match[] = '#(^|[\n \]]|\()([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
+ $magic_url_match[] = '#(^|[\n ]|\()([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
$magic_url_replace[] = "'\$1<!-- m --><a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 55) ? substr(str_replace('&amp;', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&amp;', '&', '\$2'), -10) : '\$2') . '</a><!-- m -->'";
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
- $magic_url_match[] = '#(^|[\n \]]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
+ $magic_url_match[] = '#(^|[\n ]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
$magic_url_replace[] = "'\$1<!-- w --><a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 55) ? substr(str_replace('&amp;', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&amp;', '&', '\$2'), -10) : '\$2') . '</a><!-- w -->'";
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
- $magic_url_match[] = '#(^|[\n \]]|\()([a-z0-9&\-_.]+?@[\w\-]+\.(?:[\w\-\.]+\.)?[\w]+)#ie';
+ $magic_url_match[] = '#(^|[\n ]|\()([a-z0-9&\-_.]+?@[\w\-]+\.(?:[\w\-\.]+\.)?[\w]+)#ie';
$magic_url_replace[] = "'\$1<!-- e --><a href=\"mailto:\$2\">' . ((strlen('\$2') > 55) ? substr('\$2', 0, 39) . ' ... ' . substr('\$2', -10) : '\$2') . '</a><!-- e -->'";
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index ecfd4a50ed..afe66042dd 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -613,8 +613,8 @@ class bbcode_firstpass extends bbcode
if ($buffer == '/quote' && sizeof($close_tags))
{
// we have found a closing tag
-
- $out .= array_pop($close_tags) . ']';
+ // Add space at the end of the closing tag to allow following urls/smilies to be parsed correctly
+ $out .= array_pop($close_tags) . '] ';
$tok = '[';
$buffer = '';
}
@@ -740,7 +740,7 @@ class bbcode_firstpass extends bbcode
if ($var1)
{
- $retval = '[email=' . $this->bbcode_specialchars($email) . ':' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($txt) . '[/email:' . $this->bbcode_uid . ']';
+ $retval = '[email=' . $this->bbcode_specialchars($email) . ':' . $this->bbcode_uid . ']' . $txt . '[/email:' . $this->bbcode_uid . ']';
}
else
{
@@ -768,7 +768,7 @@ class bbcode_firstpass extends bbcode
return '';
}
- // relative urls for this board
+ // Checking urls
if (preg_match('#' . preg_quote(generate_board_url(), '#') . '/([^ \t\n\r<"\']+)#i', $url) ||
preg_match('#([\w]+?://.*?[^ \t\n\r<"\']*)#i', $url) ||
preg_match('#(www\.[\w\-]+\.[\w\-.\~]+(?:/[^ \t\n\r<"\']*)?)#i', $url))
@@ -785,26 +785,13 @@ class bbcode_firstpass extends bbcode
$url = 'http://' . $url;
}
- $url_info = parse_url($url);
- $script_test_path = explode('/', $url_info['path']);
- $test_url = $url_info['scheme'] . '://' . $url_info['host'];
- if (!empty($url_info['port']))
- {
- $test_url .= ':' . $url_info['port'];
- }
-
// We take our test url and stick on the first bit of text we get to check if we are really at the domain. If so, lets go!
- if ($test_url . '/' . $script_test_path[1] == generate_board_url())
+ if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
{
- $url_info['query'] = preg_replace('/(?:&amp;|^)sid=[0-9a-f]{32}/', '', $url_info['query']);
- $url = $test_url . $url_info['path'] . '?' . $url_info['query'];
- if (!empty($url_info['fragment']))
- {
- $url .= $url_info['fragment'];
- }
+ $url = preg_replace('/(&amp;|\?)sid=[0-9a-f]{32}/', '\1', $url);
}
- return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($var2) . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']';
+ return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']';
}
return '[url' . (($var1) ? '=' . $var1 : '') . ']' . $var2 . '[/url]';
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 7a55b3495b..8dd482a0c1 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -251,6 +251,12 @@ class ucp_register
// Register user...
$user_id = user_add($user_row, $cp_data);
+ // This should not happen, because the required variables are listed above...
+ if ($user_id === false)
+ {
+ trigger_error($user->lang['NO_USER'], E_USER_ERROR);
+ }
+
if ($coppa && $config['email_enable'])
{
$message = $user->lang['ACCOUNT_COPPA'];