mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-11 22:01:00 +00:00
+16
-4
@@ -7673,9 +7673,21 @@ References: User ID/Message ID, Mode
|
|||||||
return self::$prisonersCacheByID[$id];
|
return self::$prisonersCacheByID[$id];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPrisoners3($from) {
|
function getPrisoners3($from, $use_cache = true) { //change all this function arrange Dayran prisoners
|
||||||
return $this->getPrisoners($from, 1);
|
list($from) = $this->escape_input((int) $from);
|
||||||
}
|
|
||||||
|
// first of all, check if we should be using cache and whether the field
|
||||||
|
// required is already cached
|
||||||
|
if ($use_cache && ($cachedValue = self::returnCachedContent(self::$prisonersCacheByVillageAndFromIDs, $from)) && !is_null($cachedValue)) {
|
||||||
|
return $cachedValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "SELECT * FROM " . TB_PREFIX . "prisoners where " . TB_PREFIX . "prisoners.from = $from";
|
||||||
|
$result = mysqli_query($this->dblink,$q);
|
||||||
|
|
||||||
|
self::$prisonersCacheByVillageAndFromIDs[$wid.$from] = $this->mysqli_fetch_all($result);
|
||||||
|
return self::$prisonersCacheByVillageAndFromIDs[$from];
|
||||||
|
}//hasta aki
|
||||||
|
|
||||||
function deletePrisoners($id) {
|
function deletePrisoners($id) {
|
||||||
if (!is_array($id)) {
|
if (!is_array($id)) {
|
||||||
@@ -7934,4 +7946,4 @@ if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
|
|||||||
$database->sendPendingMessages();
|
$database->sendPendingMessages();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user