|
@@ -130,7 +130,7 @@ if (($Freeleeches = $Cache->get_value('shop_freeleech_list')) === false) {
|
130
|
130
|
$DB->query("
|
131
|
131
|
SELECT
|
132
|
132
|
TorrentID,
|
133
|
|
- GREATEST(NOW(), ExpiryTime),
|
|
133
|
+ UNIX_TIMESTAMP(ExpiryTime),
|
134
|
134
|
Name,
|
135
|
135
|
WikiImage
|
136
|
136
|
FROM shop_freeleeches AS sf
|
|
@@ -149,7 +149,7 @@ if (count($Freeleeches)) {
|
149
|
149
|
<?
|
150
|
150
|
for ($i = 0; $i < count($Freeleeches); $i++) {
|
151
|
151
|
list($ID, $ExpiryTime, $Name, $Image) = $Freeleeches[$i];
|
152
|
|
- $DisplayTime = '('.str_replace(['week','day','hour','min','Just now','s',' '],['w','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(max($ExpiryTime, time()), 1, false)).') ';
|
153
|
153
|
$DisplayName = '<a href="torrents.php?torrentid='.$ID.'"';
|
154
|
154
|
if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
|
155
|
155
|
$DisplayName .= " onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($Image)."\" onmouseleave=\"ungetCover(event)\"";
|