Browse files

BUGFIX Making LeftAndMain->PreviewLink() an "opt-in", returning false…

… by default to avoid adverse effects from loading unpreviewable items like users or filesystem folders - see CMSMain for sample implementation
  • Loading branch information...
1 parent 96d18ef commit 7be28d5714d96cc5f64da2ac6627b6527bc6384b @chillu chillu committed Oct 29, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 admin/code/LeftAndMain.php
View
4 admin/code/LeftAndMain.php
@@ -1100,9 +1100,7 @@ public function isCurrentPage(DataObject $record) {
* @return String|boolean
*/
public function PreviewLink() {
- $record = $this->getRecord($this->currentPageID());
- $baseLink = ($record && $record instanceof Page) ? $record->Link('?stage=Stage') : Director::absoluteBaseURL();
- return $baseLink;
+ return false;
}
/**

0 comments on commit 7be28d5

Please sign in to comment.