1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

fixed some small bugs... added the updater (this one needs some testing, i have moved some things around)

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3674 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-03-18 23:24:02 +00:00
parent 42ec97aab7
commit 374560da38
7 changed files with 964 additions and 9 deletions

View File

@@ -198,19 +198,19 @@ function bbencode_second_pass($text, $uid)
$replacements[] = $bbcode_tpl['img'];
// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://*[^\"\n\r\t<]*)\[/url\]#is";
$patterns[] = "#\[url\]([\w]+?://*[^ \"\n\r\t<]*)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^\"\n\r\t<]*)?)\[/url\]#is";
$patterns[] = "#\[url\]((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\n\r\t<]*)?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://*[^\"\n\r\t<]*)\](.*?)\[/url\]#is";
$patterns[] = "#\[url=([\w]+?://*[^ \"\n\r\t<]*)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^\"\n\r\t<]*)?)\](.*?)\[/url\]#is";
$patterns[] = "#\[url=((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\n\r\t<]*)?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
// [email]user@domain.tld[/email] code..
@@ -621,13 +621,13 @@ function make_clickable($text)
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://*[^\"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
$ret = preg_replace("#(^|[\n ])([\w]+?://*[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^\"\t\n\r<]*)?)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\t\n\r<]*)?)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".

View File

@@ -389,7 +389,6 @@ $template->assign_vars(array(
'U_FAQ' => append_sid('faq.'.$phpEx),
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
'U_MEMBERSLIST' => append_sid('memberlist.'.$phpEx),
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],

View File

@@ -56,6 +56,7 @@ function prune($forum_id, $prune_date, $prune_all = false)
{
$sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
$db->sql_freeresult($result);
if( $sql_topics != '' )
{
@@ -73,6 +74,7 @@ function prune($forum_id, $prune_date, $prune_all = false)
{
$sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
}
$db->sql_freeresult($result);
if ( $sql_post != '' )
{