Fixed 3.x deprecations, updated dep from 3.1 to 3.2

This commit is contained in:
Ingo Schommer 2015-04-28 23:47:17 +12:00
parent 94945a49cd
commit 05b4b84f19
4 changed files with 7 additions and 13 deletions

View File

@ -6,12 +6,7 @@ php:
- 5.4
env:
- DB=MYSQL CORE_RELEASE=3.1
matrix:
include:
- php: 5.4
env: DB=MYSQL CORE_RELEASE=3
- DB=MYSQL CORE_RELEASE=3
before_script:
- pear -q install --onlyreqdeps pear/PHP_CodeSniffer

View File

@ -5,7 +5,6 @@
## Introduction ##
Allows translation of DataObject and SiteTree records into multiple languages.
Note: This module was originally part of the SilverStripe CMS 2.x codebase.
## Usage
@ -13,7 +12,7 @@ Note: This module was originally part of the SilverStripe CMS 2.x codebase.
## Requirements ##
* SilverStripe Framework 3.1+ and CMS 3.1+
* SilverStripe Framework 3.2+ and CMS 3.2+
## Maintainers ##

View File

@ -561,10 +561,10 @@ class Translatable extends DataExtension implements PermissionProvider {
if($this->owner && $this->translatableFields === null) {
$this->translatableFields = array_merge(
array_keys($this->owner->db()),
array_keys($this->owner->has_many()),
array_keys($this->owner->many_many())
array_keys($this->owner->hasMany()),
array_keys($this->owner->manyMany())
);
foreach (array_keys($this->owner->has_one()) as $fieldname) {
foreach (array_keys($this->owner->hasOne()) as $fieldname) {
$this->translatableFields[] = $fieldname.'ID';
}
}

View File

@ -15,8 +15,8 @@
"require":
{
"php": ">=5.3.2",
"silverstripe/framework": "~3.1",
"silverstripe/cms": "~3.1"
"silverstripe/framework": "~3.2",
"silverstripe/cms": "~3.2"
},
"require-dev": {
"silverstripe/postgresql": "*",