Merge remote-tracking branch 'refs/remotes/origin/php8' into php8

This commit is contained in:
xiaomlove
2025-09-08 03:06:24 +07:00
2 changed files with 12 additions and 2 deletions

View File

@@ -2242,7 +2242,7 @@ function menu ($selected = "home") {
global $USERUPDATESET;
//no this option in config.php
$enablerequest = 'yes';
$script_name = $_SERVER["SCRIPT_FILENAME"];
$script_name = $_SERVER["SCRIPT_NAME"];
if (preg_match("/index/i", $script_name)) {
$selected = "home";
}elseif (preg_match("/forums/i", $script_name)) {
@@ -6030,7 +6030,7 @@ function calculate_seed_bonus($uid, $torrentIdArr = null): array
$officialAdditionalFactor = \App\Models\Setting::get('bonus.official_addition');
$zeroBonusTag = \App\Models\Setting::get('bonus.zero_bonus_tag');
$zeroBonusFactor = \App\Models\Setting::get('bonus.zero_bonus_factor');
$userMedalResult = \Nexus\Database\NexusDB::select("select sum(bonus_addition_factor) as factor from medals where id in (select medal_id from user_medals where uid = $uid and (expire_at is null or expire_at > '$nowStr') and (bonus_addition_expire_at is null or bonus_addition_expire_at > '$nowStr'))");
$userMedalResult = \Nexus\Database\NexusDB::select("select round(sum(bonus_addition_factor), 5) as factor from medals where id in (select medal_id from user_medals where uid = $uid and (expire_at is null or expire_at > '$nowStr') and (bonus_addition_expire_at is null or bonus_addition_expire_at > '$nowStr'))");
$medalAdditionalFactor = floatval($userMedalResult[0]['factor'] ?? 0);
do_log("$logPrefix, sql: $sql, count: " . count($torrentResult) . ", officialTag: $officialTag, officialAdditionalFactor: $officialAdditionalFactor, zeroBonusTag: $zeroBonusTag, zeroBonusFactor: $zeroBonusFactor, medalAdditionalFactor: $medalAdditionalFactor");
$last_action = "";

View File

@@ -35,6 +35,16 @@ $lang_linksmanage = array
'text_sitename_note' => "申請網站的名字,如<i>NexusPHP</i>",
'text_url_note' => "如<i>https://nexusphp.org</i>",
'text_email_note' => "請填寫申請網站的管理員的郵箱地址,便于我們聯系",
'std_missing_form_data' => "請填寫必填項目。",
'std_unable_creating_new_link' => "無法創建新的鏈接。",
'std_links_manage' => "管理鏈接",
'text_add_link' => "添加鏈接",
'text_manage_links' => "管理鏈接",
'text_modify' => "修改",
'text_edit' => "編輯",
'text_delete' => "刪除",
'text_no_links_found' => "對不起,當前沒有任何鏈接!",
'text_edit_link' => "編輯鏈接",
'js_sure_to_delete_link' => "你確定要刪除此鏈接?",
);