mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-25 04:27:15 +00:00
fix: cannot send traders to village determined by a village name
This commit is contained in:
@@ -3471,7 +3471,10 @@ class Automation {
|
|||||||
//add unit.
|
//add unit.
|
||||||
$j='1';
|
$j='1';
|
||||||
for($i=$start;$i<=$end;$i++){
|
for($i=$start;$i<=$end;$i++){
|
||||||
$t_units.="u".$i."=u".$i." + ".$data['t'.$j].(($j > 9) ? '' : ', ');$j++;
|
if (!isset($t_units)) {
|
||||||
|
$t_units = '';
|
||||||
|
}
|
||||||
|
$t_units .= "u".$i."=u".$i." + ".$data['t'.$j].(($j > 9) ? '' : ', ');$j++;
|
||||||
}
|
}
|
||||||
$q = "UPDATE ".TB_PREFIX."enforcement set $t_units where id =".(int) $check['id'];
|
$q = "UPDATE ".TB_PREFIX."enforcement set $t_units where id =".(int) $check['id'];
|
||||||
$database->query($q);
|
$database->query($q);
|
||||||
|
|||||||
@@ -4762,7 +4762,7 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
function getVillageByName($name) {
|
function getVillageByName($name) {
|
||||||
list($name) = $this->escape_input($name);
|
list($name) = $this->escape_input($name);
|
||||||
|
|
||||||
$q = "SELECT wref FROM " . TB_PREFIX . "vdata where name = '$name' limit 1 LIMIT 1";
|
$q = "SELECT wref FROM " . TB_PREFIX . "vdata WHERE `name` = '$name' LIMIT 1";
|
||||||
$result = mysqli_query($this->dblink,$q);
|
$result = mysqli_query($this->dblink,$q);
|
||||||
$dbarray = mysqli_fetch_array($result);
|
$dbarray = mysqli_fetch_array($result);
|
||||||
return $dbarray['wref'];
|
return $dbarray['wref'];
|
||||||
|
|||||||
Reference in New Issue
Block a user