Daniel Pickering
d41d601701
Ensure filterByCallback returns object of called class
...
This change ensures that filterByCallback returns a filtered list of the same called class, if ArrayList is extended.
The current filterByCallback always instantiates an ArrayList with the filtered results, which is probably not what you want if you extend ArrayList.
eg; currently this occurs
```
class MyArrayList extends ArrayList {
public function sayHello() {
return 'hi';
}
}
$list = MyArrayList::create();
//populate $list here
$filtered = $list::filterByCallback($someCallback);
$filtered->sayHello();
// -> The method 'sayHello' does not exist on 'ArrayList'
```
2016-02-10 23:14:07 +13:00
Mark Stephens
3fcf1e2c98
BUG edge case on many many extra fields (fixes 4991)
...
Fixes an edge case where extraFields are not returned if
one side of a many many is added via extension (although this
may not be the only failure case). Fixes a
downstream issue with dms breaking the CMS on framework 3.2.
The bug is where a many many relationship exists on a class,
and a sub-class attempts to get the extra fields of the
relationship. The change fixes the test for exact matching of
the relationship class to the instance class, to checking if
the instance is the class or a subclass of the relationship.
The unit tests check the dms failure case, which is a more
complex failure case.
2016-02-04 12:47:07 +13:00
Daniel Hensby
e74665b639
Merge pull request #4964 from tractorcow/pulls/4.0/tomap-standardise
...
API Standardise SS_List::map() implementation
2016-01-25 13:31:05 +00:00
Silbinary Wolf
073e73a2f4
Replaced filterByCallback for 'Children' to just create a new array as function calls are exponentially expensive in PHP (the more functions that exist, the slower a function call becomes) and replaced 'array_key_exists' with op-code equivalent for speed. The best increase isn't really noticeable but we should work towards optimizing the core as much as possible.
2016-01-25 13:22:51 +00:00
Damian Mooyman
69c9ad1428
Merge remote-tracking branch 'origin/3'
...
# Conflicts:
# admin/css/ie8.css.map
# admin/css/screen.css
# admin/css/screen.css.map
# admin/scss/_style.scss
# css/AssetUploadField.css
# css/GridField.css.map
# docs/en/02_Developer_Guides/00_Model/08_SQL_Select.md
# lang/fi.yml
2016-01-25 16:15:41 +13:00
Damian Mooyman
e091bb8474
Merge remote-tracking branch 'origin/3.3' into 3
...
# Conflicts:
# admin/scss/_forms.scss
# admin/scss/_style.scss
# tests/model/VersionedTest.yml
2016-01-25 15:57:37 +13:00
Damian Mooyman
7c448bb4a2
Merge remote-tracking branch 'origin/3.2' into 3.3
...
# Conflicts:
# tests/model/DataObjectLazyLoadingTest.php
# tests/model/VersionedTest.yml
2016-01-25 14:11:37 +13:00
Damian Mooyman
d8e354d144
FIX PHPDocs on DataList::getIDList() and UnsavedRelationList::getIDList()
2016-01-25 11:09:37 +13:00
Damian Mooyman
e77389d0c8
API Standardise SS_List::map() implementation
...
Fixes #1593
2016-01-25 10:22:47 +13:00
Jarkko Linnanvirta
bc9aa09b1f
Remove question marks, equal signs and hashes
...
Those were not removed if multibyte was allowed.
2016-01-22 15:40:11 +00:00
Damian Mooyman
bf8bf5e4d5
BUG Prevent Versioned::doRollbackTo from creating incorrect versions on subclasses of Versioned DataObjects
...
Document correct configuration of Versioned DataObjects
Fixes #4936
2016-01-22 15:35:58 +13:00
Daniel Hensby
612772728e
Merge pull request #4962 from tractorcow/pulls/4.0/defaultclass
...
API Refactor out Page default classname hack
2016-01-21 22:40:28 +00:00
Damian Mooyman
5138bf1b7f
API Refactor out Page default classname hack
...
Fixes #1932
2016-01-21 17:12:55 +13:00
Damian Mooyman
bdb1a95758
API Cleanup and refactor of select fields
...
API Standardise Relation interface
2016-01-21 15:40:19 +13:00
Damian Mooyman
e6b877df27
Merge remote-tracking branch 'origin/3'
...
# Conflicts:
# control/Director.php
# control/HTTP.php
# core/startup/ParameterConfirmationToken.php
# docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md
# docs/en/00_Getting_Started/04_Directory_Structure.md
# docs/en/00_Getting_Started/05_Coding_Conventions.md
# docs/en/01_Tutorials/01_Building_A_Basic_Site.md
# docs/en/01_Tutorials/02_Extending_A_Basic_Site.md
# docs/en/01_Tutorials/03_Forms.md
# docs/en/01_Tutorials/04_Site_Search.md
# docs/en/01_Tutorials/05_Dataobject_Relationship_Management.md
# docs/en/02_Developer_Guides/12_Search/01_Searchcontext.md
# docs/en/02_Developer_Guides/13_i18n/index.md
# docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/06_Javascript_Development.md
# docs/en/03_Upgrading/index.md
# docs/en/changelogs/index.md
# docs/en/howto/customize-cms-menu.md
# docs/en/howto/navigation-menu.md
# docs/en/index.md
# docs/en/installation/index.md
# docs/en/installation/windows-manual-iis-6.md
# docs/en/misc/contributing/code.md
# docs/en/misc/contributing/issues.md
# docs/en/misc/module-release-process.md
# docs/en/reference/dataobject.md
# docs/en/reference/execution-pipeline.md
# docs/en/reference/grid-field.md
# docs/en/reference/modeladmin.md
# docs/en/reference/rssfeed.md
# docs/en/reference/templates.md
# docs/en/topics/commandline.md
# docs/en/topics/debugging.md
# docs/en/topics/email.md
# docs/en/topics/forms.md
# docs/en/topics/index.md
# docs/en/topics/module-development.md
# docs/en/topics/modules.md
# docs/en/topics/page-type-templates.md
# docs/en/topics/page-types.md
# docs/en/topics/search.md
# docs/en/topics/testing/index.md
# docs/en/topics/testing/testing-guide-troubleshooting.md
# docs/en/topics/theme-development.md
# docs/en/tutorials/1-building-a-basic-site.md
# docs/en/tutorials/2-extending-a-basic-site.md
# docs/en/tutorials/3-forms.md
# docs/en/tutorials/4-site-search.md
# docs/en/tutorials/5-dataobject-relationship-management.md
# docs/en/tutorials/building-a-basic-site.md
# docs/en/tutorials/dataobject-relationship-management.md
# docs/en/tutorials/extending-a-basic-site.md
# docs/en/tutorials/forms.md
# docs/en/tutorials/index.md
# docs/en/tutorials/site-search.md
# main.php
# model/SQLQuery.php
# security/ChangePasswordForm.php
# security/MemberLoginForm.php
# tests/control/ControllerTest.php
# tests/core/startup/ParameterConfirmationTokenTest.php
# tests/model/SQLQueryTest.php
# tests/security/SecurityTest.php
# tests/view/SSViewerTest.php
# view/SSTemplateParser.php
# view/SSTemplateParser.php.inc
# view/SSViewer.php
2016-01-20 13:16:27 +13:00
Damian Mooyman
037467beae
API Asset Access Control implementation
2016-01-13 18:18:22 +13:00
Sam Minnee
3ee8f505b7
MINORE: Remove training whitespace.
...
The main benefit of this is so that authors who make use of
.editorconfig don't end up with whitespace changes in their PRs.
Spaces vs. tabs has been left alone, although that could do with a
tidy-up in SS4 after the switch to PSR-1/2.
The command used was this:
for match in '*.ss' '*.css' '*.scss' '*.html' '*.yml' '*.php' '*.js' '*.csv' '*.inc' '*.php5'; do
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" -exec sed -E -i '' 's/[[:space:]]+$//' {} \+
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" | xargs perl -pi -e 's/ +$//'
done
2016-01-07 10:15:54 +13:00
Damian Mooyman
ad9d293122
Merge pull request #4872 from powtac/3
...
Typo
2016-01-05 09:54:37 +13:00
Simon Brüchner
7ec09b5fde
Typo
2015-12-23 09:32:26 +01:00
Damian Mooyman
959c84cf6f
Merge pull request #4827 from SilbinaryWolf/fix-fieldLabels-abstract-class-bug
...
Fixed bug where inheriting an abstract class broke scaffoldFormFields / fieldLabels(true)
2015-12-22 16:42:54 +13:00
Damian Mooyman
48a30909f3
Merge remote-tracking branch 'origin/3.2' into 3
...
# Conflicts:
# admin/javascript/LeftAndMain.BatchActions.js
# css/UploadField.css
# forms/HtmlEditorField.php
2015-12-22 14:07:52 +13:00
Damian Mooyman
880a3ef0ab
Merge pull request #4793 from jonom/image-properties
...
FIX Image_Cached record class name
2015-12-22 10:09:05 +13:00
Ingo Schommer
0175167761
Merge pull request #4830 from open-sausages/pulls/3/fix-querystring-stage
...
API Disable unauthenticated get parameter access to site stage mode
2015-12-10 10:44:43 +13:00
Damian Mooyman
fa0160a874
BUG Fix regression in canViewStage
2015-12-09 14:53:21 +13:00
Damian Mooyman
6089a7c5bd
API Create default security permission model for versioned data objects
2015-12-09 11:33:53 +13:00
Damian Mooyman
38e154af0a
API Disable get parameter access to site stage mode
...
BUG Fix missing and undocumented response from Security::permissionFailure()
2015-12-07 17:39:18 +13:00
Silbinary Wolf
2d6b8a50b1
Fixed bug where inheriting an abstract class broke scaffoldFormFields / fieldLabels(true)
2015-12-05 18:53:29 +11:00
Damian Mooyman
641c26299c
API Enable linear-only restriction for DataList::applyRelation
...
API Remove DataList::getRelation
2015-12-01 09:58:27 +13:00
Damian Mooyman
2b1e5ee071
API Enable DataList::sort to support composite field names (similar to filter)
2015-12-01 09:35:33 +13:00
Jonathon Menz
15ae37cf03
FIX Image_Cached record class name
...
Sanitise properties before updating
2015-11-24 10:49:31 -08:00
Damian Mooyman
0272e443f4
BUG Prevent dev/build continually regenerating Number field type
2015-11-11 09:21:50 +13:00
Will Morgan
6d85d618b6
Merge pull request #4751 from dhensby/pulls/plural-fix
...
Fixing issue where words ending ay/ey/iy/oy/uy are not pluralised correctly
2015-11-06 16:55:25 +00:00
Daniel Hensby
dad3784621
Fixing issue where words ending ay/ey/iy/oy/uy are not pluralised correctly
2015-11-06 16:23:45 +00:00
Daniel Hensby
ef35c2bb6b
Merge pull request #4457 from tractorcow/pulls/4.0/no-query
...
API Remove SQLQuery
2015-11-03 16:41:07 +00:00
Garion Herman
6a1a3bf182
Corrected TotalItems() method to use Count(). Added test coverage. ( fixes #4646 )
2015-11-04 00:20:45 +13:00
Damian Mooyman
1e1a7a345c
Merge remote-tracking branch 'origin/3'
...
Conflicts:
control/Director.php
filesystem/File.php
filesystem/GD.php
filesystem/ImagickBackend.php
forms/HtmlEditorField.php
javascript/UploadField_uploadtemplate.js
model/Image.php
model/Image_Backend.php
model/fieldtypes/Enum.php
templates/AssetUploadField.ss
tests/model/ImageTest.php
tests/search/FulltextFilterTest.php
2015-11-03 14:23:16 +13:00
Damian Mooyman
c4dc10b255
Merge remote-tracking branch 'origin/3.2' into 3
...
Conflicts:
forms/DropdownField.php
tests/model/ImageTest.php
2015-11-03 13:06:39 +13:00
Patrick Nelson
293d84721e
FIX for #4712 : Dropping in some PHP documentation on return types for dynamically generated image methods.
2015-10-27 18:42:03 -04:00
Damian Mooyman
d1ea74e40d
API Implement AssetField to edit DBFile fields
2015-10-23 16:57:44 +13:00
Damian Mooyman
3e7eecf978
API Remove SQLQuery
2015-10-23 16:26:04 +13:00
Daniel Hensby
1974e79d71
Allow multi-line enum declarations
2015-10-15 16:23:19 +01:00
Damian Mooyman
27a8afe78b
BUG Fix regressions in fulltextsearch
2015-10-15 16:33:32 +13:00
Damian Mooyman
d884c859d1
BUG Fix file link tracking for new asset abstraction
2015-10-15 12:15:00 +13:00
Loz Calver
862429e5d7
Only notify users about PDO native mode once
2015-10-14 09:53:51 +01:00
Damian Mooyman
be239896d3
API Refactor of File / Folder to use DBFile
...
API Remove filesystem sync
API to handle file manipulations
2015-10-13 11:57:39 +13:00
Damian Mooyman
6c117cd629
BUG fix imagick interface and add to travis
2015-10-06 12:40:24 +13:00
Damian Mooyman
b8335793d6
Merge pull request #4620 from kinglozzer/pulls/manymanyextrafields-compat
...
FIX: GridFieldDetailForm failing to save many_many relations
2015-10-06 11:49:56 +13:00
Loz Calver
23bd11dd91
Merge pull request #4582 from tractorcow/pulls/4.0/showqueries-params
...
API showqueries=1 now shows parameters
2015-09-24 16:27:16 +01:00
Damian Mooyman
ac27836d2b
API Implementation of RFC-1 Asset Abstraction
2015-09-24 12:57:28 +12:00
Loz Calver
0d89a13c2d
FIX: GridFieldDetailForm failing to save many_many relations
2015-09-22 14:46:57 +01:00
Damian Mooyman
10dece653f
API Consolidate DataObject db methods
...
BUG Fix namespace and getField on composite fields
2015-09-22 10:38:12 +12:00
Damian Mooyman
9872fbef4d
API Refactor CompositeDBField into an abstract class
...
API Refactor ClassName into DBClassName
API Update PolymorphicForeignKey to use new CompositeDBField and DBClassName
CompositeDBField is now an interface to nested fields on an underlying dataobject, allowing field manipulation to be performed at the field and dataobject level without having to synchronise them manually.
2015-09-22 10:28:07 +12:00
Damian Mooyman
34b71cf6c8
Merge remote-tracking branch 'origin/3'
2015-09-15 13:42:17 +12:00
Damian Mooyman
71b8aec306
Merge remote-tracking branch 'origin/3.2' into 3
2015-09-15 13:35:51 +12:00
Damian Mooyman
c4710b2272
Merge remote-tracking branch 'origin/3.1' into 3.2
...
Conflicts:
admin/code/GroupImportForm.php
admin/code/MemberImportForm.php
tests/model/DataListTest.php
2015-09-15 13:18:47 +12:00
Damian Mooyman
ee639deedb
API showqueries=1 now shows parameters
2015-09-11 16:59:18 +12:00
Damian Mooyman
45b22c788e
BUG Fix missing framework/admin/tests
2015-09-10 11:06:15 +12:00
Damian Mooyman
812b5ecb62
Fix merge regressions
2015-09-09 16:18:39 +12:00
Damian Mooyman
b552a7370f
Merge remote-tracking branch 'origin/3'
...
Conflicts:
tests/model/ImageTest.php
2015-09-09 15:44:47 +12:00
Damian Mooyman
f10785350e
Merge remote-tracking branch 'origin/3.2' into 3
...
Conflicts:
docs/en/02_Developer_Guides/02_Controllers/01_Introduction.md
2015-09-09 14:50:47 +12:00
Damian Mooyman
309ac0d196
Merge remote-tracking branch 'origin/3.1' into 3.2
...
Conflicts:
.travis.yml
admin/code/CMSProfileController.php
admin/tests/LeftAndMainTest.php
control/HTTP.php
security/Permission.php
tests/forms/FormTest.php
tests/model/ArrayListTest.php
tests/security/PermissionTest.php
2015-09-09 14:35:29 +12:00
Damian Mooyman
7192932022
[ss-2015-015]: Fix insecure returnURL in DatabaseAdmin
2015-09-08 09:48:09 +12:00
Damian Mooyman
96d20bc180
BUG Fix missing framework/admin/tests
2015-09-07 18:04:56 +12:00
micmania1
9f91b47825
NEW Update SS_ConfigStaticManifest to use Reflection
2015-09-03 22:25:42 +00:00
Daniel Hensby
f6fe1427c2
API Making ArrayList (and others) more consistent with DataList
2015-09-02 23:43:27 +01:00
Jonathon Menz
2ae5d83f08
FIX Resampled images inherit source properties
...
Ensure Image_Cached objects can access all the properties of the source image (fixes #4569 )
2015-09-02 10:38:02 -07:00
Simon Brüchner
9416c31805
Typo
2015-09-02 15:51:04 +02:00
Loz Calver
0943b3b1a0
FIX: Recursion errors when sorting objects with circular dependencies ( fixes #4464 )
2015-09-01 09:37:06 +01:00
Damian Mooyman
dc4c40f642
Merge pull request #4507 from JorisDebonnet/resampled-images-in-folders
...
Save resampled images into a folder structure indicating transformations
2015-09-01 11:16:23 +12:00
JorisDebonnet
ea05526e9d
Save resampled images into a folder structure indicating transformations
2015-09-01 00:40:27 +02:00
Ingo Schommer
860b5dcc6e
Remove forward slash in URLs in multibyte mode
...
Fixes https://github.com/silverstripe/silverstripe-cms/issues/1262
2015-08-26 17:40:04 +12:00
Damian Mooyman
4a011303b9
Add missing packages
2015-08-24 16:15:38 +12:00
Damian Mooyman
958f98b1cf
Merge remote-tracking branch 'origin/3'
2015-08-24 13:08:54 +12:00
Damian Mooyman
1686c83826
Revert #3425 #3396 to restore deprecated functionality
...
Fixes #4514
2015-08-24 11:26:25 +12:00
Daniel Hensby
0b36082564
Merge branch '3'
...
Conflicts:
.travis.yml
composer.json
docs/en/changelogs/4.0.0.md
forms/gridfield/GridFieldExportButton.php
2015-08-17 13:12:41 +01:00
Daniel Hensby
910156b84c
Merge pull request #4443 from JorisDebonnet/base64url
...
Url-safe alternative for base64_encode in resampled Image filenames
2015-08-10 13:56:35 +01:00
Damian Mooyman
cf9d2d12ac
BUG Fix duplicate primary key crash on duplicate
2015-08-10 09:54:30 +12:00
Sam Minnee
1f0602d42f
FIX: Fixed regression from ClassInfo case-sensitivity fix.
...
This fixes a bug introduced by ffbeac6b7d
.
ClassInfo::subclassesFor() didn't previously throw an Exception if passed
an invalid class; it just returned no values. This will annoy minor-release
upgrades, and so I've made it return null instead in these situation.
2015-08-07 14:20:01 +12:00
JorisDebonnet
18e163d985
Url-safe alternative for base64_encode in resampled Image filenames
2015-08-05 20:59:40 +02:00
John Milmine
a6fdcd238a
fixing has_one cache to use get_one rather byID
...
This helps becuase it uses the get_one internal Dataobject cache
2015-08-03 13:28:16 +12:00
Damian Mooyman
09210efbc0
Merge remote-tracking branch 'origin/3'
...
Conflicts:
composer.json
control/Session.php
docs/en/05_Contributing/01_Code.md
docs/en/05_Contributing/02_Release_Process.md
forms/FormField.php
model/DataQuery.php
model/Image.php
model/queries/SQLConditionalExpression.php
view/SSViewer.php
view/ViewableData.php
2015-07-31 15:49:35 +12:00
Damian Mooyman
7ee444e08a
Merge remote-tracking branch 'origin/3.1' into 3.2
...
Conflicts:
admin/code/LeftAndMain.php
control/injector/SilverStripeServiceConfigurationLocator.php
core/ClassInfo.php
filesystem/File.php
model/DataObject.php
model/DataQuery.php
search/filters/FulltextFilter.php
search/filters/SearchFilter.php
tests/core/ClassInfoTest.php
tests/filesystem/FileTest.php
tests/model/DataListTest.php
2015-07-31 11:38:18 +12:00
Daniel Hensby
4373c8716b
Merge pull request #4454 from tractorcow/pulls/3.2/dbid-semver
...
BUG Fix semver violation in create_table_options
2015-07-30 11:11:33 +01:00
Daniel Hensby
dd0e2dc362
FIX Image_Cached exists method doesnt check for positive ID
...
FIX Files should only report as "existing" if the file actually exists
2015-07-30 14:52:06 +12:00
Damian Mooyman
97b226abe0
BUG Fix semver violation in create_table_options
2015-07-30 14:24:41 +12:00
Jonathon Menz
90b96e1fc4
Remove redundant force_resample logic
2015-07-28 14:28:33 -07:00
Daniel Hensby
ffbeac6b7d
Ensuring classinfo is case insensitive
2015-07-28 11:17:50 +01:00
Jonathon Menz
40cc567c36
API Force resampling by default
...
Simplified force resampling by serving up a resampled image throught the getURL() function, but only if the resampled image has a smaller file size than the original.
2015-07-27 12:20:20 -07:00
Russell
51722e3d12
DataObject accept arrays or stdClass
...
The constructor of DataObject can take an array or stdClass for $record.
However, it is access as an array [here](https://github.com/silverstripe/silverstripe-framework/blob/3.1/model/DataObject.php#L416 ) and [here](https://github.com/silverstripe/silverstripe-framework/blob/3.1/model/DataObject.php#L431 )
This pull request ensures $record is an array after validation
2015-07-27 10:29:34 +01:00
Damian Mooyman
a246391238
Merge pull request #4420 from spekulatius/adjustment-addFilter
...
harden addFilter method
2015-07-27 08:34:42 +12:00
Peter Thaleikis
e26ad64b75
remove the API change
2015-07-23 22:28:59 +12:00
Peter Thaleikis
bf3f159800
harden addFilter method
2015-07-22 22:35:58 +12:00
Sam Minnée
40e9515233
Merge pull request #4053 from tractorcow/pulls/3.1/fix-stringfield-exists
...
BUG Fix default casted (boolean)false evaluating to true in templates
2015-07-22 11:26:49 +12:00
Daniel Hensby
ca8d0f2818
Merge branch '3.1' into 3.2
...
Conflicts:
dev/Debug.php
docs/en/05_Contributing/01_Code.md
forms/FormField.php
i18n/i18nTextCollector.php
model/DataQuery.php
2015-07-20 10:48:01 +01:00
Christopher Darling
a3201d6ed9
FIX: $callerClass is undefined
...
replaced with $this->dataClass
2015-07-16 14:36:23 +01:00
Damian Mooyman
c7bd50427a
BUG Fix cookie errors when running in CLI
2015-07-09 10:46:13 +12:00
Loz Calver
dc594ef1e5
Tidy up whitespace in DataList.php
2015-07-08 15:34:21 +01:00
micmania1
a5b3083dcc
FIX memory exhaustion in MySQLStatement->bind()
2015-07-05 03:06:37 +00:00
Jason
b5f88af1f0
Add extension hook for getManyManyComponents()
...
Call extension after DataModel is set
2015-06-26 11:04:31 +10:00
Damian Mooyman
e14f743bf0
Set deprecation level for all changes in 3.x to 4.0
2015-06-19 13:07:41 +12:00