diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-07-19 18:45:40 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-01 08:20:16 +0200 |
commit | b53c4c0db9379e48ab0792cd31d09d8134a8c490 (patch) | |
tree | ac4a06d26405a9d1685ef3d4571c7f330ec4794d /lib/private/legacy/template/functions.php | |
parent | a4ffbc09eced10ecd1482bb9837b40a771e4538b (diff) | |
download | nextcloud-server-b53c4c0db9379e48ab0792cd31d09d8134a8c490.tar.gz nextcloud-server-b53c4c0db9379e48ab0792cd31d09d8134a8c490.zip |
Fix template functions
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/legacy/template/functions.php')
-rw-r--r-- | lib/private/legacy/template/functions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 65179a94108..d1818a9a072 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -250,7 +250,7 @@ function mimetype_icon( $mimetype ) { * make preview_icon available as a simple function * Returns the path to the preview of the image. * @param string $path path of file - * @return link to the preview + * @return string link to the preview */ function preview_icon( $path ) { return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]); @@ -258,6 +258,8 @@ function preview_icon( $path ) { /** * @param string $path + * @param string $token + * @return string */ function publicPreview_icon ( $path, $token ) { return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]); @@ -289,8 +291,8 @@ function strip_time($timestamp){ * Formats timestamp relatively to the current time using * a human-friendly format like "x minutes ago" or "yesterday" * @param int $timestamp timestamp to format - * @param int $fromTime timestamp to compare from, defaults to current time - * @param bool $dateOnly whether to strip time information + * @param int|null $fromTime timestamp to compare from, defaults to current time + * @param bool|null $dateOnly whether to strip time information * @return string timestamp */ function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) { |