mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
fix: immediate finish of all building progress redirects correctly
This commit is contained in:
@@ -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,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");
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
Reference in New Issue
Block a user