| ... | ... |
@@ -248,10 +248,10 @@ function format_link($text, $title = "", $target = 0) {
|
| 248 | 248 |
function title_link($stories) {
|
| 249 | 249 |
global $ratingslist, $ageconsent, $disablepopups; |
| 250 | 250 |
|
| 251 |
- $rating = $stories['rid']; |
|
| 251 |
+ $rating = isset($stories['rid']) ? $stories['rid'] : null; |
|
| 252 | 252 |
$warningtext = !empty($ratingslist[$rating]['warningtext']) ? addslashes(strip_tags($ratingslist[$rating]['warningtext'])) : ""; |
| 253 | 253 |
if(empty($ratingslist[$rating]['ratingwarning'])) |
| 254 |
- $title = "<a href=\""._BASEDIR."viewstory.php?sid=".$stories['sid']."\">".$stories['title']."</a>"; |
|
| 254 |
+ $title = "<a href=\""._BASEDIR."viewstory.php?sid=".(isset($stories['sid']) ? $stories['sid'] : null)."\">".(isset($stories['title']) ? $stories['title'] : null)."</a>"; |
|
| 255 | 255 |
else {
|
| 256 | 256 |
$warning = ""; |
| 257 | 257 |
$warninglevel = sprintf("%03b", $ratingslist[$rating]['ratingwarning']);
|
| ... | ... |
@@ -77,7 +77,7 @@ if(!defined("_CHARSET")) exit( );
|
| 77 | 77 |
if($type == "ST") {
|
| 78 | 78 |
$storyquery = dbquery("SELECT s.title, s.uid, r.rid, r.rating, r.ratingwarning, r.warningtext, s.sid FROM ".TABLEPREFIX."fanfiction_stories as s, ".TABLEPREFIX."fanfiction_ratings as r WHERE s.sid = '".$reviews['item']."' AND s.rid = r.rating LIMIT 1");
|
| 79 | 79 |
$story = dbassoc($storyquery); |
| 80 |
- $authoruid = $story['uid']; |
|
| 80 |
+ $authoruid = isset($story['uid']) ? $story['uid'] : null; |
|
| 81 | 81 |
$title = title_link($story); |
| 82 | 82 |
} |
| 83 | 83 |
else if($type == "SE") {
|
| ... | ... |
@@ -107,7 +107,7 @@ if(!defined("_CHARSET")) exit( );
|
| 107 | 107 |
$revlist->newBlock("reviewsblock");
|
| 108 | 108 |
$revlist->assign("reviewer" , $reviewer );
|
| 109 | 109 |
$revlist->assign("review" , $reviews['review']);
|
| 110 |
- $revlist->assign("chapter", (isset($chaptitle) ? _CHAPTER." $chapnum: $chaptitle" : ($story['title'] ? $story['title'] : _NONE)) );
|
|
| 110 |
+ $revlist->assign("chapter", (isset($chaptitle) ? _CHAPTER." $chapnum: $chaptitle" : (isset($story['title']) ? $story['title'] : _NONE)) );
|
|
| 111 | 111 |
$revlist->assign("reviewdate", date("$dateformat", $reviews['date']) );
|
| 112 | 112 |
$revlist->assign("rating", ratingpics($reviews['rating']) );
|
| 113 | 113 |
$revlist->assign("member", $member );
|
| ... | ... |
@@ -123,4 +123,4 @@ if(!defined("_CHARSET")) exit( );
|
| 123 | 123 |
} |
| 124 | 124 |
else accessDenied( ); |
| 125 | 125 |
} |
| 126 |
-?> |
|
| 127 | 126 |
\ No newline at end of file |
| 127 |
+?> |