mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-05 12:24:20 +00:00
Some replacements
+Replaced all $GLOBALS['link'] with $database->dblink -Removed Templates/links.tpl from build.php (it's already in Templates/menu.tpl)
This commit is contained in:
@@ -473,7 +473,7 @@ class Units {
|
||||
// If is a WW village you can target on WW , if is not a WW village catapults will target randomly.
|
||||
// Like it says : Exceptions are the WW which can always be targeted and the treasure chamber which can always be targeted, except with the unique artifact.
|
||||
// Fixed by Advocaite and Shadow
|
||||
$q = mysqli_fetch_array( mysqli_query( $GLOBALS['link'], "SELECT Count(*) as Total FROM " . TB_PREFIX . "fdata WHERE f99t = '40' AND vref = " . (int) $data['to_vid'] ), MYSQLI_ASSOC );
|
||||
$q = mysqli_fetch_array( mysqli_query( $database->dblink, "SELECT Count(*) as Total FROM " . TB_PREFIX . "fdata WHERE f99t = '40' AND vref = " . (int) $data['to_vid'] ), MYSQLI_ASSOC );
|
||||
$isThere = $q['Total'];
|
||||
if ( $isThere > 0 ) {
|
||||
$iswwvilla = 1;
|
||||
@@ -575,7 +575,7 @@ class Units {
|
||||
if ( $checkexist or $checkoexist ) {
|
||||
$database->addMovement( 3, $village->wid, $data['to_vid'], $reference, time(), ( $time + time() ) );
|
||||
if ( ( $database->hasBeginnerProtection( $village->wid ) == 1 ) && ( $checkexist ) ) {
|
||||
mysqli_query( $GLOBALS['link'], "UPDATE " . TB_PREFIX . "users SET protect = 0 WHERE id = " . (int) $session->uid );
|
||||
mysqli_query( $database->dblink, "UPDATE " . TB_PREFIX . "users SET protect = 0 WHERE id = " . (int) $session->uid );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user