Permalink
Browse files

The page view button links were not working too well when editing the…

… dataobject i.e. Draft and Published buttons. For example clicking on Draft button was just showing the published page. This modification seems to resolve the problem.
  • Loading branch information...
1 parent 6be1ae6 commit 3e3f795de579c8b9c03ab2237cf3741176b623a9 @jamesbolitho committed Jun 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/DataObjects/DataObjectAsPage.php
@@ -145,13 +145,13 @@ public function getCMSFields()
if($this->ID)
{
$color = '#E88F31';
- $links = '<a target="_blank" href="' . $this->Link('?stage=Stage') . '">Draft</a>';
+ $links = '<a target="_blank" href="' . $this->Link() . '?stage=Stage">Draft</a>';
$status = $this->Status;
if($this->Status == 'Published')
{
$color = '#000';
- $links .= ' | <a target="_blank" href="' . $this->Link('?stage=Live') . '">Published</a>';
+ $links .= ' | <a target="_blank" href="' . $this->Link() . '?stage=Live">Published</a>';
if($this->hasChangesOnStage())
{

0 comments on commit 3e3f795

Please sign in to comment.