punbb/admin_options.php
changeset 3 c0c445d4a13e
parent 2 a8a21e1c7afa
--- a/punbb/admin_options.php	Thu Jul 12 01:04:01 2007 -0400
+++ b/punbb/admin_options.php	Thu Jul 12 15:00:35 2007 -0400
@@ -41,8 +41,9 @@
 if (isset($_POST['form_sent']))
 {
 	// Custom referrer check (so we can output a custom error message)
-	if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
-		message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.');
+	// if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
+	// 	message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.');
+  confirm_referrer('admin_options.php');
 
 	$form = array_map('trim', $_POST['form']);
 
@@ -155,7 +156,7 @@
 	<div class="blockform">
 		<h2><span>Options</span></h2>
 		<div class="box">
-			<form method="post" action="admin_options.php?action=foo">
+			<form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_Options', 'action=foo', true); ?>">
 				<p class="submittop"><input type="submit" name="save" value="Save changes" /></p>
 				<div class="inform">
 				<input type="hidden" name="form_sent" value="1" />