mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
torrent extras createOrUpdate
This commit is contained in:
@@ -242,7 +242,7 @@ $sql = "UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id";
|
||||
do_log("[UPDATE_TORRENT]: $sql");
|
||||
$affectedRows = sql_query($sql) or sqlerr(__FILE__, __LINE__);
|
||||
$torrentInfo = \App\Models\Torrent::query()->find($id);
|
||||
$torrentInfo->extra()->update($extraUpdate);
|
||||
$torrentInfo->extra()->updateOrCreate(['torrent_id' => $id], $extraUpdate);
|
||||
fire_event("torrent_updated", $torrentInfo, $torrentOld);
|
||||
$dateTimeStringNow = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user