Browse code

fix for hardcoded fields - fix for selecting other author in Add to serie

Jimmi08 authored on 2020/07/20 11:47:11
Showing 1 changed files
... ...
@@ -258,8 +258,8 @@ if($add == "stories") {
258 258
 		list($title, $owner) = dbrow($series);	
259 259
 		$output .= "<div class='sectionheader'>"._SERIES.": ".stripslashes($title)."</div>";
260 260
 		if(($admin || USERUID == $owner ) && isset($_GET['stories']) && $_GET['stories'] == "others") {
261
-			if($let == _OTHER) $letter= "author.penname REGEXP '^[^a-z]'";
262
-			else $letter = "author.penname LIKE '$let%'";
261
+			if($let == _OTHER) $letter= _PENNAMEFIELD." REGEXP '^[^a-z]'";
262
+			else $letter = _PENNAMEFIELD." LIKE '$let%'";
263 263
 			$pagelink = "series.php?action=$action&amp;add=stories&amp;stories=others&amp;seriesid=$seriesid&amp;";
264 264
 			$authorlink = "<a href=\"series.php?action=$action&amp;add=stories&amp;seriesid=$seriesid&amp;stories=";
265 265
 			$countquery = _MEMBERCOUNT." WHERE ap.stories > 0".(isset($letter) ? " AND $letter" : "");