diff --git a/code/Location.php b/code/Location.php index 6d715be..41dcbcd 100644 --- a/code/Location.php +++ b/code/Location.php @@ -71,7 +71,7 @@ public function getCoords() // custom labels for fields public function fieldLabels($includerelations = true) { - $labels = parent::fieldLabels(); + $labels = parent::fieldLabels($includerelations); $labels['Title'] = 'Name'; $labels['Suburb'] = 'City'; @@ -99,7 +99,7 @@ public function getCMSFields() EmailField::create('Email', 'Email'), TextField::create('Website') ->setAttribute('placeholder', 'http://'), - DropDownField::create('CategoryID', 'Category', LocationCategory::get()->map('ID', 'Title')) + DropdownField::create('CategoryID', 'Category', LocationCategory::get()->map('ID', 'Title')) ->setEmptyString('-- select --'), CheckboxField::create('ShowInLocator', 'Show in results') ->setDescription('Location will be included in results list'), @@ -142,22 +142,22 @@ public function EmailAddress() * * @return bool */ - public function canView($member = false) + public function canView($member = null) { return true; } - public function canEdit($member = false) + public function canEdit($member = null) { return Permission::check('Location_EDIT'); } - public function canDelete($member = false) + public function canDelete($member = null) { return Permission::check('Location_DELETE'); } - public function canCreate($member = false) + public function canCreate($member = null) { return Permission::check('Location_CREATE'); } diff --git a/code/Locator.php b/code/Locator.php index c23e884..61b0d31 100644 --- a/code/Locator.php +++ b/code/Locator.php @@ -212,7 +212,7 @@ public function LocationSearch() $locatorCategories = Locator::getPageCategories($this->ID); - if (LocationCategory::get()->Count() > 0 && $locatorCategories && $locatorCategories->Count() != 1) { + if (LocationCategory::get()->count() > 0 && $locatorCategories && $locatorCategories->count() != 1) { $categories = LocationCategory::get(); if ($categories->count() > 0) {