mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge pull request #546 from creative-commoners/pulls/3.1/remove-todo
MNT Remove TODO comments
This commit is contained in:
commit
ebc1eee21a
@ -61,9 +61,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-edit-form').entwine({
|
$('.cms-edit-form').entwine({
|
||||||
/**
|
|
||||||
* TODO: Fix with Entwine API extension. See https://github.com/silverstripe/silverstripe-subsites/pull/125
|
|
||||||
*/
|
|
||||||
getChangeTrackerOptions() {
|
getChangeTrackerOptions() {
|
||||||
// Figure out if we're still returning the default value
|
// Figure out if we're still returning the default value
|
||||||
const isDefault = (this.entwineData('ChangeTrackerOptions') === undefined);
|
const isDefault = (this.entwineData('ChangeTrackerOptions') === undefined);
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
$('select.subsitestreedropdownfield-chooser').entwine({
|
$('select.subsitestreedropdownfield-chooser').entwine({
|
||||||
onchange() {
|
onchange() {
|
||||||
// TODO Data binding between two fields
|
|
||||||
const name = this.attr('name').replace('_SubsiteID', '');
|
const name = this.attr('name').replace('_SubsiteID', '');
|
||||||
const field = $(`#Form_EditForm_${name}`).first();
|
const field = $(`#Form_EditForm_${name}`).first();
|
||||||
field.setValue(0);
|
field.setValue(0);
|
||||||
|
@ -48,18 +48,7 @@ class ErrorPageSubsite extends DataExtension
|
|||||||
$subdomainPart = "-{$subdomain}";
|
$subdomainPart = "-{$subdomain}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo implement Translatable namespace
|
$fileName = FileNameFilter::create()->filter("error-{$statusCode}{$subdomainPart}.html");
|
||||||
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);
|
|
||||||
|
|
||||||
$name = implode('/', [$static_filepath, $fileName]);
|
$name = implode('/', [$static_filepath, $fileName]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,10 +56,7 @@ class FileSubsites extends DataExtension
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
// If you're querying by ID, ignore the sub-site
|
||||||
// @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
|
|
||||||
|
|
||||||
$from = $query->getFrom();
|
$from = $query->getFrom();
|
||||||
if (isset($from['SiteTree_ImageTracking']) || $query->filtersOnID()) {
|
if (isset($from['SiteTree_ImageTracking']) || $query->filtersOnID()) {
|
||||||
return;
|
return;
|
||||||
|
@ -140,9 +140,6 @@ class SiteTreeSubsites extends DataExtension
|
|||||||
);
|
);
|
||||||
|
|
||||||
$copyAction->addExtraClass('btn btn-primary font-icon-save ml-3');
|
$copyAction->addExtraClass('btn btn-primary font-icon-save ml-3');
|
||||||
|
|
||||||
// @todo check if this needs re-implementation
|
|
||||||
// $copyAction->includeDefaultJS(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace readonly link prefix
|
// replace readonly link prefix
|
||||||
|
@ -18,10 +18,6 @@ class GridFieldSubsiteDetailFormItemRequest extends GridFieldDetailForm_ItemRequ
|
|||||||
* Builds an item edit form. The arguments to getCMSFields() are the popupController and
|
* Builds an item edit form. The arguments to getCMSFields() are the popupController and
|
||||||
* popupFormName, however this is an experimental API and may change.
|
* 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.
|
|
||||||
*
|
|
||||||
* @return Form
|
* @return Form
|
||||||
* @see GridFieldDetailForm_ItemRequest::ItemEditForm()
|
* @see GridFieldDetailForm_ItemRequest::ItemEditForm()
|
||||||
*/
|
*/
|
||||||
|
@ -583,7 +583,6 @@ class Subsite extends DataObject
|
|||||||
* If more than one permission is passed to the method, at least one of them must
|
* If more than one permission is passed to the method, at least one of them must
|
||||||
* be granted for if to return TRUE.
|
* 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 Member Member to check against. Defaults to currently logged in member
|
||||||
* @param array $permissionCodes
|
* @param array $permissionCodes
|
||||||
@ -641,7 +640,6 @@ class Subsite extends DataObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo Possible security issue, don't grant edit permissions to everybody.
|
|
||||||
* @param bool $member
|
* @param bool $member
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@ -180,8 +180,6 @@ class SubsiteDomain extends DataObject
|
|||||||
/**
|
/**
|
||||||
* Retrieves domain name with wildcards substituted with actual values
|
* Retrieves domain name with wildcards substituted with actual values
|
||||||
*
|
*
|
||||||
* @todo Refactor domains into separate wildcards / primary domains
|
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getSubstitutedDomain()
|
public function getSubstitutedDomain()
|
||||||
@ -193,7 +191,6 @@ class SubsiteDomain extends DataObject
|
|||||||
$domain = preg_replace('/\.\*$/', ".{$currentHost}", $this->Domain ?? '');
|
$domain = preg_replace('/\.\*$/', ".{$currentHost}", $this->Domain ?? '');
|
||||||
|
|
||||||
// Default to "subsite." prefix for first wildcard
|
// Default to "subsite." prefix for first wildcard
|
||||||
// TODO Whats the significance of "subsite" in this context?!
|
|
||||||
$domain = preg_replace('/^\*\./', "subsite.", $domain ?? '');
|
$domain = preg_replace('/^\*\./', "subsite.", $domain ?? '');
|
||||||
|
|
||||||
// *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com'
|
// *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com'
|
||||||
|
@ -138,7 +138,6 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest
|
|||||||
'Administrators can edit all subsites'
|
'Administrators can edit all subsites'
|
||||||
);
|
);
|
||||||
|
|
||||||
// @todo: Workaround because GroupSubsites->augmentSQL() is relying on session state
|
|
||||||
Subsite::changeSubsite($subsite1);
|
Subsite::changeSubsite($subsite1);
|
||||||
|
|
||||||
$this->logInAs($subsite1member->ID);
|
$this->logInAs($subsite1member->ID);
|
||||||
@ -153,7 +152,6 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest
|
|||||||
'Members cant edit pages on a subsite if they are not in a group belonging to this subsite'
|
'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);
|
Subsite::changeSubsite(0);
|
||||||
$this->assertFalse(
|
$this->assertFalse(
|
||||||
$mainpage->canEdit(),
|
$mainpage->canEdit(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user