From 9725ab2dfa8db776fcb4c5cf2c6ff6cea799200e Mon Sep 17 00:00:00 2001
From: Git <git@what.cd>
Date: Tue, 13 Sep 2011 08:00:15 +0000
Subject: [PATCH] Empty commit

---
 classes/script_start.php       |  6 +++++-
 sections/donate/donate.php     |  1 +
 sections/friends/friends.php   |  2 +-
 sections/requests/requests.php | 14 +++++++-------
 sections/wiki/revisions.php    |  3 ++-
 static/functions/bbcode.js     | 22 +++++++++++-----------
 6 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/classes/script_start.php b/classes/script_start.php
index 9ae9ceef..83cd3e0e 100644
--- a/classes/script_start.php
+++ b/classes/script_start.php
@@ -431,7 +431,11 @@ function site_ban_ip($IP) {
 		$TorIPs = $Cache->get_value('tor_ips');
 		if (!is_array($TorIPs)) {
 			$TorIPs = file('https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=' . SITE_IP, FILE_IGNORE_NEW_LINES);
-			$Cache->cache_value('tor_ips', $TorIPs, 3600 * 4);
+			if($TorIPs === false) {
+				$Cache->cache_value('tor_ips', array(), 1800);
+			} else {
+				$Cache->cache_value('tor_ips', $TorIPs, 3600 * 4);
+			}
 		}
 		if (in_array($IP, $TorIPs)) {
 			return true;
diff --git a/sections/donate/donate.php b/sections/donate/donate.php
index a36e7abe..f83cb378 100644
--- a/sections/donate/donate.php
+++ b/sections/donate/donate.php
@@ -89,6 +89,7 @@
 
 <? } ?>
 		</ul>
+		<p>Please be aware that by making a donation you aren't purchasing donor status or invites. You are helping us pay the bills and cover the costs of running the site. We are doing our best to give the benefits to donors but sometimes it might take more than 48 hours. If it has been more than 48 hours and you were not credited, let us know by sending us a <a href="http://what.cd/staffpm.php">Staff PM</a>. We will answer as quickly as possible.</p>
 	</div>
 	<h3>What you will <strong>not</strong> receive</h3>
 	<div class="box pad" style="padding:10px 10px 10px 20px;">
diff --git a/sections/friends/friends.php b/sections/friends/friends.php
index 88f3e8d1..27b55430 100644
--- a/sections/friends/friends.php
+++ b/sections/friends/friends.php
@@ -69,7 +69,7 @@
 ?>
 <form action="friends.php" method="post">
 	<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
-	<table class="forum_post vertical_margin">
+	<table class="friends_table vertical_margin">
 		<tr>
 			<td class="colhead" colspan="3">
 				<span style="float:left;"><?=format_username($FriendID, $Username, $Donor, $Warned, $Enabled == 2 ? false : true, $Class)?>
diff --git a/sections/requests/requests.php b/sections/requests/requests.php
index e219f904..e0d245c4 100644
--- a/sections/requests/requests.php
+++ b/sections/requests/requests.php
@@ -448,16 +448,16 @@
 	<table id="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
 		<tr class="colhead_dark">
 			<td style="width: 38%;">
-				<strong>Request Name</strong> / <a href="requests.php?order=year&amp;sort=<?=(($CurrentOrder == 'year') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Year</strong></a>
+				<strong>Request Name</strong> / <a href="?order=year&amp;sort=<?=(($CurrentOrder == 'year') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Year</strong></a>
 			</td>
 			<td>
-				<a href="requests.php?order=votes&amp;sort=<?=(($CurrentOrder == 'votes') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Votes</strong></a>
+				<a href="?order=votes&amp;sort=<?=(($CurrentOrder == 'votes') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Votes</strong></a>
 			</td>
 			<td>
-				<a href="requests.php?order=bounty&amp;sort=<?=(($CurrentOrder == 'bounty') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Bounty</strong></a>
+				<a href="?order=bounty&amp;sort=<?=(($CurrentOrder == 'bounty') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Bounty</strong></a>
 			</td>
 			<td>
-				<a href="requests.php?order=filled&amp;sort=<?=(($CurrentOrder == 'filled') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Filled</strong></a>
+				<a href="?order=filled&amp;sort=<?=(($CurrentOrder == 'filled') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Filled</strong></a>
 			</td>
 			<td>
 				<strong>Filled by</strong>
@@ -466,10 +466,10 @@
 				<strong>Requested by</strong>
 			</td>
 			<td>
-				<a href="requests.php?order=created&amp;sort=<?=(($CurrentOrder == 'created') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Created</strong></a>
+				<a href="?order=created&amp;sort=<?=(($CurrentOrder == 'created') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Created</strong></a>
 			</td>
 			<td>
-				<a href="requests.php?order=lastvote&amp;sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Last Vote</strong></a>
+				<a href="?order=lastvote&amp;sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>"><strong>Last Vote</strong></a>
 			</td>
 		</tr>
 <?	if($NumResults == 0) { ?>
@@ -523,7 +523,7 @@
 <?			
 			$TagList = array();
 			foreach($Tags as $TagID => $TagName) {
-				$TagList[] = "<a href='requests.php?tags=".$TagName."'>".display_str($TagName)."</a>";
+				$TagList[] = "<a href='?tags=".$TagName.($BookmarkView ? "&amp;type=requests" : "")."'>".display_str($TagName)."</a>";
 			}
 			$TagList = implode(', ', $TagList);
 ?>
diff --git a/sections/wiki/revisions.php b/sections/wiki/revisions.php
index 5f2f09ef..148ad775 100644
--- a/sections/wiki/revisions.php
+++ b/sections/wiki/revisions.php
@@ -4,7 +4,8 @@
 
 $Latest = $Alias->article($ArticleID);
 list($Revision, $Title, $Body, $Read, $Edit, $Date, $AuthorID, $AuthorName) = array_shift($Latest);
-if($Edit > $LoggedUser['Class']){ error(404); }
+if($Read > $LoggedUser['Class']){ error(404); }
+if($Edit > $LoggedUser['Class']){ error(403); }
 
 show_header("Revisions of ".$Title);
 ?>
diff --git a/static/functions/bbcode.js b/static/functions/bbcode.js
index 6f2a527e..bf9e9850 100644
--- a/static/functions/bbcode.js
+++ b/static/functions/bbcode.js
@@ -1,11 +1,11 @@
-var BBCode = {
-	spoiler: function(link) {
-		if($(link.nextSibling).has_class('hidden')) {
-			$(link.nextSibling).show();
-			$(link).html('Hide');
-		} else {
-			$(link.nextSibling).hide();
-			$(link).html('Show');
-		}
-	}
-};
+var BBCode = {
+	spoiler: function(link) {
+		if($(link.nextSibling).has_class('hidden')) {
+			$(link.nextSibling).show();
+			$(link).html('Hide');
+		} else {
+			$(link.nextSibling).hide();
+			$(link).html('Show');
+		}
+	}
+};