mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
4.x core compat
This commit is contained in:
parent
bfc70f9b06
commit
5604879146
@ -7,7 +7,7 @@ php:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- CORE_RELEASE=3
|
- CORE_RELEASE=master
|
||||||
matrix:
|
matrix:
|
||||||
- DB=MYSQL
|
- DB=MYSQL
|
||||||
- DB=PGSQL
|
- DB=PGSQL
|
||||||
|
@ -53,7 +53,7 @@ If more isolation of code, security, or performance is needed, then consider run
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* SilverStripe 3.1
|
* SilverStripe 4.x
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class FileSubsites extends DataExtension {
|
|||||||
/**
|
/**
|
||||||
* Update any requests to limit the results to the current site
|
* Update any requests to limit the results to the current site
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLQuery &$query) {
|
public function augmentSQL(SQLSelect $query) {
|
||||||
if(Subsite::$disable_subsite_filter) return;
|
if(Subsite::$disable_subsite_filter) 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 - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
||||||
|
@ -107,7 +107,7 @@ class GroupSubsites extends DataExtension implements PermissionProvider {
|
|||||||
/**
|
/**
|
||||||
* Update any requests to limit the results to the current site
|
* Update any requests to limit the results to the current site
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLQuery &$query) {
|
public function augmentSQL(SQLSelect $query) {
|
||||||
if(Subsite::$disable_subsite_filter) return;
|
if(Subsite::$disable_subsite_filter) return;
|
||||||
if(Cookie::get('noSubsiteFilter') == 'true') return;
|
if(Cookie::get('noSubsiteFilter') == 'true') return;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class SiteConfigSubsites extends DataExtension {
|
|||||||
/**
|
/**
|
||||||
* Update any requests to limit the results to the current site
|
* Update any requests to limit the results to the current site
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLQuery &$query) {
|
public function augmentSQL(SQLSelect $query) {
|
||||||
if(Subsite::$disable_subsite_filter) return;
|
if(Subsite::$disable_subsite_filter) return;
|
||||||
|
|
||||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
||||||
|
@ -25,7 +25,7 @@ class SiteTreeSubsites extends DataExtension {
|
|||||||
/**
|
/**
|
||||||
* Update any requests to limit the results to the current site
|
* Update any requests to limit the results to the current site
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
|
public function augmentSQL(SQLSelect $query, DataQuery &$dataQuery = null) {
|
||||||
if(Subsite::$disable_subsite_filter) return;
|
if(Subsite::$disable_subsite_filter) return;
|
||||||
if($dataQuery->getQueryParam('Subsite.filter') === false) return;
|
if($dataQuery->getQueryParam('Subsite.filter') === false) return;
|
||||||
|
|
||||||
|
@ -11,15 +11,15 @@
|
|||||||
],
|
],
|
||||||
"require":
|
"require":
|
||||||
{
|
{
|
||||||
"silverstripe/framework": "~3.2",
|
"silverstripe/framework": "~4.0",
|
||||||
"silverstripe/cms": "~3.2"
|
"silverstripe/cms": "~4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/PHPUnit": "~3.7@stable"
|
"phpunit/PHPUnit": "~3.7@stable"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.1.x-dev"
|
"dev-master": "1.2.x-dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user