Merge pull request #35 from silverstripe-scienceninjas/pull/SilverStripeNavigatorItem-merge-error

BUGFIX $date is not set on SilverStripeNavigatorItem_ArchiveLink
This commit is contained in:
Ingo Schommer 2011-12-18 09:20:49 -08:00
commit f4c3ad23de

View File

@ -298,9 +298,11 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
}
function getMessage() {
$dateObj = Object::create('Datetime');
$dateObj->setValue($date);
return "<div id=\"SilverStripeNavigatorMessage\" title=\"". _t('ContentControl.NOTEWONTBESHOWN', 'Note: this message will not be shown to your visitors') ."\">". _t('ContentController.ARCHIVEDSITEFROM', 'Archived site from') ."<br>" . $dateObj->Nice() . "</div>";
if($date = Versioned::current_archived_date()) {
$dateObj = Object::create('Datetime');
$dateObj->setValue($date);
return "<div id=\"SilverStripeNavigatorMessage\" title=\"". _t('ContentControl.NOTEWONTBESHOWN', 'Note: this message will not be shown to your visitors') ."\">". _t('ContentController.ARCHIVEDSITEFROM', 'Archived site from') ."<br>" . $dateObj->Nice() . "</div>";
}
}
function getLink() {