api return queries when debug

This commit is contained in:
xiaomlove
2025-09-29 00:55:07 +07:00
parent 3f04ae4163
commit 598457db48
5 changed files with 8 additions and 5 deletions

View File

@@ -585,6 +585,9 @@ function api(...$args)
$results['recordsTotal'] = $count;
$results['recordsFiltered'] = $count;
}
if (!IN_NEXUS && config('app.debug')) {
$results['queries'] = last_query(true);
}
do_log("api end");
return $results;
}

View File

@@ -821,7 +821,7 @@ $lang_settings = array
'row_complain_enabled_note' => '默认: "yes"',
'row_min_size' => '起步体积',
'text_bonus_mini_size' => '要求种子的体积最小为',
'text_bonus_mini_size_help' => '。小于此体积的种子不参与魔力计算。单位:字节(Byte),如 1 Byte = 1024 KiB。',
'text_bonus_mini_size_help' => '。小于此体积的种子不参与魔力计算。单位:字节(Byte),如 1 KiB = 1024 Byte。',
'row_reward_bonus_options' => '魔力值奖励选项',
'text_reward_bonus_options_note' => '种子详情页的魔力值奖励选项,多个用英文逗号分割',
'row_reward_times_limit' => '魔力奖励次数限制',

View File

@@ -821,7 +821,7 @@ $lang_settings = array
'row_complain_enabled_note' => '默認: "yes"',
'row_min_size' => '起步體積',
'text_bonus_mini_size' => '要求種子的體積最小爲',
'text_bonus_mini_size_help' => '。小於此體積的種子不參與魔力計算。單位:字節(Byte),如 1 Byte = 1024 KiB。',
'text_bonus_mini_size_help' => '。小於此體積的種子不參與魔力計算。單位:字節(Byte),如 1 KiB = 1024 Byte。',
'row_reward_bonus_options' => '魔力值獎勵選項',
'text_reward_bonus_options_note' => '種子詳情頁的魔力值獎勵選項,多個用英文逗號分割',
'row_reward_times_limit' => '魔力獎勵次數限制',

View File

@@ -821,7 +821,7 @@ $lang_settings = array
'row_complain_enabled_note' => 'default: "yes"',
'row_min_size' => 'Minimum volume',
'text_bonus_mini_size'=> 'The minimum volume required for torrent is',
'text_bonus_mini_size_help' => '. Torrent size smaller than this volume are not included in the bonus calculation. Unit: bytes (Byte), e.g., 1 Byte = 1024 KiB.',
'text_bonus_mini_size_help' => '. Torrent size smaller than this volume are not included in the bonus calculation. Unit: bytes (Byte), e.g., 1 KiB = 1024 Byte.',
'row_reward_bonus_options' => 'Reward Bonus Options',
'text_reward_bonus_options_note' => 'Reward bonus options on the torrent details page, multiple options separated by commas',
'row_reward_times_limit' => 'Reward Frequency Limit',

View File

@@ -992,10 +992,10 @@ tr_small($lang_usercp['row_email_address'], $CURUSER['email'], 1);
$seedBoxIcon = (new \App\Repositories\SeedBoxRepository())->renderIcon($CURUSER['ip'], $CURUSER['id']);
if ($enablelocation_tweak == 'yes'){
list($loc_pub, $loc_mod) = get_ip_location($CURUSER["ip"]);
tr_small($lang_usercp['row_ip_location'], hide_text($CURUSER["ip"])." <span title='" . $loc_mod . "'>[" . $loc_pub . "]</span>$seedBoxIcon", 1);
tr_small($lang_usercp['row_ip_location'], hide_text($CURUSER["ip"]." <span title='" . $loc_mod . "'>[" . $loc_pub . "]</span>$seedBoxIcon"), 1);
}
else{
tr_small($lang_usercp['row_ip_location'], hide_text($CURUSER["ip"]) . $seedBoxIcon, 1);
tr_small($lang_usercp['row_ip_location'], hide_text($CURUSER["ip"] . $seedBoxIcon), 1);
}
if ($CURUSER["avatar"])
tr_small($lang_usercp['row_avatar'], "<img src=\"" . $CURUSER["avatar"] . "\" border=0>", 1);