merge 1.9

This commit is contained in:
xiaomlove
2025-12-29 00:02:46 +07:00
11 changed files with 123 additions and 32 deletions

View File

@@ -29,7 +29,6 @@ $row = mysql_fetch_array($res);
if (user_can('torrentmanage') || $CURUSER["id"] == $row["owner"])
$owned = 1;
else $owned = 0;
$settingMain = get_setting('main');
if (!$row) {
stderr($lang_details['std_error'], $lang_details['std_no_torrent_id']);
@@ -308,20 +307,20 @@ JS;
//technical info
if ($settingMain['enable_technical_info'] == 'yes') {
$technicalData = $row['technical_info'] ?? '';
$technicalData = nexus_escape($row['technical_info'] ?? '');
// 判断是否为BDINFO格式
$isBdInfo = false;
if (!empty($technicalData)) {
$firstLine = strtok($technicalData, "\n");
if (strpos($firstLine, 'DISC INFO') !== false
if (strpos($firstLine, 'DISC INFO') !== false
|| strpos($firstLine, 'Disc Title') !== false
|| strpos($firstLine, 'Disc Label') !== false
) {
$isBdInfo = true;
}
}
if ($isBdInfo) {
// 使用BdInfoExtra处理BDINFO格式
$technicalInfo = new \Nexus\Torrent\BdInfoExtra($technicalData);
@@ -329,7 +328,7 @@ JS;
// 使用TechnicalInformation处理MediaInfo格式
$technicalInfo = new \Nexus\Torrent\TechnicalInformation($technicalData);
}
$technicalInfoResult = $technicalInfo->renderOnDetailsPage();
if (!empty($technicalInfoResult)) {
tr($lang_functions['text_technical_info'], $technicalInfoResult, 1);

View File

@@ -12,6 +12,7 @@ if(!empty($_POST['conusr'])) {
// sql_query("UPDATE users SET status = 'confirmed', editsecret = '' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
$userList = \App\Models\User::query()->whereIn('id', $_POST['conusr'])
->where('status', 'pending')
->where('invited_by', $id)
->get(\App\Models\User::$commonFields)
;
if ($userList->isNotEmpty()) {
@@ -21,6 +22,9 @@ if(!empty($_POST['conusr'])) {
fire_event(\App\Enums\ModelEventEnum::USER_UPDATED, $user);
}
\App\Models\User::query()->whereIn('id', $uidArr)->update(['status' => 'confirmed', 'editsecret' => '']);
} else {
stderr($lang_takeconfirm['std_sorry'],$lang_takeconfirm['std_no_buddy_to_confirm'].
"<a class=altlink href=invite.php?id={$CURUSER['id']}>".$lang_takeconfirm['std_here_to_go_back'],false);
}
} else {
stderr($lang_takeconfirm['std_sorry'],$lang_takeconfirm['std_no_buddy_to_confirm'].