mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Use 3.2 compatible API
This commit is contained in:
parent
e6c8dff7be
commit
5b9af35566
@ -30,5 +30,5 @@ before_script:
|
||||
- php ~/travis-support/travis_setup_php54_webserver.php --if-env BEHAT_TEST
|
||||
|
||||
script:
|
||||
- "if [ \"$BEHAT_TEST\" = \"\" ]; then phpunit subsites/tests; fi"
|
||||
- "if [ \"$BEHAT_TEST\" = \"\" ]; then vendor/bin/phpunit subsites/tests; fi"
|
||||
- "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat @subsites; fi"
|
||||
|
@ -57,7 +57,7 @@ class FileSubsites extends DataExtension {
|
||||
/**
|
||||
* Update any requests to limit the results to the current site
|
||||
*/
|
||||
public function augmentSQL(SQLSelect $query) {
|
||||
public function augmentSQL(SQLQuery &$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)
|
||||
|
@ -107,7 +107,7 @@ class GroupSubsites extends DataExtension implements PermissionProvider {
|
||||
/**
|
||||
* Update any requests to limit the results to the current site
|
||||
*/
|
||||
public function augmentSQL(SQLSelect $query) {
|
||||
public function augmentSQL(SQLQuery &$query) {
|
||||
if(Subsite::$disable_subsite_filter) 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
|
||||
*/
|
||||
public function augmentSQL(SQLSelect $query) {
|
||||
public function augmentSQL(SQLQuery &$query) {
|
||||
if(Subsite::$disable_subsite_filter) return;
|
||||
|
||||
// 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
|
||||
*/
|
||||
public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) {
|
||||
public function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
|
||||
if(Subsite::$disable_subsite_filter) return;
|
||||
if($dataQuery->getQueryParam('Subsite.filter') === false) return;
|
||||
|
||||
|
@ -14,6 +14,9 @@
|
||||
"silverstripe/framework": "~3.2",
|
||||
"silverstripe/cms": "~3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/PHPUnit": "~3.7@stable"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Subsites\Test\Behaviour;
|
||||
|
||||
if(!class_exists('SilverStripe\BehatExtension\Context\SilverStripeContext')) return;
|
||||
|
||||
use SilverStripe\BehatExtension\Context\SilverStripeContext,
|
||||
SilverStripe\BehatExtension\Context\BasicContext,
|
||||
SilverStripe\BehatExtension\Context\LoginContext,
|
||||
|
Loading…
Reference in New Issue
Block a user