mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
support plugin nexusphp-hit-and-run
This commit is contained in:
+8
-7
@@ -53,13 +53,6 @@ if (!empty($_POST['pt_gen'])) {
|
||||
|
||||
$updateset[] = "technical_info = " . sqlesc($_POST['technical_info'] ?? '');
|
||||
$torrentOperationLog = [];
|
||||
/**
|
||||
* hr
|
||||
* @since 1.6.0-beta12
|
||||
*/
|
||||
if (isset($_POST['hr']) && isset(\App\Models\Torrent::$hrStatus[$_POST['hr']]) && user_can('torrent_hr')) {
|
||||
$updateset[] = "hr = " . sqlesc($_POST['hr']);
|
||||
}
|
||||
|
||||
|
||||
if ($enablenfo_main=='yes'){
|
||||
@@ -215,6 +208,14 @@ $descriptionArr = format_description($descr);
|
||||
$cover = get_image_from_description($descriptionArr, true, false);
|
||||
$updateset[] = "cover = " . sqlesc($cover);
|
||||
|
||||
/**
|
||||
* hr
|
||||
* @since 1.6.0-beta12
|
||||
*/
|
||||
if (isset($_POST['hr'][$newcatmode]) && isset(\App\Models\Torrent::$hrStatus[$_POST['hr'][$newcatmode]]) && user_can('torrent_hr')) {
|
||||
$updateset[] = "hr = " . sqlesc($_POST['hr'][$newcatmode]);
|
||||
}
|
||||
|
||||
$sql = "UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id";
|
||||
do_log("[UPDATE_TORRENT]: $sql");
|
||||
$affectedRows = sql_query($sql) or sqlerr(__FILE__, __LINE__);
|
||||
|
||||
Reference in New Issue
Block a user