mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Fixed minor bug w/ SilverStripeNavigatorItem query.
This commit is contained in:
parent
afcacde5df
commit
cd02c5502a
@ -159,7 +159,7 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
|||||||
return "<a class=\"current\">". _t('ContentController.ARCHIVEDSITE', 'Archived Site') ."</a>";
|
return "<a class=\"current\">". _t('ContentController.ARCHIVEDSITE', 'Archived Site') ."</a>";
|
||||||
} else {
|
} else {
|
||||||
// Display the archive link if the page currently displayed in the CMS is other version than live and draft
|
// Display the archive link if the page currently displayed in the CMS is other version than live and draft
|
||||||
$currentDraft = Versioned::get_one_by_stage('SiteTree', 'Draft', '"SiteTree"."ID" = ' . $page->ID);
|
$currentDraft = Versioned::get_one_by_stage('SiteTree', 'Stage', '"SiteTree"."ID" = ' . $page->ID);
|
||||||
$currentLive = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree"."ID" = ' . $page->ID);
|
$currentLive = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree"."ID" = ' . $page->ID);
|
||||||
if(
|
if(
|
||||||
(!$currentDraft || ($currentDraft && $page->Version != $currentDraft->Version))
|
(!$currentDraft || ($currentDraft && $page->Version != $currentDraft->Version))
|
||||||
|
Loading…
Reference in New Issue
Block a user