Browse Source

Shorten "week" in freeleech time format

spaghetti 8 years ago
parent
commit
d76fa311d6
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      classes/torrents.class.php
  2. 1
    1
      sections/index/private.php
  3. 1
    1
      sections/torrents/details.php

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

712
           WHERE TorrentID = ".$Data['ID']);
712
           WHERE TorrentID = ".$Data['ID']);
713
         if (G::$DB->has_results()) {
713
         if (G::$DB->has_results()) {
714
           $ExpiryTime = G::$DB->next_record(MYSQLI_NUM, false)[0];
714
           $ExpiryTime = G::$DB->next_record(MYSQLI_NUM, false)[0];
715
-          $Info[] = ($HTMLy ? Format::torrent_label('Freeleech!') : 'Freeleech!') . ($HTMLy ? " <strong>(" : " (") . str_replace(['day','hour','min','Just now','s',' '],['d','h','m','0m'],time_diff($ExpiryTime, 1, false)) . ($HTMLy ? ")</strong>" : ")");
715
+          $Info[] = ($HTMLy ? Format::torrent_label('Freeleech!') : 'Freeleech!') . ($HTMLy ? " <strong>(" : " (") . str_replace(['week','day','hour','min','Just now','s',' '],['w','d','h','m','0m'],time_diff($ExpiryTime, 1, false)) . ($HTMLy ? ")</strong>" : ")");
716
         } else {
716
         } else {
717
           $Info[] = $HTMLy ? Format::torrent_label('Freeleech!') : 'Freeleech!';
717
           $Info[] = $HTMLy ? Format::torrent_label('Freeleech!') : 'Freeleech!';
718
         }
718
         }

+ 1
- 1
sections/index/private.php View File

149
 <?
149
 <?
150
   for ($i = 0; $i < count($Freeleeches); $i++) {
150
   for ($i = 0; $i < count($Freeleeches); $i++) {
151
     list($ID, $ExpiryTime, $Name, $Image) = $Freeleeches[$i];
151
     list($ID, $ExpiryTime, $Name, $Image) = $Freeleeches[$i];
152
-    $DisplayTime = '('.str_replace(['day','hour','min','Just now','s',' '],['d','h','m','0m'],time_diff($ExpiryTime, 1, false)).') ';
152
+    $DisplayTime = '('.str_replace(['week','day','hour','min','Just now','s',' '],['w','d','h','m','0m'],time_diff($ExpiryTime, 1, false)).') ';
153
     $DisplayName = '<a href="torrents.php?torrentid='.$ID.'"';
153
     $DisplayName = '<a href="torrents.php?torrentid='.$ID.'"';
154
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
154
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
155
       $DisplayName .= " onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($Image)."\" onmouseleave=\"ungetCover(event)\"";
155
       $DisplayName .= " onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($Image)."\" onmouseleave=\"ungetCover(event)\"";

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

510
       WHERE TorrentID = $TorrentID");
510
       WHERE TorrentID = $TorrentID");
511
     if ($DB->has_results()) {
511
     if ($DB->has_results()) {
512
       $ExpiryTime = $DB->next_record(MYSQLI_NUM, false)[0];
512
       $ExpiryTime = $DB->next_record(MYSQLI_NUM, false)[0];
513
-      $ExtraInfo .= " <strong>(" . str_replace(['day','hour','min','Just now','s',' '],['d','h','m','0m'],time_diff($ExpiryTime, 1, false)) . ")</strong>";
513
+      $ExtraInfo .= " <strong>(" . str_replace(['week','day','hour','min','Just now','s',' '],['w','d','h','m','0m'],time_diff($ExpiryTime, 1, false)) . ")</strong>";
514
     }
514
     }
515
   }
515
   }
516
   if ($PersonalFL) { $ExtraInfo.=$AddExtra. Format::torrent_label('Personal Freeleech!'); $AddExtra=' / '; }
516
   if ($PersonalFL) { $ExtraInfo.=$AddExtra. Format::torrent_label('Personal Freeleech!'); $AddExtra=' / '; }

Loading…
Cancel
Save