aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/template.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-02 20:16:35 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-03 13:55:05 +0200
commitb0bb64c3eebce41a35cfe6674f63f454d22f200c (patch)
treef3533296fd80835cf1d545ccdd5c01ae92a3d479 /lib/public/template.php
parented14541aea648605536c8180ab56f511013bce38 (diff)
downloadnextcloud-server-b0bb64c3eebce41a35cfe6674f63f454d22f200c.tar.gz
nextcloud-server-b0bb64c3eebce41a35cfe6674f63f454d22f200c.zip
Added unit tests for relative_modified_date, changed method signature
Changed method signature of relative_modified_date template method to make it possible to add a fromTime to compare with, mostly to make it possible to test it. Added unit test for date and time cases.
Diffstat (limited to 'lib/public/template.php')
-rw-r--r--lib/public/template.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/template.php b/lib/public/template.php
index b3bffaf1af9..6349501272f 100644
--- a/lib/public/template.php
+++ b/lib/public/template.php
@@ -90,8 +90,8 @@ function human_file_size( $bytes ) {
* @param $timestamp unix timestamp
* @returns human readable interpretation of the timestamp
*/
-function relative_modified_date($timestamp, $dateOnly = false) {
- return(\relative_modified_date($timestamp, $dateOnly));
+function relative_modified_date($timestamp, $fromTime, $dateOnly = false) {
+ return(\relative_modified_date($timestamp, $fromTime, $dateOnly));
}