4.x core compat

This commit is contained in:
Ingo Schommer 2015-04-30 22:39:22 +12:00
parent bfc70f9b06
commit 5604879146
7 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ php:
env:
global:
- CORE_RELEASE=3
- CORE_RELEASE=master
matrix:
- DB=MYSQL
- DB=PGSQL

View File

@ -53,7 +53,7 @@ If more isolation of code, security, or performance is needed, then consider run
## Requirements
* SilverStripe 3.1
* SilverStripe 4.x
## Installation

View File

@ -57,7 +57,7 @@ class FileSubsites extends DataExtension {
/**
* 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 you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)

View File

@ -107,7 +107,7 @@ class GroupSubsites extends DataExtension implements PermissionProvider {
/**
* 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(Cookie::get('noSubsiteFilter') == 'true') return;

View File

@ -12,7 +12,7 @@ class SiteConfigSubsites extends DataExtension {
/**
* 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 you're querying by ID, ignore the sub-site - this is a bit ugly...

View File

@ -25,7 +25,7 @@ class SiteTreeSubsites extends DataExtension {
/**
* 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($dataQuery->getQueryParam('Subsite.filter') === false) return;

View File

@ -11,15 +11,15 @@
],
"require":
{
"silverstripe/framework": "~3.2",
"silverstripe/cms": "~3.2"
"silverstripe/framework": "~4.0",
"silverstripe/cms": "~4.0"
},
"require-dev": {
"phpunit/PHPUnit": "~3.7@stable"
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
"dev-master": "1.2.x-dev"
}
}
}