diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stream.php | 13 | ||||
-rw-r--r-- | lib/util.php | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/stream.php b/lib/stream.php index 4ffe27d3c..b2f57fab3 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -28,7 +28,7 @@ class StreamAction extends Action { } function views_menu() { - + $user = NULL; $action = $this->trimmed('action'); $nickname = $this->trimmed('nickname'); @@ -36,9 +36,9 @@ class StreamAction extends Action { if ($nickname) { $user = User::staticGet('nickname', $nickname); } - + common_element_start('ul', array('id' => 'nav_views')); - + common_menu_item(common_local_url('all', array('nickname' => $nickname)), _t('Personal'), @@ -46,12 +46,12 @@ class StreamAction extends Action { $action == 'all'); common_menu_item(common_local_url('showstream', array('nickname' => $nickname)), - _t('Profile'), + _t('Profile'), ($user && $user->fullname) ? $user->fullname : $nickname, $action == 'showstream'); common_element_end('ul'); } - + function show_notice($notice) { global $config; $profile = $notice->getProfile(); @@ -78,7 +78,8 @@ class StreamAction extends Action { $noticeurl = common_local_url('shownotice', array('notice' => $notice->id)); common_element_start('p', 'time'); common_element('a', array('class' => 'notice', - 'href' => $noticeurl), + 'href' => $noticeurl, + 'title' => common_exact_date($notice->created)), common_date_string($notice->created)); common_element_end('p'); common_element_end('li'); diff --git a/lib/util.php b/lib/util.php index c60dc907f..bdebbf847 100644 --- a/lib/util.php +++ b/lib/util.php @@ -731,7 +731,7 @@ function common_date_string($dt) { $diff = $now - $t; if ($now < $t) { # that shouldn't happen! - return common_simple_date($dt); + return common_exact_date($dt); } else if ($diff < 60) { return _t('a few seconds ago'); } else if ($diff < 92) { @@ -753,11 +753,11 @@ function common_date_string($dt) { } else if ($diff < 480 * 24 * 3600) { return _t('about a year ago'); } else { - return common_simple_date($dt); + return common_exact_date($dt); } } -function common_simple_date($dt) { +function common_exact_date($dt) { $t = strtotime($dt); return date(DATE_RFC822, $t); } |