Полный отказ от $u->testAction() целиком.

This commit is contained in:
2024-05-15 16:42:28 +03:00
parent bc136cc030
commit 5e0dda8ed0
50 changed files with 1909 additions and 1831 deletions
+4 -2
View File
@@ -1,6 +1,7 @@
<?php
use Core\Db;
use Model\ActionModel;
if (!defined('GAME')) {
die();
@@ -55,7 +56,7 @@ $hostel_option = [
'partition' => [1 => 'Комната', 2 => 'Хранилище', 4 => 'Сон'],
],
];
$sleep = $u->testAction('`vars` = "sleep" AND `uid` = "' . $u->info['id'] . '" LIMIT 1', 1);
$sleep = ActionModel::get(["uid = {$u->info['id']}", 'vars = sleep']);
if (isset($sleep) and $sleep[0] == 0 and (isset($_GET['ajaxHostel']) and $_GET['ajaxHostel'] == 1 or isset($_GET['ajax']) and $_GET['ajax'] == 1)) {
$hostel = mysql_fetch_array(mysql_query("SELECT * FROM `house` WHERE `owner` = '" . mysql_real_escape_string($u->info['id']) . "';"));
@@ -170,7 +171,8 @@ function changeSleep($sleep_action)
$sleep_mod = 0;
ini_set('display_errors', 'Off');
}
$sleep = $u->testAction('`vars` = "sleep" AND `uid` = "' . $u->info['id'] . '" LIMIT 1', 1);
$sleep = ActionModel::get(["uid = {$u->info['id']}", 'vars = sleep']);
}
function changePets()