Fixed a bug in the WW renaming

You can no longer rename other WW or your village WW if you don't have one.
This commit is contained in:
Pietro
2018-04-03 16:11:06 +02:00
committed by GitHub
parent 757b41143d
commit da0828e83e
+7 -2
View File
@@ -10,7 +10,12 @@
#################################################################################
include("../Village.php");
$database->submitWWname($_POST['vref'],$_POST['wwname']);
header("Location: ../../build.php?id=99&n");
if(isset($_POST['wwname']) && !empty($_POST['wwname']) && $village->natar){
$database->submitWWname($village->wid,$_POST['wwname']);
header("Location: ../../build.php?id=99&n");
}else{
header("Location: ../../dorf2.php");
}
?>