diff --git a/objects/functions.php b/objects/functions.php index 21f6a017ba..78ea5885ea 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -138,9 +138,14 @@ function get_max_file_size() { return humanFileSize(file_upload_max_size()); } -function humanTiming($time, $precision = 0, $useDatabaseTime = true) { +function humanTiming($time, $precision = 0, $useDatabaseTime = true, $addAgo = false) { $time = secondsIntervalFromNow($time, $useDatabaseTime); - return secondsToHumanTiming($time, $precision); + + if($addAgo){ + $addAgo = $time - time(); + } + + return secondsToHumanTiming($time, $precision, $addAgo); } /** @@ -171,7 +176,7 @@ function humanTimingAfterwards($time, $precision = 0, $useDatabaseTime = true) { return __('Coming in') . ' ' . secondsToHumanTiming($time, $precision); } -function secondsToHumanTiming($time, $precision = 0) { +function secondsToHumanTiming($time, $precision = 0, $addAgo = false) { if (empty($time)) { return __("Now"); } @@ -223,8 +228,15 @@ function secondsToHumanTiming($time, $precision = 0) { $text .= ' ' . secondsToHumanTiming($rest, $precision - 1); } } + + $return = $numberOfUnits . ' ' . $text; + + if(!empty($addAgo) && $addAgo<0){ + $return = sprintf(__('%s Ago'), $return); + } + + return $return; - return $numberOfUnits . ' ' . $text; } } diff --git a/plugin/Gallery/functions.php b/plugin/Gallery/functions.php index 2ef2a93812..915b51d7b9 100644 --- a/plugin/Gallery/functions.php +++ b/plugin/Gallery/functions.php @@ -280,7 +280,7 @@ function createGallerySectionVideo($video, $crc = "", $get = array(), $ignoreAds
diff --git a/plugin/Gallery/view/BigVideo.php b/plugin/Gallery/view/BigVideo.php index febf85f656..ded4f1eb16 100644 --- a/plugin/Gallery/view/BigVideo.php +++ b/plugin/Gallery/view/BigVideo.php @@ -170,7 +170,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) { ?>
- +
diff --git a/view/channelPlaylistItems.php b/view/channelPlaylistItems.php index 04fc710588..4242580a3a 100644 --- a/view/channelPlaylistItems.php +++ b/view/channelPlaylistItems.php @@ -168,7 +168,7 @@ unset($_POST['current']); ?>
- + - +
diff --git a/view/channelProgram.php b/view/channelProgram.php index 56e8bf2154..f458490283 100644 --- a/view/channelProgram.php +++ b/view/channelProgram.php @@ -174,7 +174,7 @@ $playListsObj = AVideoPlugin::getObjectData("PlayLists");
- +
diff --git a/view/trending.php b/view/trending.php index 799c65a222..11fc4e220b 100644 --- a/view/trending.php +++ b/view/trending.php @@ -116,7 +116,7 @@ $metaDescription = __("Trending"); } ?>
- +