From a9c8fc6b484bc67e6a25a51684705d343043ade5 Mon Sep 17 00:00:00 2001 From: Pietro Date: Tue, 3 Apr 2018 14:40:23 +0200 Subject: [PATCH] Fixed a building bug You can no longer access to inexistent building ids --- build.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.php b/build.php index 101b1a72..cb8f7126 100644 --- a/build.php +++ b/build.php @@ -22,8 +22,8 @@ if ( isset( $_GET['newdid'] ) ) { header( "Location: " . $_SERVER['PHP_SELF'] . ( isset( $_GET['id'] ) ? '?id=' . $_GET['id'] : ( isset( $_GET['gid'] ) ? '?gid=' . $_GET['gid'] : '' ) ) ); exit; } -if ( isset( $_GET['id'] ) && $_GET['id'] == 99 && $village->natar == 0 ) { - header( "Location: dorf2.php" ); +if (isset($_GET['id']) && ($_GET['id'] < 1 || $_GET['id'] > 40 && ($_GET['id'] == 99 && $village->natar == 0 || $_GET['id'] != 99))) { + header("Location: dorf2.php"); exit; }