mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 14:21:03 +00:00
Fix in_array bug in show more buldings in WWV
This commit is contained in:
@@ -171,14 +171,16 @@ $query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."")
|
|||||||
while($villaggi_array = mysql_fetch_array($query)){
|
while($villaggi_array = mysql_fetch_array($query)){
|
||||||
|
|
||||||
//loop structure village
|
//loop structure village
|
||||||
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
|
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
|
||||||
$strutture= mysql_fetch_array($query1);
|
$strutture= mysql_fetch_array($query1);
|
||||||
|
if($strutture == false)
|
||||||
|
$strutture = [];
|
||||||
//search Castle in array structure village
|
//search Castle in array structure village
|
||||||
$test = in_array(26,$strutture);
|
$test = in_array(26,$strutture);
|
||||||
|
|
||||||
if ($test){
|
if ($test){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +299,10 @@ while($villaggi_array = mysql_fetch_array($query)){
|
|||||||
$strutture= mysql_fetch_array($query1);
|
$strutture= mysql_fetch_array($query1);
|
||||||
|
|
||||||
//search Castle in array structure village
|
//search Castle in array structure village
|
||||||
$test = in_array(26,$strutture);
|
if($strutture !== false)
|
||||||
|
$test = in_array(26,$strutture);
|
||||||
|
else
|
||||||
|
$test = in_array(26,[]);
|
||||||
if ($test){
|
if ($test){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -466,4 +471,4 @@ function show_build_list(list) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user