Browse Source

Disable some upload validation (work in progress)

pjc 5 years ago
parent
commit
e7d479ff44
1 changed files with 23 additions and 3 deletions
  1. 23
    3
      sections/upload/upload_handle.php

+ 23
- 3
sections/upload/upload_handle.php View File

73
 }
73
 }
74
 
74
 
75
 $Properties['GroupDescription'] = trim($_POST['album_desc']);
75
 $Properties['GroupDescription'] = trim($_POST['album_desc']);
76
-$Properties['TorrentDescription'] = $_POST['release_desc'];
77
-$Properties['MediaInfo'] = $_POST['mediainfo'];
76
+#$Properties['TorrentDescription'] = $_POST['release_desc'];
77
+#$Properties['MediaInfo'] = $_POST['mediainfo'];
78
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : "";
78
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : "";
79
 
79
 
80
 if ($_POST['album_desc']) {
80
 if ($_POST['album_desc']) {
81
   $Properties['GroupDescription'] = trim($_POST['album_desc']);
81
   $Properties['GroupDescription'] = trim($_POST['album_desc']);
82
 } elseif ($_POST['desc']) {
82
 } elseif ($_POST['desc']) {
83
   $Properties['GroupDescription'] = trim($_POST['desc']);
83
   $Properties['GroupDescription'] = trim($_POST['desc']);
84
-  $Properties['MediaInfo'] = $_POST['mediainfo'];
84
+  #$Properties['MediaInfo'] = $_POST['mediainfo'];
85
 }
85
 }
86
 
86
 
87
 if (isset($_POST['groupid'])) $Properties['GroupID'] = $_POST['groupid'];
87
 if (isset($_POST['groupid'])) $Properties['GroupID'] = $_POST['groupid'];
147
     $Validate->SetFields('lang',
147
     $Validate->SetFields('lang',
148
       '1','inarray','Please select a valid language.', array('inarray'=>$Languages));
148
       '1','inarray','Please select a valid language.', array('inarray'=>$Languages));
149
 
149
 
150
+    /*
150
     $Validate->SetFields('release_desc',
151
     $Validate->SetFields('release_desc',
151
       '0','string','The release description has a minimum length of 10 characters.', array('maxlength'=>1000000, 'minlength'=>10));
152
       '0','string','The release description has a minimum length of 10 characters.', array('maxlength'=>1000000, 'minlength'=>10));
153
+    */
152
 
154
 
153
   default:
155
   default:
154
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
156
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
494
 
496
 
495
 // Torrent
497
 // Torrent
496
 $DB->query("
498
 $DB->query("
499
+  INSERT INTO torrents
500
+    (GroupID, UserID, Media, Container, Codec, Resolution,
501
+    AudioFormat, Subbing, Language, Subber, Censored,
502
+    Anonymous, Archive, info_hash, FileCount, FileList, FilePath, Size, Time,
503
+    Description, FreeTorrent, FreeLeechType)
504
+  VALUES
505
+    ( ?, ?, ?, ?, ?, ?,
506
+      ?, ?, ?, ?, ?,
507
+      ?, ?, ?, ?, ?, ?, ?, NOW(),
508
+      ?, ?, ? )",
509
+  $GroupID, $LoggedUser['ID'], $T['Media'], $T['Container'], $T['Codec'], $T['Resolution'],
510
+  $T['AudioFormat'], $T['Subbing'], $T['Language'], $T['Subber'], $T['Censored'],
511
+  $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
512
+  $T['TorrentDescription'], $T['FreeTorrent'], $T['FreeLeechType']);
513
+
514
+  /* Original DB query
515
+  $DB->query("
497
   INSERT INTO torrents
516
   INSERT INTO torrents
498
     (GroupID, UserID, Media, Container, Codec, Resolution,
517
     (GroupID, UserID, Media, Container, Codec, Resolution,
499
     AudioFormat, Subbing, Language, Subber, Censored,
518
     AudioFormat, Subbing, Language, Subber, Censored,
508
   $T['AudioFormat'], $T['Subbing'], $T['Language'], $T['Subber'], $T['Censored'],
527
   $T['AudioFormat'], $T['Subbing'], $T['Language'], $T['Subber'], $T['Censored'],
509
   $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
528
   $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
510
   $T['TorrentDescription'], $T['MediaInfo'], $T['FreeTorrent'], $T['FreeLeechType']);
529
   $T['TorrentDescription'], $T['MediaInfo'], $T['FreeTorrent'], $T['FreeLeechType']);
530
+  */
511
 
531
 
512
 $Cache->increment('stats_torrent_count');
532
 $Cache->increment('stats_torrent_count');
513
 $TorrentID = $DB->inserted_id();
533
 $TorrentID = $DB->inserted_id();

Loading…
Cancel
Save