Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
FIX, vanity mappings that are pointed to another page now update corr…
Browse files Browse the repository at this point in the history
…ectly.
  • Loading branch information
Nathan Glasl committed Mar 27, 2017
1 parent d78a758 commit 1d94402
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/extensions/SiteTreeMisdirectionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public function updateSettingsFields($fields) {
'VanityHeader',
'Vanity'
));
if($this->owner->VanityMapping()->RedirectPageID !== $this->owner->ID) {

// The mapping may have been pointed to another page.

$this->owner->VanityMappingID = 0;
}
$fields->addFieldToTab('Root.Misdirection', TextField::create(
'VanityURL',
'URL',
Expand Down

0 comments on commit 1d94402

Please sign in to comment.