Skip to content
Snippets Groups Projects
Commit 00679961 authored by Vincent Petry's avatar Vincent Petry
Browse files

Fixed missing default values

Added default value for $fromTime to prevent missing argument errors and
keep backward compatible.
parent b0bb64c3
Branches
No related tags found
No related merge requests found
......@@ -104,9 +104,9 @@ function strip_time($timestamp){
* @param bool $dateOnly whether to strip time information
* @return formatted timestamp
*/
function relative_modified_date($timestamp, $fromTime, $dateOnly = false) {
function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) {
$l=OC_L10N::get('lib');
if (!isset($fromTime)){
if (!isset($fromTime) || $fromTime === null){
$fromTime = time();
}
if ($dateOnly){
......
......@@ -90,7 +90,7 @@ function human_file_size( $bytes ) {
* @param $timestamp unix timestamp
* @returns human readable interpretation of the timestamp
*/
function relative_modified_date($timestamp, $fromTime, $dateOnly = false) {
function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) {
return(\relative_modified_date($timestamp, $fromTime, $dateOnly));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment