diff -urbB punbb-1.1.4/upload/header.php punbb-1.1.5/upload/header.php
--- punbb-1.1.4/upload/header.php	2004-04-18 10:34:36.000000000 +0200
+++ punbb-1.1.5/upload/header.php	2004-07-15 21:50:55.434862572 +0200
@@ -23,6 +23,10 @@
 ************************************************************************/
 
 
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+	exit;
+
 // Send no-cache headers
 //header('Cache-Control: no-store, no-cache, must-revalidate');
 header('Cache-Control: post-check=0, pre-check=0', false);
diff -urbB punbb-1.1.4/upload/include/common.php punbb-1.1.5/upload/include/common.php
--- punbb-1.1.4/upload/include/common.php	2004-03-21 16:29:24.000000000 +0100
+++ punbb-1.1.5/upload/include/common.php	2004-07-15 23:39:37.370677888 +0200
@@ -31,7 +31,7 @@
 //define('PUN_SHOW_QUERIES', 1);
 
 
-@include $pun_root.'config.php';
+if (is_dir($pun_root)) @include $pun_root.'config.php';
 
 // If PUN isn't defined, config.php is missing or corrupt
 if (!defined('PUN'))
diff -urbB punbb-1.1.4/upload/include/functions.php punbb-1.1.5/upload/include/functions.php
--- punbb-1.1.4/upload/include/functions.php	2004-03-21 16:29:24.000000000 +0100
+++ punbb-1.1.5/upload/include/functions.php	2004-07-15 21:52:40.864313810 +0200
@@ -607,7 +607,7 @@
 {
 	global $pun_config, $lang_common;
 
-	if (!preg_match('#^'.preg_quote($pun_config['o_base_url'].'/'.$script, '#').'#i', $_SERVER['HTTP_REFERER']))
+	if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', $_SERVER['HTTP_REFERER'])))
 		message($lang_common['Bad referer']);
 }	
 
diff -urbB punbb-1.1.4/upload/include/parser.php punbb-1.1.5/upload/include/parser.php
--- punbb-1.1.4/upload/include/parser.php	2004-03-21 16:29:24.000000000 +0100
+++ punbb-1.1.5/upload/include/parser.php	2004-07-15 23:04:54.560916991 +0200
@@ -173,12 +173,12 @@
 {
 	global $cur_user;
 
-	$full_url = $url;
+	$full_url = str_replace(' ', '%20', $url);
 	if (strpos($url, 'www.') === 0)
 		$full_url = 'http://'.$full_url;
 	else if (strpos($url, 'ftp.') === 0)
 		$full_url = 'ftp://'.$full_url;
-	else if (strpos($url, 'http://') !== 0)
+	else if (!preg_match('#^([a-z]{3,5})://#', $url))
 		$full_url = 'http://'.$full_url;
 
 	// Ok, not very pretty :-)
diff -urbB punbb-1.1.4/upload/install.php punbb-1.1.5/upload/install.php
--- punbb-1.1.4/upload/install.php	2004-04-26 10:49:00.000000000 +0200
+++ punbb-1.1.5/upload/install.php	2004-04-30 01:29:10.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 // The PunBB version this script installs
-$punbb_version = '1.1.4';
+$punbb_version = '1.1.5';
 
 
 $pun_root = './';
diff -urbB punbb-1.1.4/upload/search.php punbb-1.1.5/upload/search.php
--- punbb-1.1.4/upload/search.php	2004-03-21 16:29:24.000000000 +0100
+++ punbb-1.1.5/upload/search.php	2004-06-03 02:19:33.000000000 +0200
@@ -694,7 +694,7 @@
 
 $extra_sql = ($cur_user['status'] < PUN_MOD) ? ' WHERE f.admmod_only=\'0\'' : '';
 
-$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra.' ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());
+$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra_sql.' ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());
 $num_forums = $db->num_rows($result);
 
 while ($num_forums--)
