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

Commit

Permalink
Updating the composer tags and changing a database field for consiste…
Browse files Browse the repository at this point in the history
…ncy.
  • Loading branch information
Nathan Glasl committed May 29, 2015
1 parent 11dd110 commit c15a8ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions code/extensions/MisdirectionFallbackExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MisdirectionFallbackExtension extends DataExtension {

private static $db = array(
'FallbackRule' => 'Varchar',
'FallbackUrl' => 'Varchar(255)',
'FallbackURL' => 'Varchar(255)',
'FallbackResponse' => 'Varchar',
);

Expand Down Expand Up @@ -49,7 +49,7 @@ protected function updateFields(FieldList $fields) {
)->setRightTitle($info)->setHasEmptyDefault(true)->addExtraClass('fallback-rule');

$fields->addFieldToTab('Root.Misdirection', $field);
$fields->addFieldToTab('Root.Misdirection', TextField::create('FallbackUrl', _t('LinkMapping.FALLBACK_URL', 'To URL'))->addExtraClass('fallback-to'));
$fields->addFieldToTab('Root.Misdirection', TextField::create('FallbackURL', _t('LinkMapping.FALLBACK_URL', 'To URL'))->addExtraClass('fallback-to'));
$fields->addFieldToTab('Root.Misdirection', DropdownField::create(
'FallbackResponse',
_t('LinkMapping.FALLBACK_RESPONSE', 'Response Code'),
Expand Down
4 changes: 2 additions & 2 deletions code/services/MisdirectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function determineFallback($URL) {
if($config && $config->FallbackRule) {
$thisPage = $nearestParent = Director::baseURL();
$applicableRule = $config->FallbackRule;
$specificURL = $config->FallbackUrl;
$specificURL = $config->FallbackURL;
$responseCode = $config->FallbackResponse;
}

Expand All @@ -259,7 +259,7 @@ public function determineFallback($URL) {
if($page->FallbackRule) {
$parentID = $page->ID;
$applicableRule = $page->FallbackRule;
$specificURL = $page->FallbackUrl;
$specificURL = $page->FallbackURL;
$thisPage = $link;
$responseCode = $page->FallbackResponse;
}
Expand Down
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
"type": "silverstripe-module",
"keywords": [
"silverstripe",
"redirect",
"link mapping",
"rewrite",
"regular expression",
"regex",
"request",
"response"
"URL",
"page not found",
"404",
"redirect"
],
"homepage": "https://github.com/nglasl/silverstripe-misdirection",
"license": "BSD-3-Clause",
Expand Down

0 comments on commit c15a8ff

Please # to comment.