Merge pull request #201 from dhensby/pulls/travis-update

Compatibility with 4.x-dev
This commit is contained in:
Damian Mooyman 2015-11-04 09:57:28 +13:00
commit b120f26484
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
language: php
php:
- 5.3
- 5.5
sudo: false
@ -12,7 +12,7 @@ env:
matrix:
include:
- php: 5.4
- php: 5.6
env: DB=MYSQL CORE_RELEASE=master
before_script:

View File

@ -433,7 +433,7 @@ class Translatable extends DataExtension implements PermissionProvider {
$translationGroupID = $this->getTranslationGroup();
if(is_numeric($translationGroupID)) {
$query = new SQLQuery(
$query = new SQLSelect(
'DISTINCT "Locale"',
sprintf(
'"%s" LEFT JOIN "%s" ON "%s"."OriginalID" = "%s"."ID"',
@ -583,9 +583,9 @@ class Translatable extends DataExtension implements PermissionProvider {
}
/**
* Check if a given SQLQuery filters on the Locale field
* Check if a given SQLSelect filters on the Locale field
*
* @param SQLQuery $query
* @param SQLSelect $query
* @return boolean
*/
protected function filtersOnLocale($query) {
@ -1634,7 +1634,7 @@ class Translatable extends DataExtension implements PermissionProvider {
*/
static function get_existing_content_languages($className = 'SiteTree', $where = '') {
$baseTable = ClassInfo::baseDataClass($className);
$query = new SQLQuery("Distinct \"Locale\"","\"$baseTable\"",$where, '', "\"Locale\"");
$query = new SQLSelect("Distinct \"Locale\"","\"$baseTable\"",$where, '', "\"Locale\"");
$dbLangs = $query->execute()->column();
$langlist = array_merge((array)Translatable::default_locale(), (array)$dbLangs);
$returnMap = array();