Commit Graph

3309 Commits

Author SHA1 Message Date
Ingo Schommer
60294654d9 Merge pull request #6056 from open-sausages/pulls/4.0/fix-file-validation
BUG Fix invalid file uploads not being validated
2016-09-22 16:22:01 +12:00
Damian Mooyman
e8375111b1
API Enable default value to be specified for dbstring types at the db level
Fixes #1409
2016-09-22 15:19:30 +12:00
Damian Mooyman
9a9cd97bc3 BUG Fix invalid file uploads not being validated 2016-09-22 14:55:06 +12:00
Sam Minnee
2e054af7b1 FIX: Throw more helpful error if tests are run badly.
If you run tests outside of a composer autoloader-based environment, or
your autoloader isn’t pulling in Constants.php, everything will break.

This provides a more helpful error message.
2016-09-21 09:43:14 +12:00
Sam Minnee
07396e4437 NEW: Move Travis behat test to run locally.
This shifts the behat test run to be triggered form composer activity
within the framework module directly,

 * silverstripe/serve is used to provide a webserver, based on the
   php -S command
 * se/selenium-server-standalone is used to install selenium rather than
   a download command

Because we’re using serve, the behat configuration can be locked down.

Further refinements could be made on this:

 * the behat-extension could be responsible for installing and
   starting/stopping selenium, making these tests more portable
 * xvfb initialisation could be provided with another bin tool in the
   begat-extension: vendor/bin/xvfb 1024x768
 * The bootstrap-file argument to serve could be provided as part of a
   composer.json setting. This would make it easier for developers to
   start a dev server simply by running vendor/bin/serve
 * the behat-extension could be responsible for installing and
   starting/stopping silverstripe/serve, removing the need for
   specifying base_url at all, and possibly utilising the same bootstrap
   file between serve and behat.
2016-09-17 15:40:37 +12:00
Sam Minnee
61d7c3af28 FIX: Fix tests when running directly from framework. 2016-09-17 15:40:32 +12:00
Sam Minnee
9dd5ebee8c NEW: Don’t set up SilverStripe project for test run
The SilverStripe project structure complicates the travis test run, and
the goal of this branch is to prevent it from being necessary.

 - Unit tests can be run simply with PHPUnit.
 - Behat test can be run with the silverstripe/serve module

Note that initially this commit doesn’t cater to the behat tests.

As part of this, we allow dev packages to be installed when testing

These settings don’t affect projects that use framework, only when
framework’s composer install / require calls are used themselves.

Since SS4 is pre-stable, these are important. They can probably be
removed once SS4 stable (and stable versions of support packages) have
been released.
2016-09-16 16:16:44 +12:00
Sam Minnee
93a0122c0f FIX: Don’t treat URLs as root relative when FRAMEWORK_DIR = “”
Code was assuming that FRAMEWORK_DIR would always have a value. If it
doesn’t (because you’re running a test instance of a naked framework)
This caused URLs to be treated as root relative, which creates some
duplicate-inclusion bugs.

The use of ltrim() works, but is a bit clumsy. A more flexible approach
to including front-end assets of given modules would be preferable;
ideally something that also let you keep your code outside of the
web root.
2016-09-16 16:16:39 +12:00
Ingo Schommer
8f23fa99a5 API Moved CMS-specific JavaScript to admin/thirdparty
The 'admin' module will be split off from 'framework',
where 'framework' only provides (mostly) frontend-agnostic PHP classes.
For example, HTMLEditorField.php has a TinyMCEConfig.php driver,
but doesn't come with its own JS includes.
2016-09-16 13:46:10 +12:00
Ingo Schommer
7d67b24c25 API Removed legacy Jasmine JS Unit tests
They were used for TreeDropdownField JavaScript tests but were never run
on CI, hence have been a bit of a wasted effort.

We're using a different JS unit testing solution now (geared towards React),
and running Jasmine in parallel on Travis for a few test cases
doesn't warrant the setup effort involved.

The TreeDropdownField component will eventually move to a React solution
which can be developed in a test-driven fashion.
2016-09-16 13:46:10 +12:00
Daniel Hensby
a9df28c791
Merge branch '3.4' into 3 2016-09-14 11:40:15 +01:00
Christopher Joe
ee5b4fd8d3 Tabs support in new file/image editor
Introducing <Tabs> component based on react-bootstrap
Better support for nested fields in FormBuilder
Tweaks to get FormBuilder working with frameworktest BasicFieldsPage fields
Added exception in FormBuilder when Component is defined but not found
Added check in SingleSelectField for empty value before adding one in
Added temporary workaround for CompositeFields with no name (another story to address the actual problem)
Added asset_preview_height for File image preview, matches the defined CSS max-height
Added documentation to DBFile::PreviewLink() method
2016-09-14 14:08:59 +12:00
Sam Minnee
aecf5260fc API: Remove TextParser and BBCodeParser
These have been archived at
https://github.com/silverstripe-archive/silverstripe-bbcodeparser
2016-09-14 09:10:49 +12:00
Damian Mooyman
c6457c50e9
API Allow has_many fixtures to be declared with array format as well as many_many (#5944)
BUG Fix issue with parsing of extrafields in fixtures
BUG Fix issue in duplicate relation name, and ensure FixtureBlueprint fails on these
2016-09-12 14:01:08 +01:00
Damian Mooyman
bfd9cb1aca Rename SS_ prefixed classes (#5974) 2016-09-09 18:43:05 +12:00
Damian Mooyman
8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00
Daniel Hensby
918fb94396
Merge branch '3' 2016-09-07 09:31:23 +01:00
Daniel Hensby
3fd9fe3aa0
Merge branch '3.4' into 3 2016-09-07 09:22:06 +01:00
Ingo Schommer
3b71b7731a Merge pull request #5943 from open-sausages/pulls/4.0/template-lookup-redux
API Update template lookup to late resolution for performance reasons
2016-09-06 20:27:11 +12:00
Damian Mooyman
efb004b72a
API use injector for DataObject::newClassInstance()
API Fail on invalid class type change
2016-09-06 14:10:51 +12:00
Damian Mooyman
c9b6e9bac0
API Update template lookup to late resolution for performance reasons
API Update behaviour of form fields to use standard template lookup mechanism
API Support custom "type" parameter to template lookup
2016-09-06 12:54:03 +12:00
Damian Mooyman
7105099497
API Change behaviour of filter API to support injected search filter classes
API Remove DataList::applyFilterContext(), superseded by DataList::createSearchFilter()
API SearchFilter::getSupportedModifiers() added to support supported modifier inspection
2016-09-05 17:28:36 +12:00
Damian Mooyman
fc353dc17a API Allow has_many fixtures to be declared with array format as well as many_many (#5944)
BUG Fix issue with parsing of extrafields in fixtures
BUG Fix issue in duplicate relation name, and ensure FixtureBlueprint fails on these
2016-09-05 16:58:36 +12:00
Daniel Hensby
f2ed59e185
FIX Empty dmyfields on DateField now validate as true 2016-09-01 11:55:17 +01:00
Christopher Joe
d7663e850e Remove duplicate props for PopoverField, added FormBuilder->handleAction and flattened state data 2016-08-28 13:07:30 +12:00
Daniel Hensby
1d1227cc9a
Merge branch '3' 2016-08-23 10:37:47 +01:00
Daniel Hensby
058f57979b
Merge branch '3.4' into 3 2016-08-22 16:23:22 +01:00
Daniel Hensby
060bf6b327
Merge branch '3.3' into 3.4 2016-08-22 16:22:37 +01:00
Daniel Hensby
088d88e978
Merge branch '3.2' into 3.3 2016-08-22 16:22:02 +01:00
Daniel Hensby
4998b80445
FIX ArrayList sorting now caseinsensitive 2016-08-22 11:21:50 +01:00
Damian Mooyman
59efd280ad Fix issues with CMS permission codes
Standardise template locations
Move CMSSettingsController class to SiteConfig module
Fix CMSMenu behaviour for namespaced admin sections
Split classes into one per file
Manual fixes and cleanup
2016-08-17 11:19:14 +12:00
Damian Mooyman
db34e011f3 Apply SilverStripe\Admin namespace 2016-08-17 11:12:22 +12:00
Damian Mooyman
d88516203c Merge 3.4 into 3 2016-08-15 19:05:20 +12:00
Damian Mooyman
bbc865ff67 Merge 3.4.1 into 3.4 2016-08-15 18:37:55 +12:00
Damian Mooyman
b0ba2015d9 [ss-2016-015] Fix value / title escaping in CheckboxSetField and OptionsetField 2016-08-15 15:53:21 +12:00
Damian Mooyman
049cdefacf [ss-2016-015] Fix value / title escaping in CheckboxSetField and OptionsetField 2016-08-15 15:02:58 +12:00
Damian Mooyman
12a6b357e7 [ss-2016-015] Fix value / title escaping in CheckboxSetField and OptionsetField 2016-08-15 14:14:42 +12:00
Damian Mooyman
62a242154e [ss-2016-015] Fix value / title escaping in CheckboxSetField and OptionsetField 2016-08-15 13:24:06 +12:00
Damian Mooyman
ed7fe65156 BUG Fix usage of $this as closure argument 2016-08-12 09:49:23 +12:00
Jonathon Menz
d4114b3dce FIX include related fields on canFilter() check
closes #5576
2016-08-11 10:26:18 -07:00
Damian Mooyman
6005a1c2b2 API Upgrade for silverstripe CMS namespace changes 2016-08-11 11:51:02 +12:00
Damian Mooyman
7026da20db
BUG Make template lookup use 'type' correctly 2016-08-10 15:52:15 +12:00
Hamish Friedlander
0fa39b591f Merge pull request #5874 from open-sausages/pulls/4.0/fix-incorrect-versioned-basetable
BUG Fix incorrect use of baseClass as baseTable
2016-08-10 07:17:44 +07:00
Damian Mooyman
cb1f4335a0
API remove DataFormatter class and all subclasses
Cleanup of #5461
2016-08-09 15:49:11 +12:00
Damian Mooyman
01a13dcba9
BUG Fix incorrect use of baseClass as baseTable 2016-08-08 17:44:46 +12:00
Damian Mooyman
7de5b998e1 Merge 3.4 into 3 2016-08-05 19:12:25 +12:00
Damian Mooyman
ca754eb887 Merge 3.3 into 3.4
# Conflicts:
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/src/fa_IR.js
#	admin/javascript/lang/src/it.js
#	lang/cs.yml
#	lang/eo.yml
#	lang/fa_IR.yml
#	lang/fi.yml
#	lang/it.yml
#	lang/sk.yml
2016-08-05 16:48:26 +12:00
Paul Clarke
b9445511b7 Bootstrap GridField 2016-08-03 18:35:18 +12:00
Daniel Hensby
e7c6509196
Merge remote-tracking branch 'cow/pulls/3.3/check-isset-config' into 3.3 2016-08-02 12:00:04 +01:00
Damian Mooyman
4ca3d1dc94 API Allow custom 'type' option for scripts
Fixes #5829
2016-08-02 18:49:13 +12:00
Damian Mooyman
cd80d501f9
BUG Fix unset config options returning isset() = true
Fixes #4791
2016-08-02 18:07:55 +12:00
Damian Mooyman
9188628ae3 API Add $action parameter to Controller::Link 2016-08-02 10:27:55 +12:00
Damian Mooyman
7d0b8e6520 BUG Fix permission checking code not correctly handling escaped SQL identifiers
Fixes https://github.com/silverstripe/silverstripe-installer/issues/96
2016-08-01 18:15:30 +12:00
Sam Minnée
c5d662b4fe Merge pull request #5832 from open-sausages/pulls/4.0/bootify-forms-addpage
Add page styles based on new bootstrap forms
2016-07-28 18:13:25 +12:00
Hamish Friedlander
4d2fd04c64 FIX Behat preview mode finder being too specific (#5846) 2016-07-28 17:59:31 +12:00
Damian Mooyman
6e74b57c36 BUG Fix issue with gulpfile.js not compiling client/src/legacy dir
BUG Make SelectionGroup.ss and SelectionGroup.js work together
BUG Fix for IE visual indentation of composite field
2016-07-28 16:32:40 +12:00
Damian Mooyman
20daf1f8e1
API Abstract ThemeManifest into ThemeList
BUG Fix Requirements not resolving $default theme
2016-07-21 12:11:25 +12:00
Daniel Hensby
f548ddf8a8
Merge branch '3' 2016-07-20 21:44:47 +01:00
Daniel Hensby
340a48306b
Merge branch '3.4' into 3 2016-07-20 19:48:17 +01:00
Daniel Hensby
cf247534d5
Merge branch '3.3' into 3.4 2016-07-20 19:43:41 +01:00
Daniel Hensby
96b061ffff
Merge branch '3.2' into 3.3 2016-07-20 19:41:46 +01:00
Daniel Hensby
ac17e12464
Merge pull request #3274 from colymba/custom-admin-url 2016-07-19 14:42:25 +01:00
Damian Mooyman
4b4aa4e91c API Exclude templates in 'themes' directories from $default theme (#5820)
API $themes parameter is now mandatory in TemplateLoader::findTemplate()
2016-07-19 13:17:07 +12:00
madmatt
43dcde5197 FIX: Hierarchy was incorrectly unexpanding nodes that had been previously expanded 2016-07-19 11:22:36 +12:00
Loz Calver
0a7e4cf7c3
Merge branch '3' 2016-07-15 16:01:48 +01:00
Loz Calver
391161208e
Merge branch '3.4' into 3 2016-07-15 14:34:50 +01:00
Loz Calver
44d7919496
Merge branch '3.3' into 3.4 2016-07-15 14:34:18 +01:00
Loz Calver
b3fea3723f
FIX: Fixes support for "inline" form actions (fixes #2534) 2016-07-15 10:11:47 +01:00
Sam Minnée
5c98d331a3 Merge pull request #5804 from open-sausages/feature/themestack
API Theme stacking
2016-07-15 17:12:54 +12:00
Hamish Friedlander
b8b4e98ac2 API Theme stacking 2016-07-15 16:29:25 +12:00
Damian Mooyman
5cb4ab4a82 API Add PopoverField for extra-actions popup in react 2016-07-15 15:46:11 +12:00
Daniel Hensby
a64a066bbf Merge pull request #5665 from tractorcow/pulls/3.3/fix-button-clicked
BUG Fix buttonClicked() error
2016-07-15 00:30:25 +01:00
Daniel Hensby
b7fc0a2752 Merge pull request #5790 from patricknelson/issue-5784-email-reply-to
FIX for #5784: Email API improvements, documentation cleanup.
2016-07-15 00:23:25 +01:00
Patrick Nelson
74c555e004 FIX for #5784: Added ->setReplyTo(), deprecated ->replyTo() for API consistency. Revamping, fixing, and enhancing internal Email API documentation. Simplified code and brought up-to-date with latest standards. 2016-07-14 10:25:40 -07:00
Daniel Hensby
d19955afc8
Merge branch '3' 2016-07-14 14:05:18 +01:00
Daniel Hensby
4c40cf8dbb
Merge branch '3.4' into 3 2016-07-14 12:01:19 +01:00
Daniel Hensby
d766c8559b
Merge branch '3.3' into 3.4 2016-07-14 11:57:15 +01:00
Damian Mooyman
83c2af72ca BUG Fix some regressions from #5653 (#5806) 2016-07-14 14:43:53 +12:00
Damian Mooyman
3b43145954 Merge pull request #5735 from silverstripe-terraformers/versions
FIX: Saving null values to the _versions table.
2016-07-14 13:30:30 +12:00
Damian Mooyman
26d46517ac
API Remove custom DBHTMLText::exists() custom behaviour
Fix merge regressions
2016-07-13 18:45:57 +12:00
Damian Mooyman
6a7c1056fe BUG Fix shortcode parsing in HTMLEditorField::getanchors()
Fixes #5678
2016-07-13 17:15:45 +12:00
Damian Mooyman
b7ac5c564d API / BUG Fix DBField summary methods
Cleanup DBField subclasses
Fixes #2929
Fixes #1381
Fixes #5547
Fixes #1751
2016-07-13 17:15:45 +12:00
Damian Mooyman
5c9044a007 API Enforce default_cast for all field usages
API Introduce HTMLFragment as casting helper for HTMLText with shortcodes disabled
API Introduce DBField::CDATA for XML file value encoding
API RSSFeed now casts from the underlying model rather than by override
API Introduce CustomMethods::getExtraMethodConfig() to allow metadata to be queried
BUG Remove _call hack from VirtualPage
API Remove FormField::$dontEscape
API Introduce HTMLReadonlyField for non-editable readonly HTML
API FormField::Field() now returns string in many cases rather than DBField instance.
API Remove redundant *_val methods from ViewableData
API ViewableData::obj() no longer has a $forceReturnObject parameter as it always returns an object
BUG  Fix issue with ViewableData caching incorrect field values after being modified.
API Remove deprecated DB class methods
API Enforce plain text left/right formfield titles
2016-07-13 17:15:45 +12:00
Damian Mooyman
a0213aa2bf BUG Fix HTTP url rewriting 2016-07-13 17:15:45 +12:00
Frank Mullenger
6d835a64ad FIX: Saving null values to the _versions table. 2016-07-13 16:48:42 +12:00
Damian Mooyman
24efc7edf8 BUG Fix sorting ArrayList with sql-like syntax
Replaces #5726
2016-07-12 17:00:17 +12:00
Daniel Hensby
5776a03141
Merge branch '3' 2016-07-11 23:45:41 +01:00
Florian Thoma
9fc51dc527 add async and defer attributes to js requirements, replaces #4555 2016-07-08 14:31:39 +10:00
Daniel Hensby
8a21d53a07
Merge branch '3.4' into 3 2016-07-07 10:28:49 +01:00
Daniel Hensby
55e1fd8782
Merge branch '3.3' into 3.4 2016-07-07 10:28:17 +01:00
Daniel Hensby
ce47f8112b
Merge branch '3.2' into 3.3 2016-07-07 10:27:25 +01:00
Loz Calver
27cea80b15 FIX: SS_ConfigStaticManifest_Parser failed to handle ::class syntax (fixes #5701) (#5781) 2016-07-07 10:23:38 +01:00
Damian Mooyman
af22a83166 API Apply Framework\Security namespace 2016-07-07 11:32:28 +12:00
Chris Joe
dfe375e87e Fix MemberDatetime helper description, and shifted them to templates (#5766)
* Fix MemberDatetime helper description, and shifted them to templates

* added descriptionTemplate for setting the description

* Unit test for description with templates
2016-07-06 09:16:27 +01:00
Daniel Hensby
a449045b09
Merge branch '3.4' into 3 2016-07-04 23:54:27 +01:00
Daniel Hensby
c35dc508cb
Merge branch '3.3' into 3.4 2016-07-04 23:53:55 +01:00
Daniel Hensby
dfc557afd4
Merge branch '3.2' into 3.3 2016-07-04 23:43:44 +01:00
Daniel Hensby
39238d908e
FIX falsey attribute values in shortcodes now work 2016-07-04 15:17:24 +01:00
Daniel Hensby
765f45eaf1
Check for shortcode tag before trying to parse shortcodes 2016-07-04 15:10:42 +01:00
Daniel Hensby
2cdfe6cc21
FIX Use RAW for DBField template helpers 2016-07-04 14:39:56 +01:00
Daniel Hensby
b0f237bb3a
FIX Use RAW instead of Value for parsing shortcodes 2016-07-04 13:53:56 +01:00
Damian Mooyman
4dadc276b5 Merge pull request #3916 from dhensby/nfauchelle-gd-padding-improvementt
NEW Allow the paddedresize to take another hex value to specify a transparency on the padded color
2016-07-04 17:35:47 +12:00
Christopher Joe
1931ed497f Fix unit test for xml content check 2016-07-04 17:25:53 +12:00
Ingo Schommer
ff846134f2 Merge pull request #5734 from open-sausages/pulls/4.0/namespace-orm
API Apply Framework\ORM Namespace to model
2016-07-01 15:04:47 +12:00
Daniel Hensby
9b061edb44 Merge pull request #5605 from open-sausages/pulls/3.3/fix-cmsall-perm
BUG fix CMS_ACCESS permission being ignored if in incorrect order in array
2016-06-29 15:25:21 +01:00
Daniel Hensby
f728b144ca
Merge branch '3' 2016-06-29 11:44:18 +01:00
Daniel Hensby
390b1fc6c4
Merge branch '3.4' into 3 2016-06-29 11:43:02 +01:00
Daniel Hensby
2ab0dcf618
Merge branch '3.3' into 3.4 2016-06-29 11:42:05 +01:00
Daniel Hensby
da0b62f853
Merge branch '3.2' into 3.3 2016-06-29 11:40:58 +01:00
Daniel Hensby
3fe8d30c2c
Merge branch '3.1' into 3.2 2016-06-29 11:40:27 +01:00
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00
Damian Mooyman
fd9f29c515 Merge pull request #5732 from open-sausages/pulls/4.0/convert-lowercase
Convert::upperCamelToLowerCamel()
2016-06-29 09:48:35 +12:00
Daniel Hensby
c11ac5d248 Merge pull request #4162 from kinglozzer/pulls/object-parse-class-spec
FIX: Object::parse_class_spec failed to parse associative arrays
2016-06-28 16:07:12 +01:00
Damian Mooyman
f1a0aef0d7
BUG fix CMS_ACCESS permission being ignored if in incorrect order in array 2016-06-28 17:45:15 +12:00
Damian Mooyman
24bea79cd9 Merge pull request #5481 from mikenz/file-name-filter-test
Explictly set the FileNameFilter replacements before testing them
2016-06-28 17:03:19 +12:00
Ingo Schommer
fd0c8ad4c0 Convert::upperCamelToLowerCamel()
Used to expose lowercase web service object keys in SS4,
without requiring an explicit field mapping for these.

The first use case is exposing File data:
[ID => 99, FileName => 'test'] becomes {"id": 99, "fileName": "test"} in JSON.
2016-06-23 12:27:54 +12:00
Hamish Friedlander
51d53f4b50 Merge pull request #5646 from open-sausages/pulls/4.0/config-table-name
API Allow table_name to be declared / introduce DataObjectSchema
2016-06-14 15:06:38 +12:00
Daniel Hensby
9e3f76832b
Merge branch '3' 2016-06-13 13:41:20 +01:00
Daniel Hensby
0d36899afa
Merge branch '3.4' into 3 2016-06-13 12:30:33 +01:00
Daniel Hensby
4e392a4d43
Merge branch '3.3' into 3.4 2016-06-13 12:30:16 +01:00
Damian Mooyman
5e8ae41d47 API Refactor dataobject schema management into separate service
API Allow table_name to be configured via Config
2016-06-08 13:22:56 +12:00
Damian Mooyman
bf00810e1f
BUG Fix buttonClicked() error
Fixes #3208
2016-06-08 12:26:11 +12:00
Loz Calver
429ce55756
FIX: ViewableData::setFailover() didn't remove cached methods 2016-06-07 16:17:49 +01:00
Sam Minnee
a9eebdc7ed NEW: Allow namespaces in template include statements. 2016-06-07 14:36:00 +12:00
Sam Minnee
65eb0bde6a API: Look for templates of namespaced classes in subfolders.
This change will mean that SilverStripe\Control\Controller will look for its
template in templates/SilverStripe/Control/Controller.ss.

In order to preserve some backwards campatibility, non-namespaced classes
can have the templates stored in any template subfolder, but once you
add a namespace to a class, the namespaced path expression will need to
be a subfolder of <module>/templates or themes/<theme>/templates.

Layout and Content templates are stil supported as special template type,
Includes still functions but is a no-op. Other template subfolders should
not be used.
2016-06-07 14:36:00 +12:00
Loz Calver
946495bcf5
FIX: Regression with <% with / %> (fixes #5656) 2016-06-06 10:14:07 +01:00
Nick
dae2295e16
NEW Allow the paddedresize to take another hex value to specify a transparency on the padded color 2016-06-05 00:05:37 +01:00
Antony Thorpe
39d1ef7a4b Bugfix: BulkLoader_Result class - Deleted Items (#5598)
* Bugfix: BulkLoader_Result class - Deleted Items

The Deleted function, within BulkLoader_Result class, calls mapToArrayList, which tries to find the recently deleted dataobjects.
To correct:
- when calling addDeleted, store a map of each dataobject within the $this->deleted array; and,
- have the Deleted function return an ArrayList based upon the $this->deleted array.

* Added tests

- created a new test file for the BulkLoader_Result class
- included tests for other methods of this class
- slightly altered the addDeleted function to be consistent other methods of this class
2016-06-01 09:55:06 +12:00
Simon Erkelens
20fac04637 RFC #5487 Remove Oembed in favor of embed/embed. (#5536) 2016-05-27 13:09:03 +12:00
Daniel Hensby
e5f1ca3bbe
Cleaning up Controller::handleRequest
1. Separated responsibility of handleAction so that it no longer bootstraps the controller and cleans up after the request is handled.
2. NEW beforeHandleRequest to take responsibility of bootstrapping the controller
3. NEW afterHandleRequest to take responsibility of cleanup for the controller
4. NEW calling init on controllers deprecated in favour of callInit() which takes responsibility of enforcing that "base init" is called and the before and after hooks
5. NEW Added prepareResponse to Controller for dealing with responses from controllers
6. NEW setResponse added to controller for setting response objects on the controller
2016-05-23 00:21:04 +01:00
Damian Mooyman
decd7e5c57
BUG Fix getFinalisedQuery not including all queried columns
Fixes #1669
2016-05-23 08:41:58 +12:00
Daniel Hensby
cdb0b07345
Merge branch '3' 2016-05-20 14:20:33 +01:00
Daniel Hensby
be7e0db26e
Merge pull request #3835 from dnadesign/hideFromHierachy3 2016-05-19 11:52:47 +01:00
Damian Mooyman
b634b1a67d Merge pull request #5537 from IgorNadj/patch-niceformats
ENH: moving hardcoded nice date/time formats to config
2016-05-19 14:12:22 +12:00
Damian Mooyman
6035be7e57 Merge pull request #5548 from kinglozzer/4661-extrafields-casting
FIX: castingHelper failed to find many_many_extraFields data (fixes #4661)
2016-05-19 14:10:37 +12:00
Damian Mooyman
574bc6038b Merge 3 into master
# Conflicts:
#	CONTRIBUTING.md
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.EditForm.js
#	admin/javascript/LeftAndMain.js
#	admin/scss/_forms.scss
#	dev/Debug.php
#	docs/en/05_Contributing/01_Code.md
#	forms/DropdownField.php
#	model/DataObject.php
#	model/Versioned.php
#	model/fieldtypes/DBLocale.php
#	tests/forms/gridfield/GridFieldExportButtonTest.yml
#	tests/model/MoneyTest.php
#	tests/model/MoneyTest.yml
#	tests/model/SQLQueryTest.php
2016-05-18 18:36:10 +12:00
Damian Mooyman
303f695751 Merge 3.3 into 3
# Conflicts:
#	admin/javascript/LeftAndMain.EditForm.js
2016-05-18 17:29:30 +12:00
Damian Mooyman
dad7981332 Merge 3.2 into 3.3 2016-05-18 17:27:28 +12:00
Damian Mooyman
8dfeeb0eb6 Merge 3.1 into 3.2 2016-05-18 17:25:42 +12:00
Hamish Friedlander
d350aa4153 Merge pull request #5555 from open-sausages/pulls/3.1/fix-display-errors
BUG Fix suppression of display_errors in ErrorControlChain
2016-05-18 16:04:57 +12:00
Damian Mooyman
62bd26d11a BUG Fix suppression of display_errors in ErrorControlChain 2016-05-18 13:36:54 +12:00
Damian Mooyman
8ed25ae482 BUG Fix DataObject::isChanged() detecting non saveable changes (#5545) 2016-05-18 09:00:04 +10:00
Loz Calver
7a81372294 FIX: castingHelper failed to find many_many_extraFields data (fixes #4661) 2016-05-17 16:04:28 +01:00
Damian Mooyman
8947bb0245 BUG Fix filtersOnId ignoring WHERE "ID" IN () (#5546) 2016-05-17 18:30:33 +12:00
Shawn Lin
2a856300c0 Fix bug, export button cannot export value '0' 2016-05-16 16:49:10 +12:00
John Milmine
c401d9daff new added hide_from_cms_tree and hide_from_hierarchy 2016-05-16 16:20:14 +12:00
Damian Mooyman
4d1ddf0e62
BUG Prevent session hijackers from resetting a user password
BUG Member::checkPassword incorrect for default admin
2016-05-16 10:54:18 +12:00
Igor Nadj
c8eda9fd5c ENH: moving hardcoded nice date/time formats to config
Old PR: #4449
2016-05-15 21:25:57 +12:00
Daniel Hensby
8ebdedf330 Merge pull request #5488 from robbieaverill/bugfix/4835-array-to-string
Fix for array to string conversion in DropdownField
2016-05-13 13:54:04 +01:00
Robbie Averill
7d7800e5e7 Fix for array to string conversion in DropdownField
* Resolves #4835
* Add unit test to cover array values
* Add value assertion
2016-05-13 10:11:42 +12:00
Daniel Hensby
0594542e7f
Merge branch '3' 2016-05-12 16:42:48 +01:00
Daniel Hensby
19a4a40d8b
Merge branch '3.3' into 3 2016-05-12 16:25:22 +01:00
Daniel Hensby
264d7e8ffe
Merge branch '3.2' into 3.3 2016-05-12 16:23:57 +01:00
Daniel Hensby
e8962b95d0
Merge branch '3.1' into 3.2 2016-05-12 16:05:54 +01:00
Loz Calver
5b275376d3
Many many bug 2016-05-12 12:38:04 +01:00
Daniel Hensby
dd554d883f
Proving bug with Deep nested many_many relations
When adding a filter to a many_many with a shared inheritance, the FROM table is removed and added as a LEFT JOIN which causes a syntax error.

This means `$dataList->filter('ManyManyRel.ID', array(1,2))` doesn't work.
2016-05-12 12:38:02 +01:00
Damian Mooyman
f13e44a265 Merge 3 into master
# Conflicts:
#	admin/javascript/LeftAndMain.Tree.js
#	admin/javascript/lang/cs.js
#	admin/javascript/lang/de.js
#	admin/javascript/lang/en.js
#	admin/javascript/lang/eo.js
#	admin/javascript/lang/es.js
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/fi.js
#	admin/javascript/lang/fr.js
#	admin/javascript/lang/id.js
#	admin/javascript/lang/id_ID.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/ja.js
#	admin/javascript/lang/lt.js
#	admin/javascript/lang/mi.js
#	admin/javascript/lang/nb.js
#	admin/javascript/lang/nl.js
#	admin/javascript/lang/pl.js
#	admin/javascript/lang/ro.js
#	admin/javascript/lang/ru.js
#	admin/javascript/lang/sk.js
#	admin/javascript/lang/sl.js
#	admin/javascript/lang/sr.js
#	admin/javascript/lang/sr@latin.js
#	admin/javascript/lang/sr_RS.js
#	admin/javascript/lang/sr_RS@latin.js
#	admin/javascript/lang/src/cs.js
#	admin/javascript/lang/src/de.js
#	admin/javascript/lang/src/en.js
#	admin/javascript/lang/src/eo.js
#	admin/javascript/lang/src/es.js
#	admin/javascript/lang/src/fi.js
#	admin/javascript/lang/src/fr.js
#	admin/javascript/lang/src/id.js
#	admin/javascript/lang/src/id_ID.js
#	admin/javascript/lang/src/it.js
#	admin/javascript/lang/src/ja.js
#	admin/javascript/lang/src/lt.js
#	admin/javascript/lang/src/mi.js
#	admin/javascript/lang/src/nb.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/src/pl.js
#	admin/javascript/lang/src/ro.js
#	admin/javascript/lang/src/ru.js
#	admin/javascript/lang/src/sk.js
#	admin/javascript/lang/src/sl.js
#	admin/javascript/lang/src/sr.js
#	admin/javascript/lang/src/sr@latin.js
#	admin/javascript/lang/src/sr_RS.js
#	admin/javascript/lang/src/sr_RS@latin.js
#	admin/javascript/lang/src/sv.js
#	admin/javascript/lang/src/zh.js
#	admin/javascript/lang/sv.js
#	admin/javascript/lang/zh.js
#	css/GridField.css
#	forms/gridfield/GridFieldExportButton.php
#	javascript/GridField.js
#	javascript/lang/ar.js
#	javascript/lang/cs.js
#	javascript/lang/de.js
#	javascript/lang/en.js
#	javascript/lang/en_GB.js
#	javascript/lang/eo.js
#	javascript/lang/es.js
#	javascript/lang/fi.js
#	javascript/lang/fr.js
#	javascript/lang/id.js
#	javascript/lang/id_ID.js
#	javascript/lang/it.js
#	javascript/lang/ja.js
#	javascript/lang/lt.js
#	javascript/lang/mi.js
#	javascript/lang/nb.js
#	javascript/lang/nl.js
#	javascript/lang/pl.js
#	javascript/lang/ru.js
#	javascript/lang/sk.js
#	javascript/lang/sl.js
#	javascript/lang/sr.js
#	javascript/lang/sr@latin.js
#	javascript/lang/sr_RS.js
#	javascript/lang/sr_RS@latin.js
#	javascript/lang/src/ar.js
#	javascript/lang/src/cs.js
#	javascript/lang/src/de.js
#	javascript/lang/src/en.js
#	javascript/lang/src/eo.js
#	javascript/lang/src/es.js
#	javascript/lang/src/fi.js
#	javascript/lang/src/fr.js
#	javascript/lang/src/id.js
#	javascript/lang/src/id_ID.js
#	javascript/lang/src/it.js
#	javascript/lang/src/ja.js
#	javascript/lang/src/lt.js
#	javascript/lang/src/mi.js
#	javascript/lang/src/nb.js
#	javascript/lang/src/nl.js
#	javascript/lang/src/pl.js
#	javascript/lang/src/ru.js
#	javascript/lang/src/sk.js
#	javascript/lang/src/sl.js
#	javascript/lang/src/sr.js
#	javascript/lang/src/sr@latin.js
#	javascript/lang/src/sr_RS.js
#	javascript/lang/src/sr_RS@latin.js
#	javascript/lang/src/sv.js
#	javascript/lang/src/zh.js
#	javascript/lang/sv.js
#	javascript/lang/zh.js
#	scss/GridField.scss
#	tests/model/ManyManyListTest.php
#	tests/model/SQLQueryTest.php
2016-05-11 15:19:35 +12:00
Damian Mooyman
4f06a43986 Merge 3.3 into 3
# Conflicts:
#	admin/javascript/lang/src/cs.js
#	admin/javascript/lang/src/de.js
#	admin/javascript/lang/src/en.js
#	admin/javascript/lang/src/eo.js
#	admin/javascript/lang/src/es.js
#	admin/javascript/lang/src/fi.js
#	admin/javascript/lang/src/fr.js
#	admin/javascript/lang/src/id.js
#	admin/javascript/lang/src/id_ID.js
#	admin/javascript/lang/src/it.js
#	admin/javascript/lang/src/ja.js
#	admin/javascript/lang/src/lt.js
#	admin/javascript/lang/src/mi.js
#	admin/javascript/lang/src/nb.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/src/pl.js
#	admin/javascript/lang/src/ro.js
#	admin/javascript/lang/src/ru.js
#	admin/javascript/lang/src/sk.js
#	admin/javascript/lang/src/sl.js
#	admin/javascript/lang/src/sr.js
#	admin/javascript/lang/src/sr@latin.js
#	admin/javascript/lang/src/sr_RS.js
#	admin/javascript/lang/src/sr_RS@latin.js
#	admin/javascript/lang/src/sv.js
#	admin/javascript/lang/src/zh.js
#	javascript/lang/fr.js
#	javascript/lang/src/ar.js
#	javascript/lang/src/cs.js
#	javascript/lang/src/de.js
#	javascript/lang/src/en.js
#	javascript/lang/src/eo.js
#	javascript/lang/src/es.js
#	javascript/lang/src/fi.js
#	javascript/lang/src/fr.js
#	javascript/lang/src/id.js
#	javascript/lang/src/id_ID.js
#	javascript/lang/src/it.js
#	javascript/lang/src/ja.js
#	javascript/lang/src/lt.js
#	javascript/lang/src/mi.js
#	javascript/lang/src/nb.js
#	javascript/lang/src/nl.js
#	javascript/lang/src/pl.js
#	javascript/lang/src/ru.js
#	javascript/lang/src/sk.js
#	javascript/lang/src/sl.js
#	javascript/lang/src/sr.js
#	javascript/lang/src/sr@latin.js
#	javascript/lang/src/sr_RS.js
#	javascript/lang/src/sr_RS@latin.js
#	javascript/lang/src/sv.js
#	javascript/lang/src/zh.js
#	lang/it.yml
2016-05-11 14:06:23 +12:00
Damian Mooyman
b165d52f30 Merge 3.2 into 3.3 2016-05-11 14:00:10 +12:00
Damian Mooyman
9da594b326 Merge 3.1 into 3.2
# Conflicts:
#	admin/javascript/lang/cs.js
#	admin/javascript/lang/de.js
#	admin/javascript/lang/eo.js
#	admin/javascript/lang/es.js
#	admin/javascript/lang/fa_IR.js
#	admin/javascript/lang/fi.js
#	admin/javascript/lang/fr.js
#	admin/javascript/lang/id.js
#	admin/javascript/lang/id_ID.js
#	admin/javascript/lang/it.js
#	admin/javascript/lang/ja.js
#	admin/javascript/lang/lt.js
#	admin/javascript/lang/mi.js
#	admin/javascript/lang/nb.js
#	admin/javascript/lang/nl.js
#	admin/javascript/lang/pl.js
#	admin/javascript/lang/ro.js
#	admin/javascript/lang/ru.js
#	admin/javascript/lang/sk.js
#	admin/javascript/lang/sl.js
#	admin/javascript/lang/sr.js
#	admin/javascript/lang/sr@latin.js
#	admin/javascript/lang/sr_RS.js
#	admin/javascript/lang/sr_RS@latin.js
#	admin/javascript/lang/src/nl.js
#	admin/javascript/lang/sv.js
#	admin/javascript/lang/zh.js
#	javascript/lang/ar.js
#	javascript/lang/bg.js
#	javascript/lang/cs.js
#	javascript/lang/de.js
#	javascript/lang/eo.js
#	javascript/lang/es.js
#	javascript/lang/fa_IR.js
#	javascript/lang/fi.js
#	javascript/lang/fr.js
#	javascript/lang/id.js
#	javascript/lang/id_ID.js
#	javascript/lang/it.js
#	javascript/lang/ja.js
#	javascript/lang/lt.js
#	javascript/lang/mi.js
#	javascript/lang/nb.js
#	javascript/lang/nl.js
#	javascript/lang/pl.js
#	javascript/lang/ru.js
#	javascript/lang/sk.js
#	javascript/lang/sl.js
#	javascript/lang/sr.js
#	javascript/lang/sr@latin.js
#	javascript/lang/sr_RS.js
#	javascript/lang/sr_RS@latin.js
#	javascript/lang/sv.js
#	javascript/lang/zh.js
#	lang/nl.yml
#	lang/sk.yml
2016-05-11 13:48:22 +12:00
Damian Mooyman
01eaf9ed64 Merge 3.3.2 into 3.3 2016-05-11 13:33:45 +12:00
Damian Mooyman
b612c0549d Merge 3.1.19 into 3.1 2016-05-11 13:15:10 +12:00
Daniel Hensby
971d561633
Allow ManyManyListTest to run standalone 2016-05-10 15:24:07 +01:00
Daniel Hensby
c97d3961e5 Merge pull request #4869 from kinglozzer/2617-include-scopes
FIX: Parameters passed to includes overwrite all scopes (fixes #2617)
2016-05-10 15:21:45 +01:00
Daniel Hensby
d5ff8ff5f3 Merge pull request #5499 from kinglozzer/sqlselect-count-int
FIX: SQLSelect count methods now cast to int (fixes #5498)
2016-05-10 13:44:30 +01:00
Daniel Hensby
63e363b55c Merge pull request #5461 from Firesphere/master
RFC #5347 remove RestfulService from SS4.
2016-05-10 12:51:01 +01:00
Loz Calver
d1df67d308
FIX: SQLSelect count methods now cast to int (fixes #5498) 2016-05-10 12:31:45 +01:00
Loz Calver
6430c66303 Merge pull request #5426 from tractorcow/pulls/3.3/fix-gridfield-autocomplete
BUG Fix GridFieldAddExistingAutocompleter
2016-05-10 09:34:59 +01:00
Loz Calver
196c211984 Merge pull request #5425 from tractorcow/pulls/4.0/error-invalid-relationships
API Filtering on invalid relation is no longer a silent error
2016-05-10 09:27:31 +01:00
Simon Erkelens
c0de5dd11e RFC #5347 remove RestfulService from SS4. Rebuild OEmbed on using curl 2016-05-10 18:55:08 +12:00
Craig Weber
e732aee6eb Fixes #3182 Fixes lazy loading of fields when query was created in default stage
When a DataObject query is created in the default stage (stage.Stage), then the
stage is changed to something else (stage.Live), the query itself runs
correctly against stage.Stage. However, lazy loaded fields incorrectly run
against stage.Live. This is due to DataQuery parameters not being saved when
the default stage is active.

This commit fixes this bug by always saving query params, even when the default
stage was active at the time of query creation.
2016-05-10 15:44:22 +12:00
Cochrane, Mike
faffdf4981 Explictly set the FileNameFilter replacements before relying on them 2016-05-09 20:12:29 +12:00
Cochrane, Mike
e2d180a754 Explictly set the FileNameFilter replacements before testing them 2016-05-09 20:03:58 +12:00
Damian Mooyman
8b94dd83df API Add CSRF to Campaign delete 2016-05-09 17:33:10 +12:00
Frank Mullenger
b4cd617ee3 FIX: Renaming to HTMLEditorConfig.
FIX: Renaming to HTMLEditorField*.

FIX: Renaming to HTMLEditorSanitiser*.
2016-05-06 14:16:34 +12:00
Daniel Hensby
d1751e3310
Merge remote-tracking branch '3.2.4' into 3.3.2 2016-05-05 12:33:21 +01:00
Daniel Hensby
cf29b2c146
Merge remote-tracking branch '3.1.19' into 3.2.4 2016-05-05 11:17:45 +01:00
Daniel Hensby
b11bbffb7d
Merge branch '3' 2016-05-04 23:36:10 +01:00
Daniel Hensby
457931d664
Merge branch '3.3' into 3 2016-05-04 23:32:10 +01:00
Loz Calver
24660afabd
FIX: Parameters passed to includes overwrite all scopes (fixes #2617) 2016-05-04 16:49:12 +01:00
Loz Calver
4bd9a04896 Merge pull request #5440 from tractorcow/pulls/4.0/api-explicit-injector-inheritance
API Injector dependencies no longer inherit from parent classes
2016-05-04 09:31:51 +01:00
Damian Mooyman
4bc04e795a Excuse php7 errors due to regressions in 7.0.6 2016-05-04 16:33:40 +12:00
Christopher Darling
220290d61c test to prove #5222 2016-05-04 12:05:02 +12:00
Damian Mooyman
8ce3d90e18 API Injector dependencies no longer inherit from parent classes automatically
API Allow classes to inherit service definitions explicitly
2016-05-03 18:39:31 +12:00
Damian Mooyman
0d4c71f393 API Filtering on invalid relation is no longer a silent error
Fixes #5331
2016-05-03 17:51:16 +12:00
Damian Mooyman
f88d708ee9 BUG Fix GridFieldAddExistingAutocompleter and GridFieldExportButton
Based on https://github.com/silverstripe/silverstripe-framework/pull/5426
Fixes #5267
2016-05-03 17:45:46 +12:00
Damian Mooyman
70480f5ee4 [ss-2015-027] FIX HtmlEditorField_Toolbar#viewfile not whitelisting URLs
Fixes #4947
2016-05-03 15:29:18 +12:00
Damian Mooyman
096f30ebe5 BUG Fix GridFieldAddExistingAutocompleter
This fix exchanges references to sub-components by ID with class references
Fixes #5382
2016-05-03 14:28:41 +12:00
Damian Mooyman
e7d5c92ec1 Fix merge regressions 2016-05-02 09:08:37 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Daniel Hensby
8673ac15bc
MINOR Empty YAML config causes invalid argument error 2016-04-26 12:58:27 +01:00
Loz Calver
61a9b2a41a
FIX: GridFieldPaginator now prevents viewing pages with no results (fixes #3192) 2016-04-26 09:34:03 +01:00
Damian Mooyman
da8f4a7eb6 Merge pull request #3828 from dhensby/pulls/byids-arraylist
API `byIDs` added to `ArrayList`
2016-04-26 17:52:22 +12:00
David Craig
7fcdf35438 Add DetailEditForm to Campaign admin
- Add edit form to campaigns section
- Handle form submissions with FormBuilder
- Handle form state via Redux
- Garbage collect form state
- Removes $itemID as a required param for schema requests.
  Developers should be able to scaffold forms without populating
  values from an existing record. For example when building a form for creating new records.
2016-04-26 15:32:07 +12:00
Daniel Hensby
679185514d
Merge 3.3 into 3
Conflicts:
	admin/css/screen.css.map
2016-04-26 00:24:59 +01:00
Daniel Hensby
745faebd81
Merge 3.2 into 3.3
Conflicts:
	.travis.yml
2016-04-26 00:17:09 +01:00
Daniel Hensby
a0812f987a
Merge 3.1 into 3.2
Conflicts:
	admin/javascript/LeftAndMain.js
	control/HTTPRequest.php
	docs/en/00_Getting_Started/00_Server_Requirements.md
2016-04-26 00:09:33 +01:00
Damian Mooyman
daf5385833 API Change in behaviour to flysystem reporting for root folders
See 847841974f
2016-04-26 09:36:08 +12:00
Damian Mooyman
8b239a5011 Docs and tests for exempt validation actions 2016-04-22 14:52:38 +12:00
Damian Mooyman
fa5b8b8fb1 BUG Fix error when modals are displayed 2016-04-22 10:31:49 +12:00
JorisDebonnet
9eac541740 Enhance GD::greyscale to allow darker or lighter results, and change color weights for greyscale (#5332)
Tweaking the first three parameters (R, G, B) allows you to get a different mix of colors into grey, but it does not allow you to make the result lighter or darker because their total is normalized. This is quite a common operation on greyscaled images though, so I added a fourth parameter: brightness. It defaults to 100% so that it does not have any effect when not used (making this backwards compatible). $brightness = 50 will make it darker, $brightness = 150 will overlight it.
2016-04-21 19:26:46 +12:00
Jeffrey Guo
4f14175022 setup CMS Settings in one test step 2016-04-20 22:40:04 +12:00
Ingo Schommer
8cf38720b5 Fix Chosen.js selector for Behat feature
The recent upgrade to Chosen.js 1.5 changes the generated markup:
It still renders an <a> tag, but without the "href" attribute.
This attribute isn't actually required to uniquely identify
the link in this structure.
2016-04-20 13:52:51 +12:00
Daniel Hensby
f32c893546
[SS-2016-005] FIX Apply brute force protection to default admin 2016-04-19 23:20:29 +01:00
Damian Mooyman
0bd62735bc BUG Fix issue with Requirements mangling custom scripts (#5337)
API Remove deprecated $template parameter from Requirements::includeInHTML
2016-04-19 17:20:30 +12:00
Daniel Hensby
52226dc462 Merge pull request #5322 from tractorcow/pulls/5105
fix to support facebook autodiscover
2016-04-15 14:27:19 +01:00
Hamish Friedlander
9a5db5f760 Fix ChangeSet test mixing Object ID and ChangeSetItem ID up 2016-04-15 14:42:32 +12:00
Hamish Friedlander
35e642d0bf Add two new accessors to ChangeSetItem
You shouldn't have to worry about exactly formatting the reference to
get a ChangeSetItem related to a DataObject, and doing it that way makes
you vulnerable to breakages like introduced in previous API change
2016-04-15 14:42:24 +12:00
Hamish Friedlander
2d16d69ddb API Use base data class for ChangeSetItem#ObjectClass, not just ClassName
This is a data structure change, but makes ChangeSetItems less likely to break
on /dev/build where a ClassName changes
2016-04-15 14:41:26 +12:00
Damian Mooyman
6f548a0ed0 Add unit tests for oembed autodiscover and thumbnail detection 2016-04-15 14:00:10 +12:00
Roman Schmid
9146450c49 Fix Email test issue discovered in #5271.
Updated/added tests for changed- and forgot-password Emails.
Updated fixture and tests to no longer use a real Email address.
2016-04-11 13:46:41 +02:00
Daniel Hensby
d7289a17fc Merge pull request #5271 from bummzack/5244-remove-email-subclasses
Fix 5244: Removed Email Subclasses
2016-04-08 17:09:44 +01:00
Roman Schmid
ca4036b882 Removed Email Subclasses used by the Member class (Member_ChangePasswordEmail and Member_ForgotPasswordEmail).
Added a test for the forgot password email.
Improved the test for the change-password email.
Fixed issue where `SapphireTest::mailer` was cleared during `setUp` by moving instantiation of the mailer at the end of the `setUp` method.
No longer use deprecated i18n method in test-setup.
Replace potentially real Email Address with a fake one.
2016-04-06 09:54:17 +02:00
Ingo Schommer
f0906f6e92 Merge pull request #5261 from tractorcow/pulls/4.0/fixup-tinymce
BUG fix missing language on non-global TinyMCE Configs
2016-04-06 19:32:55 +12:00
Damian Mooyman
3c2b53157e API Update Versioned methods 2016-04-04 14:50:16 +12:00
Damian Mooyman
87ee4365e7 API Implement ChangeSets for batch publishing 2016-04-04 14:46:38 +12:00
Damian Mooyman
640691f544 BUG fix missing language on non-global configs
BUG Prevent external plugins from being passed to the minifier
API Change TinyMCEConfig::requireJS to getScriptURL() for testabilitiy
2016-04-04 09:59:31 +12:00
Damian Mooyman
6ec2656201 BUG fix ErrorControlChain causing errors to be displayed if display_errors in php.ini is false
Fixes #5250
2016-04-01 11:04:06 +13:00
Damian Mooyman
d8d005d1e2 BUG move test file to correct folder and fix class_exists 2016-03-31 17:06:23 +13:00
Damian Mooyman
e8a68c42ce BUG Prevent live manifest loading files from nested test directories
E.g. framework/admin/tests
2016-03-31 15:58:23 +13:00
Damian Mooyman
0fa7271ec2 Merge pull request #5239 from open-sausages/pulls/4.0/form-schema-fixes
Form schema fixes
2016-03-31 09:49:55 +13:00
Ingo Schommer
fb660225c2 Behat: Wait until CMS loading overlay is removed
This makes tests more robust at the expense of an additional
check with every step. The "ajax steps" logic works similarly,
but does not respect the loading indicator. While this logic
waits for a short time after ajax requests are finished,
in some cases that isn't enough time for the browser to
process the response and remove the loading indicator.
Since the "ajax steps" logic applies to operations outside of the CMS
as well, we can't add the loading indicator check there.
2016-03-29 17:24:47 +13:00
Ingo Schommer
7ba4b5b6ef Merge pull request #5241 from timkung/pulls/upload-validator-filesize-spelling
BUG changing all cases of filesize spelling to file size
2016-03-29 16:15:27 +13:00
Ingo Schommer
1049288cb5 Merge pull request #5240 from madmatt/pulls/fix-dbstringtest-annotations
MINOR: Fix PHPUnit @covers assertions for DBStringTest
2016-03-29 16:13:50 +13:00
Tim Kung
7907d20da7 BUG changing all cases of filesize spelling to file size 2016-03-29 13:38:24 +13:00
Hamish Friedlander
700cf9bd56 Merge pull request #5223 from tractorcow/pulls/4.0/transactions
API Add SS_Database::withTransaction for nice enclosed transactions
2016-03-29 10:54:04 +13:00
Ingo Schommer
8ae2894890 Fix form schema ID getter
Also moved keys of higher importance to start of array,
easier to review this way
2016-03-28 21:54:24 +13:00
madmatt
41a3a86862 MINOR: Fix PHPUnit @covers assertions for DBStringTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 17:58:28 +13:00
madmatt
c972692313 MINOR: Fix PHPUnit @covers assertions for GridFieldTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 11:55:01 +13:00
Damian Mooyman
8abede1339 API Add SS_Database::withTransaction for nice enclosed transactions 2016-03-24 09:57:07 +13:00
Damian Mooyman
094745ec0f API Formally support custom ownership relations
API 'owned_by' is no longer mandatory for relations backed by normal db relations
API Extension setOwner/clearOwner is now nested
2016-03-23 14:49:34 +13:00
Roman Schmid
25c453fe7b Fixed issue where canViewVersioned caused a DB error when Versioned was used with stages other than the default "Stage" and "Live".
Updated VersionedTest to also check an Object with a single stage in the canView test.
2016-03-22 09:42:21 +01:00
Sam Minnee
aeccb8b8e0 API: Move DBField subclasses into SilverStripe\Model\FieldType namespace
API: Deprecate SS_Datetime.

The DBField subclasses are have all been renamed to start with “DB” and
be in the SilverStripe\Model\FieldType namespace. To keep DataObject
definitions concise, the original short variations of their names are
preserved as service definitions. Most of the field generation code
doesn’t need to change, but where field classes are referenced directly,
changes will be needed.

SS_Datetime, which is commonly referenced outside the model system
itself, has been preserved as a subclass of DBDatetime. This has been
marked as deprecated and can be removed in SilverStripe 5.

A few places that referred to $db and $casting values weren’t using
the Injector to instantiate the relevant classes. This meant that the
remapping we have created as part of moving classes into a namespace
didn’t work.
2016-03-22 18:09:30 +13:00
Sam Minnee
262f487053 MINOR: Avoid access-changing subclass in test.
Using a subclass to change the visibility of protected items didn’t
seem necessary in this case, if we add a reasonably logical getter
method.
2016-03-22 17:39:09 +13:00
Sam Minnee
083799ec03 FIX: Minimal data-model changes to support PHP7.
The tidiest fix for this will be to update the namespace/naming of all
field types to follow this pattern. I’ve broken out the minimum
necessary to support PHP7 as its own commit, in case anyone needs to
backport that (e.g. if someone wanted to patch a SS 3 system to get
PHP7 support).

Rather than introduce a new API for fieldtype namespace simplification,
I’ve just used Injector. We may come up with a new configuration tool
that is better, but this has the advantage of existing now, and as such
I think is a good first step.
2016-03-22 17:39:08 +13:00
Damian Mooyman
78f19bd2ed Merge pull request #5175 from Firesphere/pulls/feature-set-owner-allmethods
Enhancement: Set the owner on an extension
2016-03-21 17:30:37 +13:00
Simon Erkelens
debe8ba2a3 Improvement: Set the owner on an extension, before getting all the available method names.
This enhances the extensions to enable certain features like adding wrapper methods instead of having to have them on the object itself.
2016-03-21 02:36:34 +01:00
Ingo Schommer
8ae794ee99 API TinyMCE Image shortcodes 2016-03-21 09:23:40 +13:00
Joris Debonnet
4c741125c5 fix #5195: allow empty values in Enum 2016-03-17 22:43:26 +01:00
Damian Mooyman
0848aca462 API Massive refactor of Versioned
API Implemented recursive versioned actions (publish, etc)
API Un-deprecate delete batch action
API Changed Versioned getters and setters for stages
BUG Inject query parameters during DataObject construction to prevent incorrect lazy loading
2016-03-17 13:43:53 +13:00
Damian Mooyman
3dada00905 Cleanup trailing whitespace 2016-03-09 10:20:31 +13:00
Damian Mooyman
6d88caa9b3 Merge pull request #5132 from open-sausages/features/form-schema
API Form schema
2016-03-07 14:08:36 +13:00
Ingo Schommer
3b11d73c46 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	forms/gridfield/GridFieldDetailForm.php
#	javascript/GridField.js
2016-03-07 09:26:35 +13:00
Ingo Schommer
e1fcc64c41 Form field schema state
See https://github.com/silverstripe/silverstripe-framework/issues/4938
2016-03-03 13:36:48 +13:00
David Craig
404ac4ae43 Initial schemaState implementation 2016-03-03 08:20:54 +13:00
David Craig
afccef718c Initial Form Field Schema implementation
- Adds FormSchema class
- Adds FormSchema dependency to LeftAndMain via Injector
- Adds schema allowed_action method to LeftAndMain for generating Form schemas
- Adds FormFieldSchemaTrait to for schema getters and setters on FormFields
2016-03-03 08:20:54 +13:00
Daniel Hensby
817b836870 FIX getIP from behind a load-balancer that adds many IPs to the header 2016-03-01 21:07:48 +00:00
Damian Mooyman
b196d33bfa API Ownership API
API Filter Relation. query parameters from relations when creating objects
API Versioned::publish now triggers invokeWithExtensions
API Update behaviour of versioned for all_versions mode to respect ID filters
API Tweak behaviour of inherited query parameters
2016-02-29 14:38:44 +13:00
Damian Mooyman
e1865151c5 Merge pull request #5098 from bummzack/5086-fix-member-validator
Fix for issue #5086
2016-02-26 14:39:53 +13:00
Ingo Schommer
e88c3c8098 Merge pull request #5094 from tractorcow/pulls/4.0/invokewithextensions
API Extensible::invokeWithExtension has same method signature as Extensible::extend
2016-02-26 13:09:40 +13:00