From: moodler Date: Thu, 15 Feb 2007 03:14:40 +0000 (+0000) Subject: Merged removal of weeks from format_time from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a59e5a1c920def487532af0c75a0f79d3fbdfa50;p=moodle.git Merged removal of weeks from format_time from stable --- diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 59a3da9f23..e1ab129bbd 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1474,7 +1474,6 @@ $string['visibletostudents'] = 'Visible to $a'; $string['warningdeleteresource'] = 'Warning: $a is referred in a resource. Would you like to update the resource?'; $string['webpage'] = 'Web page'; $string['week'] = 'Week'; -$string['weeks'] = 'weeks'; $string['weekhide'] = 'Hide this week from $a'; $string['weeklyoutline'] = 'Weekly outline'; $string['weekshow'] = 'Show this week to $a'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index d65b5b4146..345b476a90 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -911,7 +911,6 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, * @uses MINSECS * @uses HOURSECS * @uses DAYSECS - * @uses WEEKSECS * @uses YEARSECS * @param int $totalsecs ? * @param array $str ? @@ -932,15 +931,11 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, $str->secs = get_string('secs'); $str->year = get_string('year'); $str->years = get_string('years'); - $str->week = get_string('week'); - $str->weeks = get_string('weeks'); } $years = floor($totalsecs/YEARSECS); $remainder = $totalsecs - ($years*YEARSECS); - $weeks = floor($remainder/WEEKSECS); - $remainder = $totalsecs - ($weeks*WEEKSECS); $days = floor($remainder/DAYSECS); $remainder = $totalsecs - ($days*DAYSECS); $hours = floor($remainder/HOURSECS); @@ -952,25 +947,21 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, $sm = ($mins == 1) ? $str->min : $str->mins; $sh = ($hours == 1) ? $str->hour : $str->hours; $sd = ($days == 1) ? $str->day : $str->days; - $sw = ($weeks == 1) ? $str->week : $str->weeks; $sy = ($years == 1) ? $str->year : $str->years; $oyears = ''; - $oweeks = ''; $odays = ''; $ohours = ''; $omins = ''; $osecs = ''; if ($years) $oyears = $years .' '. $sy; - if ($weeks) $oweeks = $weeks .' '. $sw; if ($days) $odays = $days .' '. $sd; if ($hours) $ohours = $hours .' '. $sh; if ($mins) $omins = $mins .' '. $sm; if ($secs) $osecs = $secs .' '. $ss; - if ($years) return $oyears .' '. $oweeks; - if ($weeks) return $oweeks .' '. $odays; + if ($years) return $oyears .' '. $odays; if ($days) return $odays .' '. $ohours; if ($hours) return $ohours .' '. $omins; if ($mins) return $omins .' '. $osecs; diff --git a/user/index.php b/user/index.php index 007a6c4e30..889b327d5e 100644 --- a/user/index.php +++ b/user/index.php @@ -90,6 +90,8 @@ $strnever = get_string('never'); + $datestring->year = get_string('year'); + $datestring->years = get_string('years'); $datestring->day = get_string('day'); $datestring->days = get_string('days'); $datestring->hour = get_string('hour');