custom field cancel file

This commit is contained in:
xiaomlove
2021-03-17 01:21:35 +08:00
parent 74e84d475f
commit 7f1b97a4d8
7 changed files with 34 additions and 253 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ else {
case "1" :
{
reset_cachetimestamp($row['id']);
if (($photo_url = $movie->photo_localurl() ) != FALSE)
if (($photo_url = $movie->photo() ) != FALSE)
$smallth = "<img src=\"".$photo_url. "\" width=\"105\" onclick=\"Preview(this);\" alt=\"poster\" />";
else
$smallth = "<img src=\"pic/nophoto.gif\" alt=\"no poster\" />";
+1 -14
View File
@@ -356,9 +356,8 @@ $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 = [
@@ -372,18 +371,6 @@ 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) {