From d1676cb6bf7c0ae5addf3cc954c636f9a6cbaf41 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 25 Mar 2006 14:16:17 +0000 Subject: my attempt to fix custom profile fields - added the load settings for custom profile fields - re-added our famous make_clickable function - removed group_by clauses (due to the lang id selection the group by clause is no more needed) I hope that i have not just created new bugs. ;) git-svn-id: file:///svn/phpbb/trunk@5712 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 29e817a369..9101b5ee87 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -894,32 +894,8 @@ class parse_message extends bbcode_firstpass // into relative versions when the server/script path matches the link function magic_url($server_url) { - static $match; - static $replace; - - if (!is_array($match)) - { - $match = $replace = array(); - // Be sure to not let the matches cross over. ;) - - // relative urls for this board - $match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/([^ \t\n\r<"\'\)&]+|&(?!lt;))*#i'; - $replace[] = '$1$3'; - - // matches a xxxx://aaaaa.bbb.cccc. ... - $match[] = '#(^|[\n ]|\()([\w]+:/{2}.*?([^ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie'; - $replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''"; - - // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing - $match[] = '#(^|[\n ]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie'; - $replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''"; - - // matches an email@domain type address at the start of a line, or after a space. - $match[] = '#(^|[\n ]|\()([a-z0-9&\-_.]+?@[\w\-]+\.(?:[\w\-\.]+\.)?[\w]+)#ie'; - $replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr('\$2', 0, 39) . ' ... ' . substr('\$2', -10) : '\$2') . ''"; - } - - $this->message = preg_replace($match, $replace, $this->message); + // We use the global make_clickable function + $this->message = make_clickable($this->message, $server_url); } // Parse Smilies -- cgit v1.2.1