Browse files

Fixed syntax errors

  • Loading branch information...
1 parent 688984c commit 828d04e12802d32efb189fae6de8f3b5ca12cc38 Aram Balakjian committed Oct 23, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 code/DataObjects/DataObjectAsPage.php
View
5 code/DataObjects/DataObjectAsPage.php
@@ -579,8 +579,9 @@ public function AbsoluteLink($action = null)
*/
public function LinkingMode()
{
+ $listingClass = $this->stat('listing_page_class');
//Check that we have a controller to work with and that it is a listing page
- if(($controller = Controller::Curr()) && (Controller::curr() instanceof $this->stat('listing_page_class')))
+ if(($controller = Controller::Curr()) && (Controller::curr() instanceof $listingClass))
{
//check that the action is 'show' and that we have an item to work with
if($controller->getAction() == 'show' && $item = $controller->getCurrentItem())
@@ -641,7 +642,7 @@ public function LookForExistingURLSegment($URLSegment, $ID)
return DataObjectAsPage::get()->filter(array(
'URLSegment' => $URLSegment,
'ID' => $ID
- )->exists();
+ ))->exists();
}
/**

0 comments on commit 828d04e

Please sign in to comment.