Browse Source

Fix aligned/unaligned torrent display

pjc 5 years ago
parent
commit
b25cf1cbaf
2 changed files with 11 additions and 4 deletions
  1. 4
    3
      classes/torrents.class.php
  2. 7
    1
      sections/torrents/details.php

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

@@ -681,8 +681,10 @@ class Torrents {
681 681
     if (!empty($Data['Archive'])) {
682 682
       $Info[] = $Data['Archive'];
683 683
     }
684
-    if (isset($Data['Censored']) && !$Data['Censored']) {
685
-      $Info[] = $HTMLy ? Format::torrent_label('Unaligned') : 'Unaligned';
684
+    if ($Data['Censored'] === 1) {
685
+      $Info[] = 'Aligned';
686
+    } else {
687
+      $Info[] = 'Unaligned';
686 688
     }
687 689
     if ($Data['IsLeeching']) {
688 690
       $Info[] = $HTMLy ? Format::torrent_label('Leeching') : 'Leeching';
@@ -711,7 +713,6 @@ class Torrents {
711 713
     return implode(' / ', $Info);
712 714
   }
713 715
 
714
-
715 716
   /**
716 717
    * Will freeleech / neutral leech / normalise a set of torrents
717 718
    *

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

@@ -477,6 +477,13 @@ foreach ($TorrentList as $Torrent) {
477 477
   if ($Archive) {
478 478
     $ExtraInfo .= $AddExtra.display_str($Archive); $AddExtra=' / ';
479 479
   }
480
+  if ($Censored) {
481
+    $ExtraInfo .= $AddExtra.display_str('Aligned');
482
+    $AddExtra=' / ';
483
+  } else {
484
+    $ExtraInfo .= $AddExtra.display_str('Unaligned');
485
+    $AddExtra=' / ';
486
+  }
480 487
   if (!$ExtraInfo || $GroupCategoryID == 5) {
481 488
     $ExtraInfo = $GroupName; $AddExtra=' / ';
482 489
   }
@@ -501,7 +508,6 @@ foreach ($TorrentList as $Torrent) {
501 508
     $ExtraInfo.=$AddExtra.'<strong class="torrent_label tl_reported tooltip" title="Type: '.ucfirst($Reports[0]['Type']).'<br>Comment: '.htmlentities(htmlentities($Reports[0]['UserComment'])).'">Reported</strong>';
502 509
     $AddExtra=' / ';
503 510
   }
504
-  if (!$Censored) { $ExtraInfo .= $AddExtra.Format::torrent_label('Unaligned'); $AddExtra=' / '; }
505 511
   if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
506 512
   if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
507 513
   if (!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }

Loading…
Cancel
Save