This patch file updates files since 02/27/06.  Just replace the files with the ones in this .zip.  Do NOT run install.php or upgrade.php again.

03/31/06 - Manual instructions

- In search.php replace lines 121 and 183.  This fixes problems with searches with ' in them.
- Replace line 30 of admin/blocks.php  This should solve the problems people have been having with saving blocks.
- Replace lines 81 and 82 in viewuser.php This solves the sort problem reported by SteveD3.  Thanks!
- Add line 38 to viewstory.php at the beginning of the CleanupSmartQuotes function.  Trying to sort out when and when not to run the cleanup to get rid of funky characters without adding new funky characters. :)
- In admin/members.php change $mailtext to nl2br($mailtext) on line 240.  Should solve new line problems in e-mails.
- Also in viewstory.php from lines 122 to 132 change all occurances of $storyinfo to $story.  Solves missing genre and warning problems in printable function.
- In stories.php delete lines 648 to 658.  This section:
		if($_FILES['storyfile']['name']) {
			if ($_FILES['storyfile']['type'] != 'text/html' && $_FILES['storyfile']['type'] != 'text/plain')
 				$output .= "<strong>"._INVALIDUPLOAD."</strong><br><br>";
			else {
				$texts = file($_FILES['storyfile']['tmp_name']);
				foreach ($texts as $text) {
					if($_FILES['storyfile']['type'] == 'text/html') $story .= stripinput(strip_tags(rtrim($text, "\n\r\t")." ", $allowed_tags));
					else $storytext .= stripinput(strip_tags($text, $allowed_tags));
				}
			}
		}
- Then in stories.php find in the editstory function this line:
			foreach($delcats as $cat) { categoryitems($cat, -1); }
After it add: 
			if($admin) {
				$authquery = mysql_query("SELECT uid FROM ".$tableprefix."fanfiction_stories WHERE sid = '".$sid."'");
				list($olduid) = mysql_fetch_row($authquery);
				if($olduid != $uid) {
					if($store == "files") {
						$chapters = mysql_query("SELECT chapid FROM ".$tableprefix."fanfiction_chapters WHERE sid = '$sid' AND uid = '$olduid'");
						while($chap = mysql_fetch_assoc($chapters)) {
							$chapid = $chap['chapid'];
							$storytext = "";
							if($out = fopen ("$storiespath/$olduid/$chapid.txt", "r"))
							while (!feof($out)) {
								$storytext .= fgets($out, 10000);
							}
							fclose($out);
							unlink("$storiespath/$olduid/$chapid.txt"); 
							if($storytext) {
								if( !file_exists( "$storiespath/$uid/" ) ) {
									mkdir("$storiespath/$uid", 0755);
									chmod("$storiespath/$uid", 0777);
								}
								$handle = fopen("$storiespath/$uid/$chapid.txt", 'w');
								if ($handle) {
									fwrite($handle, $storytext);
									fclose($handle);
								}
								chmod("$storiespath/$uid/$chapid.txt", 0644);
							}
							mysql_query("UPDATE ".$tableprefix."fanfiction_chapters SET uid = '$uid' WHERE chapid = '$chapid' LIMIT 1");
						}
					}
					else $chapupdate = mysql_query("UPDATE ".$tableprefix."fanfiction_chapters SET uid = '$uid' WHERE sid = '$sid' AND uid = '$olduid'");
					$switch = mysql_query("UPDATE ".$tableprefix."fanfiction_stories SET uid = '$uid' WHERE sid = '$sid' LIMIT 1");
				}
			}
- In categories.php replace from with section from this archive from line 289:
	if(!$numstories && !$numseries && $searchstring) $tpl->assign("pagelinks", "<div style='text-align: center;'>"._NORESULTS."</div>");
to line 325:
	$tpl->printToScreen();
- In admin/news.php on lines 85 and 88 change itemsperpage to $itemsperpage (missing $)
- In admin/stories.php on line 52 change "ORDER BY story.title" to "ORDER BY story.title ASC, chapter.inorder ASC"