fix: immediate finish of all building progress redirects correctly

This commit is contained in:
Martin Ambrus
2017-10-22 13:21:36 +02:00
parent e9e55af338
commit dd90648b09
4 changed files with 6 additions and 7 deletions
+3 -3
View File
@@ -765,7 +765,7 @@ class Building {
return false;
}
public function finishAll() {
public function finishAll($redirect_url = '') {
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
if($session->access!=BANNED){
$finish = 0;
@@ -832,13 +832,13 @@ class Building {
}
}
}
header("Location: ".$session->referrer);
header("Location: ".($redirect_url ? $redirect_url : $session->referrer));
exit;
}else{
header("Location: banned.php");
exit;
}
}
}
public function resourceRequired($id,$tid,$plus=1) {
$name = "bid".$tid;
+1 -2
View File
@@ -1,7 +1,6 @@
<?php
if($session->access!=BANNED){
$building->finishAll();
header("Location: plus.php?id=3");
$building->finishAll('plus.php?id=3');
exit;
}else{
header("Location: banned.php");
+1 -2
View File
@@ -369,8 +369,7 @@ if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['rout
}
if($_GET['buildingFinish'] == 1) {
if($session->gold >= 2) {
$building->finishAll();
header("Location: build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
$building->finishAll("build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
exit;
}
}
+1
View File
@@ -1,4 +1,5 @@
- allow sending Mass Message + System Message from Admin
- send mass message as Support rather than Multihunter
- fix editing current task from Taskmaster -> number never match the edited quest after save
- cannot delete a single medal in admin
- add back buttons to Admin where there are not (like editing a user)