mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
@@ -678,7 +678,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
$arrayVariable[$arrayStructure] = [];
|
||||
}
|
||||
|
||||
if (isset($arrayVariable[$arrayStructure]) && count($arrayVariable[$arrayStructure])) {
|
||||
if (isset($arrayVariable[$arrayStructure]) && !empty($arrayVariable[$arrayStructure])) {
|
||||
return $arrayVariable[$arrayStructure];
|
||||
} else {
|
||||
return null;
|
||||
@@ -5461,7 +5461,7 @@ References: User ID/Message ID, Mode
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.`" . $where . "` IN(".implode(', ', $village).") and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 or " . TB_PREFIX . "movement.`" . $where . "` IN(".implode(', ', $village).") and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 4 ORDER BY endtime ASC";
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
|
||||
$result = $this->mysqli_fetch_all(mysqli_query($this->dblink,$q));
|
||||
|
||||
@@ -43,8 +43,10 @@ class multiSort {
|
||||
$t = 'strnatcmp($a[' . $key . '], $b[' . $key . '])';
|
||||
break;
|
||||
}
|
||||
usort($array, create_function('$a, $b', 'return ' . ($order ? '' : '-') . '(' . $t . ');'));
|
||||
|
||||
usort($array, function($a, $b) use ($order, $t) {
|
||||
return ($order ? '' : '-') . ($t);
|
||||
});
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
@@ -271,6 +271,8 @@
|
||||
ORDER BY totalpop DESC, totalvillages DESC, userid DESC";
|
||||
}
|
||||
|
||||
$datas = array();
|
||||
|
||||
$result = (mysqli_query($GLOBALS['link'],$q));
|
||||
while($row = mysqli_fetch_assoc($result)) {
|
||||
$datas[] = $row;
|
||||
|
||||
Reference in New Issue
Block a user