mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
Merge remote-tracking branch 'refs/remotes/origin/php8' into php8
This commit is contained in:
+14
-1
@@ -356,8 +356,9 @@ $id = mysql_insert_id();
|
||||
* add custom fields
|
||||
* @since v1.6
|
||||
*/
|
||||
$now = date('Y-m-d H:i:s');
|
||||
if (!empty($_POST['custom_fields'])) {
|
||||
$now = date('Y-m-d H:i:s');
|
||||
|
||||
foreach ($_POST['custom_fields'] as $customField => $customValue) {
|
||||
foreach ((array)$customValue as $value) {
|
||||
$customData = [
|
||||
@@ -371,6 +372,18 @@ if (!empty($_POST['custom_fields'])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($_FILES['custom_fields'])) {
|
||||
foreach ($_FILES['custom_fields'] as $customField => $customValue) {
|
||||
$customData = [
|
||||
'torrent_id' => $id,
|
||||
'custom_field_id' => $customField,
|
||||
'custom_field_value' => $value,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
];
|
||||
\Nexus\Database\DB::insert('torrents_custom_field_values', $customData);
|
||||
}
|
||||
}
|
||||
|
||||
@sql_query("DELETE FROM files WHERE torrent = $id");
|
||||
foreach ($filelist as $file) {
|
||||
|
||||
Reference in New Issue
Block a user