public static function formatTimestamp($stamp) { wfProfileIn(__METHOD__); $ago = time() - strtotime($stamp) + 1; if ($ago < 7 * 86400) { $res = parent::formatTimestamp($stamp); } else { $res = ''; } wfProfileOut(__METHOD__); return $res; }
<li class="activity-type-<?php echo UserContributionsRenderer::getIconType($row); ?> "> <?php print FeedRenderer::getSprite($row, $assets['blank']); ?> <a href="<?php echo htmlspecialchars($row['url']); ?> " class="title" rel="nofollow"><?php echo htmlspecialchars($row['title']); ?> </a> <cite><?php echo FeedRenderer::formatTimestamp($row['timestamp']); ?> </cite> <?php echo FeedRenderer::getDiffLink($row); ?> </li> <?php } ?> </ul> <?php } else { echo wfMsgExt('myhome-user-contributions-empty', array('parse')); }