Partial revert of #458

Fix travis configuration
This commit is contained in:
Damian Mooyman 2016-04-28 18:05:19 +12:00
parent 3f0c04523c
commit f029bfcc61
2 changed files with 11 additions and 25 deletions

View File

@ -4,24 +4,20 @@ sudo: false
language: php language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
env:
- DB=MYSQL CORE_RELEASE=3.1
matrix: matrix:
include: include:
- php: 5.3
env: DB=MYSQL CORE_RELEASE=3.1
- php: 5.4
env: DB=MYSQL CORE_RELEASE=3.2
- php: 5.5
env: DB=MYSQL CORE_RELEASE=3.3
- php: 5.6 - php: 5.6
env: DB=MYSQL CORE_RELEASE=3 env: DB=MYSQL CORE_RELEASE=3
- php: 5.6 - php: 5.6
env: DB=MYSQL CORE_RELEASE=3.1 SECUREASSETS=1 env: DB=MYSQL CORE_RELEASE=3.1 SECUREASSETS=1
- php: 5.6 - php: 5.6
env: DB=PGSQL CORE_RELEASE=3.1 env: DB=PGSQL CORE_RELEASE=3.3
before_script: before_script:
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
@ -35,11 +31,3 @@ script:
- git remote rm origin - git remote rm origin
- git remote add origin git@github.com:silverstripe/silverstripe-userforms.git - git remote add origin git@github.com:silverstripe/silverstripe-userforms.git
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
branches:
only:
- master
matrix:
allow_failures:
- php: 7.0

View File

@ -49,12 +49,10 @@ class EditableFileField extends EditableFormField {
} }
public function getFormField() { public function getFormField() {
if(isset(Config::inst()->get('EditableFileField', 'use_uploadfield')) && Config::inst()->get('EditableFileField', 'use_uploadfield')) { $field = FileField::create($this->Name, $this->EscapedTitle)
$field = Upload::create($this->Name, $this->EscapedTitle); ->setFieldHolderTemplate('UserFormsField_holder')
} else { ->setTemplate('UserFormsFileField');
$field = FileField::create($this->Name, $this->EscapedTitle);
}
$field->setFieldHolderTemplate('UserFormsField_holder') $field->setFieldHolderTemplate('UserFormsField_holder')
->setTemplate('UserFormsFileField'); ->setTemplate('UserFormsFileField');