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
     if (!empty($Data['Archive'])) {
681
     if (!empty($Data['Archive'])) {
682
       $Info[] = $Data['Archive'];
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
     if ($Data['IsLeeching']) {
689
     if ($Data['IsLeeching']) {
688
       $Info[] = $HTMLy ? Format::torrent_label('Leeching') : 'Leeching';
690
       $Info[] = $HTMLy ? Format::torrent_label('Leeching') : 'Leeching';
711
     return implode(' / ', $Info);
713
     return implode(' / ', $Info);
712
   }
714
   }
713
 
715
 
714
-
715
   /**
716
   /**
716
    * Will freeleech / neutral leech / normalise a set of torrents
717
    * Will freeleech / neutral leech / normalise a set of torrents
717
    *
718
    *

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

477
   if ($Archive) {
477
   if ($Archive) {
478
     $ExtraInfo .= $AddExtra.display_str($Archive); $AddExtra=' / ';
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
   if (!$ExtraInfo || $GroupCategoryID == 5) {
487
   if (!$ExtraInfo || $GroupCategoryID == 5) {
481
     $ExtraInfo = $GroupName; $AddExtra=' / ';
488
     $ExtraInfo = $GroupName; $AddExtra=' / ';
482
   }
489
   }
501
     $ExtraInfo.=$AddExtra.'<strong class="torrent_label tl_reported tooltip" title="Type: '.ucfirst($Reports[0]['Type']).'<br>Comment: '.htmlentities(htmlentities($Reports[0]['UserComment'])).'">Reported</strong>';
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
     $AddExtra=' / ';
509
     $AddExtra=' / ';
503
   }
510
   }
504
-  if (!$Censored) { $ExtraInfo .= $AddExtra.Format::torrent_label('Unaligned'); $AddExtra=' / '; }
505
   if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
511
   if (!empty($BadTags)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Tags'); $AddExtra=' / '; }
506
   if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
512
   if (!empty($BadFolders)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad Folders'); $AddExtra=' / '; }
507
   if (!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }
513
   if (!empty($BadFiles)) { $ExtraInfo.=$AddExtra. Format::torrent_label('Bad File Names'); $AddExtra=' / '; }

Loading…
Cancel
Save