Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Remove TODO comments #546

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions client/src/js/LeftAndMain_Subsites.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
});

$('.cms-edit-form').entwine({
/**
* TODO: Fix with Entwine API extension. See https://github.com/silverstripe/silverstripe-subsites/pull/125
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #541

getChangeTrackerOptions() {
// Figure out if we're still returning the default value
const isDefault = (this.entwineData('ChangeTrackerOptions') === undefined);
Expand Down
1 change: 0 additions & 1 deletion client/src/js/SubsitesTreeDropdownField.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
$('select.subsitestreedropdownfield-chooser').entwine({
onchange() {
// TODO Data binding between two fields
const name = this.attr('name').replace('_SubsiteID', '');
const field = $(`#Form_EditForm_${name}`).first();
field.setValue(0);
Expand Down
13 changes: 1 addition & 12 deletions src/Extensions/ErrorPageSubsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,7 @@ public function updateErrorFilename(&$name, &$statusCode)
$subdomainPart = "-{$subdomain}";
}

// @todo implement Translatable namespace
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
if (singleton(SiteTree::class)->hasExtension('Translatable')
&& $locale
&& $locale != Translatable::default_locale()
) {
$fileName = "error-{$statusCode}-{$locale}{$subdomainPart}.html";
} else {
$fileName= "error-{$statusCode}{$subdomainPart}.html";
}

$fileName = FileNameFilter::create()->filter($fileName);

$fileName = FileNameFilter::create()->filter("error-{$statusCode}{$subdomainPart}.html");
$name = implode('/', [$static_filepath, $fileName]);
}
}
5 changes: 1 addition & 4 deletions src/Extensions/FileSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
return;
}

// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
// @TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and
// ManyManyList::removeAll() changing the from table after this function is called there isn't much of a choice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #542

// If you're querying by ID, ignore the sub-site
$from = $query->getFrom();
if (isset($from['SiteTree_ImageTracking']) || $query->filtersOnID()) {
return;
Expand Down
3 changes: 0 additions & 3 deletions src/Extensions/SiteTreeSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ public function updateCMSFields(FieldList $fields)
);

$copyAction->addExtraClass('btn btn-primary font-icon-save ml-3');

// @todo check if this needs re-implementation
// $copyAction->includeDefaultJS(false);
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
}

// replace readonly link prefix
Expand Down
4 changes: 0 additions & 4 deletions src/Forms/GridFieldSubsiteDetailFormItemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class GridFieldSubsiteDetailFormItemRequest extends GridFieldDetailForm_ItemRequ
* Builds an item edit form. The arguments to getCMSFields() are the popupController and
* popupFormName, however this is an experimental API and may change.
*
* @todo In the future, we will probably need to come up with a tigher object representing a partially
* complete controller with gaps for extra functionality. This, for example, would be a better way
* of letting Security/login put its log-in form inside a UI specified elsewhere.
*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #544

* @return Form
* @see GridFieldDetailForm_ItemRequest::ItemEditForm()
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Model/Subsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ public static function writeHostMap($file = null)
* If more than one permission is passed to the method, at least one of them must
* be granted for if to return TRUE.
*
* @todo Allow permission inheritance through group hierarchy.
*
* @param Member Member to check against. Defaults to currently logged in member
* @param array $permissionCodes
Expand Down Expand Up @@ -641,7 +640,6 @@ public static function hasMainSitePermission($member = null, $permissionCodes =
}

/**
* @todo Possible security issue, don't grant edit permissions to everybody.
* @param bool $member
* @return bool
*/
Expand Down
3 changes: 0 additions & 3 deletions src/Model/SubsiteDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ public function getFullProtocol()
/**
* Retrieves domain name with wildcards substituted with actual values
*
* @todo Refactor domains into separate wildcards / primary domains
*
* @return string
*/
public function getSubstitutedDomain()
Expand All @@ -193,7 +191,6 @@ public function getSubstitutedDomain()
$domain = preg_replace('/\.\*$/', ".{$currentHost}", $this->Domain ?? '');

// Default to "subsite." prefix for first wildcard
// TODO Whats the significance of "subsite" in this context?!
$domain = preg_replace('/^\*\./', "subsite.", $domain ?? '');

// *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com'
Expand Down
2 changes: 0 additions & 2 deletions tests/php/SiteTreeSubsitesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public function testCanEditSiteTree()
'Administrators can edit all subsites'
);

// @todo: Workaround because GroupSubsites->augmentSQL() is relying on session state
Subsite::changeSubsite($subsite1);

$this->logInAs($subsite1member->ID);
Expand All @@ -153,7 +152,6 @@ public function testCanEditSiteTree()
'Members cant edit pages on a subsite if they are not in a group belonging to this subsite'
);

// @todo: Workaround because GroupSubsites->augmentSQL() is relying on session state
Subsite::changeSubsite(0);
$this->assertFalse(
$mainpage->canEdit(),
Expand Down