mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-31 07:37:13 +00:00
fix: immediate finish of all building progress redirects correctly
This commit is contained in:
@@ -765,7 +765,7 @@ class Building {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function finishAll() {
|
public function finishAll($redirect_url = '') {
|
||||||
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
|
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
|
||||||
if($session->access!=BANNED){
|
if($session->access!=BANNED){
|
||||||
$finish = 0;
|
$finish = 0;
|
||||||
@@ -832,13 +832,13 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("Location: ".$session->referrer);
|
header("Location: ".($redirect_url ? $redirect_url : $session->referrer));
|
||||||
exit;
|
exit;
|
||||||
}else{
|
}else{
|
||||||
header("Location: banned.php");
|
header("Location: banned.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resourceRequired($id,$tid,$plus=1) {
|
public function resourceRequired($id,$tid,$plus=1) {
|
||||||
$name = "bid".$tid;
|
$name = "bid".$tid;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if($session->access!=BANNED){
|
if($session->access!=BANNED){
|
||||||
$building->finishAll();
|
$building->finishAll('plus.php?id=3');
|
||||||
header("Location: plus.php?id=3");
|
|
||||||
exit;
|
exit;
|
||||||
}else{
|
}else{
|
||||||
header("Location: banned.php");
|
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($_GET['buildingFinish'] == 1) {
|
||||||
if($session->gold >= 2) {
|
if($session->gold >= 2) {
|
||||||
$building->finishAll();
|
$building->finishAll("build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
|
||||||
header("Location: build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
- allow sending Mass Message + System Message from Admin
|
- 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
|
- fix editing current task from Taskmaster -> number never match the edited quest after save
|
||||||
- cannot delete a single medal in admin
|
- cannot delete a single medal in admin
|
||||||
- add back buttons to Admin where there are not (like editing a user)
|
- add back buttons to Admin where there are not (like editing a user)
|
||||||
|
|||||||
Reference in New Issue
Block a user