Browse code

news.php: remove NID 0 check as it breaks pagination (shows not found) - and it seems it is not needed after all

Clarissa Walker authored on 2026/11/06 14:26:11
Showing 1 changed files
... ...
@@ -34,20 +34,6 @@ if(isset($_REQUEST['nid'])) $nid = $_REQUEST['nid'];
34 34
 if(!isset($nid) || !isNumber($nid)) $nid = false;
35 35
 $cid = isset($_REQUEST['cid']) && isNumber($_REQUEST['cid']) ? $_REQUEST['cid'] : false;
36 36
 
37
-if ($nid < 1) {
38
-	$current = "newserror";
39
-	// load our template files to set up the page.
40
-	if (file_exists("$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl");
41
-	else $tpl = new TemplatePower("default_tpls/default.tpl");
42
-	$title = "News entry was not found";
43
-	$text  = "News entry with ID " . $nid . " is not in database";
44
-	include("includes/pagesetup.php");
45
-	$tpl->assign("output", "<div id='pagetitle'>" . $title . "</div>" . write_error($text));
46
-	$tpl->printToScreen();
47
-	dbclose();
48
-	exit();
49
-}
50
-
51 37
 if($nid) {
52 38
 
53 39
 	$output .= "<div id=\"pagetitle\">"._NEWS."</div>";