mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Merge pull request #201 from dhensby/pulls/travis-update
Compatibility with 4.x-dev
This commit is contained in:
commit
b120f26484
@ -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:
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user