mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +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)){
|
||||
|
||||
//loop structure village
|
||||
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
|
||||
$strutture= mysql_fetch_array($query1);
|
||||
|
||||
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
|
||||
$strutture= mysql_fetch_array($query1);
|
||||
if($strutture == false)
|
||||
$strutture = [];
|
||||
//search Castle in array structure village
|
||||
$test = in_array(26,$strutture);
|
||||
$test = in_array(26,$strutture);
|
||||
|
||||
if ($test){
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -297,7 +299,10 @@ while($villaggi_array = mysql_fetch_array($query)){
|
||||
$strutture= mysql_fetch_array($query1);
|
||||
|
||||
//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){
|
||||
break;
|
||||
}
|
||||
@@ -466,4 +471,4 @@ function show_build_list(list) {
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user