Browse Source

Bring up to date with Oppaitime's repo

pjc 5 years ago
parent
commit
323b2b1224

+ 7
- 1
classes/torrent_form.class.php View File

414
 <?php new TEXTAREA_PREVIEW('release_desc', 'release_desc', display_str($Torrent['TorrentDescription']??''), 60, 8); ?>
414
 <?php new TEXTAREA_PREVIEW('release_desc', 'release_desc', display_str($Torrent['TorrentDescription']??''), 60, 8); ?>
415
         </td>
415
         </td>
416
       </tr>
416
       </tr>
417
+      <tr id="censored_tr">
418
+        <td class="label">Aligned Sequence?</td>
419
+        <td>
420
+          <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 0) ? 'checked ' : '')?>/>
421
+        </td>
422
+      </tr>
417
       <tr id="anon_tr">
423
       <tr id="anon_tr">
418
-        <td class="label tooltip" title="Checking this will hide your username from other users on the torrent details page. Stats will still be attributed to you.">Upload Anonymously</td>
424
+        <td class="label tooltip" title="Checking this will hide your username from other users on the torrent details page. Stats will still be attributed to you.">Upload Anonymously?</td>
419
         <td><input type="checkbox" name="anonymous" value="1" <?=(($Torrent['Anonymous'] ?? false) ? 'checked ' : '')?>/></td>
425
         <td><input type="checkbox" name="anonymous" value="1" <?=(($Torrent['Anonymous'] ?? false) ? 'checked ' : '')?>/></td>
420
       </tr>
426
       </tr>
421
     </table>
427
     </table>

+ 1
- 3
classes/torrents.class.php View File

675
     if (!empty($Data['Archive'])) {
675
     if (!empty($Data['Archive'])) {
676
       $Info[] = $Data['Archive'];
676
       $Info[] = $Data['Archive'];
677
     }
677
     }
678
-    /*
679
     if (isset($Data['Censored']) && !$Data['Censored']) {
678
     if (isset($Data['Censored']) && !$Data['Censored']) {
680
-      $Info[] = $HTMLy ? Format::torrent_label('Uncensored') : 'Uncensored';
679
+      $Info[] = $HTMLy ? Format::torrent_label('Unaligned') : 'Unaligned';
681
     }
680
     }
682
-    */
683
     if ($Data['IsLeeching']) {
681
     if ($Data['IsLeeching']) {
684
       $Info[] = $HTMLy ? Format::torrent_label('Leeching') : 'Leeching';
682
       $Info[] = $HTMLy ? Format::torrent_label('Leeching') : 'Leeching';
685
     } else if ($Data['IsSeeding']) {
683
     } else if ($Data['IsSeeding']) {

+ 1
- 1
gazelle.sql View File

1078
   `Language` varchar(20) DEFAULT NULL,
1078
   `Language` varchar(20) DEFAULT NULL,
1079
   `Censored` tinyint(1) NOT NULL DEFAULT '1',
1079
   `Censored` tinyint(1) NOT NULL DEFAULT '1',
1080
   `Anonymous` tinyint(1) NOT NULL DEFAULT '0',
1080
   `Anonymous` tinyint(1) NOT NULL DEFAULT '0',
1081
-  `info_hash` blob NOT NULL DEFAULT NULL,
1081
+  `info_hash` blob NOT NULL,
1082
   `FileCount` int(6) NOT NULL DEFAULT NULL,
1082
   `FileCount` int(6) NOT NULL DEFAULT NULL,
1083
   `FileList` mediumtext,
1083
   `FileList` mediumtext,
1084
   `FilePath` varchar(255) NOT NULL DEFAULT '',
1084
   `FilePath` varchar(255) NOT NULL DEFAULT '',

+ 3
- 3
sections/torrents/browse.php View File

254
               <option value="0"<?Format::selected('freetorrent', 0)?>>Normal</option>
254
               <option value="0"<?Format::selected('freetorrent', 0)?>>Normal</option>
255
             </select>
255
             </select>
256
             <select name="censored" class="ft_censored fti_advanced">
256
             <select name="censored" class="ft_censored fti_advanced">
257
-              <option value="">Original?</option>
258
-              <option value="1"<?Format::selected('censored', 1)?>>Original</option>
259
-              <option value="0"<?Format::selected('censored', 0)?>>Not Original</option>
257
+              <option value="">Aligned Sequence?</option>
258
+              <option value="1"<?Format::selected('censored', 1)?>>Aligned</option>
259
+              <option value="0"<?Format::selected('censored', 0)?>>Unaligned</option>
260
             </select>
260
             </select>
261
           </td>
261
           </td>
262
         </tr>
262
         </tr>

+ 1
- 1
sections/torrents/details.php View File

497
     $ExtraInfo.=$AddExtra.'<strong class="torrent_label tl_reported tooltip" title="Type: '.ucfirst($Reports[0]['Type']).'<br>Comment: '.htmlentities(htmlentities($Reports[0]['UserComment'])).'">Reported</strong>';
497
     $ExtraInfo.=$AddExtra.'<strong class="torrent_label tl_reported tooltip" title="Type: '.ucfirst($Reports[0]['Type']).'<br>Comment: '.htmlentities(htmlentities($Reports[0]['UserComment'])).'">Reported</strong>';
498
     $AddExtra=' / ';
498
     $AddExtra=' / ';
499
   }
499
   }
500
-  #if (!$Censored) { $ExtraInfo .= $AddExtra.Format::torrent_label('Uncensored'); $AddExtra=' / '; }
500
+  if (!$Censored) { $ExtraInfo .= $AddExtra.Format::torrent_label('Unaligned'); $AddExtra=' / '; }
501
   if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
501
   if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
502
   if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
502
   if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
503
   if (!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }
503
   if (!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }

+ 3
- 3
sections/torrents/user.php View File

383
           <td class="label"><strong>Misc:</strong></td>
383
           <td class="label"><strong>Misc:</strong></td>
384
           <td class="nobr" colspan="3">
384
           <td class="nobr" colspan="3">
385
             <select name="censored" class="ft_censored">
385
             <select name="censored" class="ft_censored">
386
-              <option value="3">Original?</option>
387
-              <option value="1"<?Format::selected('censored', 1)?>>Original</option>
388
-              <option value="0"<?Format::selected('censored', 0)?>>Not Original</option>
386
+              <option value="3">Aligned Sequence?</option>
387
+              <option value="1"<?Format::selected('censored', 1)?>>Aligned</option>
388
+              <option value="0"<?Format::selected('censored', 0)?>>Unaligned</option>
389
             </select>
389
             </select>
390
           </td>
390
           </td>
391
         </tr>
391
         </tr>

+ 9
- 48
sections/upload/upload_handle.php View File

74
 
74
 
75
 $Properties['GroupDescription'] = trim($_POST['album_desc']);
75
 $Properties['GroupDescription'] = trim($_POST['album_desc']);
76
 $Properties['TorrentDescription'] = $_POST['release_desc'];
76
 $Properties['TorrentDescription'] = $_POST['release_desc'];
77
+$Properties['MediaInfo'] = '';
77
 #$Properties['MediaInfo'] = $_POST['mediainfo'];
78
 #$Properties['MediaInfo'] = $_POST['mediainfo'];
78
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : "";
79
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : "";
79
 
80
 
81
   $Properties['GroupDescription'] = trim($_POST['album_desc']);
82
   $Properties['GroupDescription'] = trim($_POST['album_desc']);
82
 } elseif ($_POST['desc']) {
83
 } elseif ($_POST['desc']) {
83
   $Properties['GroupDescription'] = trim($_POST['desc']);
84
   $Properties['GroupDescription'] = trim($_POST['desc']);
85
+  $Properties['MediaInfo'] = '';
84
   #$Properties['MediaInfo'] = $_POST['mediainfo'];
86
   #$Properties['MediaInfo'] = $_POST['mediainfo'];
85
 }
87
 }
86
 
88
 
150
 
152
 
151
     $Validate->SetFields('release_desc',
153
     $Validate->SetFields('release_desc',
152
       '0','string','The release description has a minimum length of 10 characters.', array('maxlength'=>1000000, 'minlength'=>10));
154
       '0','string','The release description has a minimum length of 10 characters.', array('maxlength'=>1000000, 'minlength'=>10));
153
-    */
155
+  */
154
 
156
 
155
   default:
157
   default:
156
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
158
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
375
 if (!isset($GroupID) || !$GroupID) {
377
 if (!isset($GroupID) || !$GroupID) {
376
   // Create torrent group
378
   // Create torrent group
377
   $DB->query("
379
   $DB->query("
378
-    INSERT INTO torrents_group
379
-      (CategoryID, Name, NameRJ, NameJP, Year,
380
-      Series, Studio, CatalogueNumber, Pages, Time,
381
-      WikiBody, WikiImage)
382
-    VALUES
383
-      ( ?, ?, ?, ?, ?,
384
-        ?, ?, ?, ?, NOW(),
385
-        ?, ? )",
386
-    $TypeID, $T['Title'], $T['TitleRJ'], $T['TitleJP'], $T['Year'],
387
-    $T['Series'], $T['Studio'], $T['CatalogueNumber'], $T['Pages'],
388
-    $Body, $T['Image']);
389
-
390
-    /* Original DB query
391
-      $DB->query("
392
     INSERT INTO torrents_group
380
     INSERT INTO torrents_group
393
       (CategoryID, Name, NameRJ, NameJP, Year,
381
       (CategoryID, Name, NameRJ, NameJP, Year,
394
       Series, Studio, CatalogueNumber, Pages, Time,
382
       Series, Studio, CatalogueNumber, Pages, Time,
400
     $TypeID, $T['Title'], $T['TitleRJ'], $T['TitleJP'], $T['Year'],
388
     $TypeID, $T['Title'], $T['TitleRJ'], $T['TitleJP'], $T['Year'],
401
     $T['Series'], $T['Studio'], $T['CatalogueNumber'], $T['Pages'],
389
     $T['Series'], $T['Studio'], $T['CatalogueNumber'], $T['Pages'],
402
     $Body, $T['Image'], $T['DLsiteID']);
390
     $Body, $T['Image'], $T['DLsiteID']);
403
-    */
404
-
405
   $GroupID = $DB->inserted_id();
391
   $GroupID = $DB->inserted_id();
406
   foreach ($ArtistForm as $Num => $Artist) {
392
   foreach ($ArtistForm as $Num => $Artist) {
407
     $DB->query("
393
     $DB->query("
512
 
498
 
513
 // Torrent
499
 // Torrent
514
 $DB->query("
500
 $DB->query("
515
-  INSERT INTO torrents
516
-    (GroupID, UserID, Media, Container, Codec, Resolution,
517
-    Anonymous, Archive, info_hash, FileCount, FileList, FilePath, Size, Time,
518
-    Description, FreeTorrent, FreeLeechType)
519
-  VALUES
520
-    ( ?, ?, ?, ?, ?, ?,
521
-      ?, ?, ?, ?, ?, ?, ?, NOW(),
522
-      ?, ?, ? )",
523
-  $GroupID, $LoggedUser['ID'], $T['Media'], $T['Container'], $T['Codec'], $T['Resolution'],
524
-  $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
525
-  $T['TorrentDescription'], $T['FreeTorrent'], $T['FreeLeechType']);
526
-
527
-  /* Original DB query
528
-  $DB->query("
529
   INSERT INTO torrents
501
   INSERT INTO torrents
530
     (GroupID, UserID, Media, Container, Codec, Resolution,
502
     (GroupID, UserID, Media, Container, Codec, Resolution,
531
     AudioFormat, Subbing, Language, Subber, Censored,
503
     AudioFormat, Subbing, Language, Subber, Censored,
540
   $T['AudioFormat'], $T['Subbing'], $T['Language'], $T['Subber'], $T['Censored'],
512
   $T['AudioFormat'], $T['Subbing'], $T['Language'], $T['Subber'], $T['Censored'],
541
   $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
513
   $T['Anonymous'], $T['Archive'], $InfoHash, $NumFiles, $FileString, $FilePath, $TotalSize,
542
   $T['TorrentDescription'], $T['MediaInfo'], $T['FreeTorrent'], $T['FreeLeechType']);
514
   $T['TorrentDescription'], $T['MediaInfo'], $T['FreeTorrent'], $T['FreeLeechType']);
543
-  */
544
 
515
 
545
 $Cache->increment('stats_torrent_count');
516
 $Cache->increment('stats_torrent_count');
546
 $TorrentID = $DB->inserted_id();
517
 $TorrentID = $DB->inserted_id();
547
 $Tor->Dec['comment'] = 'https://'.SITE_DOMAIN.'/torrents.php?torrentid='.$TorrentID;
518
 $Tor->Dec['comment'] = 'https://'.SITE_DOMAIN.'/torrents.php?torrentid='.$TorrentID;
548
 
519
 
549
-# Mitigate $TorrentID = 0 bug on some uploads
550
-# @todo Investigate this further and properly fix
551
-if ($TorrentID !== 0) {
552
-  Tracker::update_tracker('add_torrent', [
553
-    'id'          => $TorrentID,
554
-    'info_hash'   => rawurlencode($InfoHash),
555
-    'freetorrent' => $T['FreeTorrent']
556
-  ]);
557
-  $Debug->set_flag('upload: ocelot updated');
558
-} else {
559
-  $TorrentID_debug = $DB->query("
560
-    SELECT MAX(ID) FROM torrents
561
-  ");
562
-  var_dump($TorrentID_debug);
563
-  error(0);
564
-}
520
+Tracker::update_tracker('add_torrent', [
521
+  'id'          => $TorrentID,
522
+  'info_hash'   => rawurlencode($InfoHash),
523
+  'freetorrent' => $T['FreeTorrent']
524
+]);
525
+$Debug->set_flag('upload: ocelot updated');
565
 
526
 
566
 // Prevent deletion of this torrent until the rest of the upload process is done
527
 // Prevent deletion of this torrent until the rest of the upload process is done
567
 // (expire the key after 10 minutes to prevent locking it for too long in case there's a fatal error below)
528
 // (expire the key after 10 minutes to prevent locking it for too long in case there's a fatal error below)

+ 0
- 14
static/styles/beluga/style.css View File

55
   letter-spacing: -2px;
55
   letter-spacing: -2px;
56
 }
56
 }
57
 .group .cats_other { background-color: #4DC593; }
57
 .group .cats_other { background-color: #4DC593; }
58
-/* Unused categories
59
-.cats_audio:after {
60
-  content: "AUD";
61
-  color: #77C5D4;
62
-  font-size: 18px;
63
-}
64
-.group .cats_audio { background-color: #77C5D4; }
65
-.cats_other:after {
66
-  content: "OTH";
67
-  color: #0D5968;
68
-  font-size: 19px;
69
-}
70
-.group .cats_other { background-color: #0D5968; }
71
-*/
72
 
58
 
73
 body {
59
 body {
74
   width: 100%;
60
   width: 100%;

+ 0
- 6
static/styles/kuro/style.css View File

5
 .cats_rna { width: 36px; height: 36px; background: url('/static/common/caticons/rna.png') no-repeat center center; }
5
 .cats_rna { width: 36px; height: 36px; background: url('/static/common/caticons/rna.png') no-repeat center center; }
6
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/caticons/protein.png') no-repeat center center; }
6
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/caticons/protein.png') no-repeat center center; }
7
 .cats_other { width: 36px; height: 36px; background: url('/static/common/caticons/other.png') no-repeat center center; }
7
 .cats_other { width: 36px; height: 36px; background: url('/static/common/caticons/other.png') no-repeat center center; }
8
-/* Unused categories
9
-.cats_ebooks { width: 28px; height: 28px; background: url('images/ebook.png') no-repeat center center; }
10
-.cats_elearningvideos { width: 28px; height: 28px; background: url('images/elearning.png') no-repeat center center; }
11
-.cats_music { width: 28px; height: 28px; background: url('images/music.png') no-repeat center center; }
12
-*/
13
 
8
 
14
 /* Global */
9
 /* Global */
15
-
16
 * {
10
 * {
17
   padding: 0em;
11
   padding: 0em;
18
   margin: 0em;
12
   margin: 0em;

+ 0
- 5
static/styles/oppai/style.css View File

9
 .cats_rna { width: 36px; height: 36px; background: url('/static/common/caticons/rna.png') no-repeat center center; }
9
 .cats_rna { width: 36px; height: 36px; background: url('/static/common/caticons/rna.png') no-repeat center center; }
10
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/caticons/protein.png') no-repeat center center; }
10
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/caticons/protein.png') no-repeat center center; }
11
 .cats_other { width: 36px; height: 36px; background: url('/static/common/caticons/other.png') no-repeat center center; }
11
 .cats_other { width: 36px; height: 36px; background: url('/static/common/caticons/other.png') no-repeat center center; }
12
-/* Unused categories
13
-.cats_ebooks { width: 28px; height: 28px; background: url('images/ebook.png') no-repeat center center; }
14
-.cats_elearningvideos { width: 28px; height: 28px; background: url('images/elearning.png') no-repeat center center; }
15
-.cats_music { width: 28px; height: 28px; background: url('images/music.png') no-repeat center center; }
16
-*/
17
 
12
 
18
 /* Global */
13
 /* Global */
19
 * {
14
 * {

Loading…
Cancel
Save