Commit Graph

83 Commits

Author SHA1 Message Date
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
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
732e705bbf BUG Correct behaviour for empty filter array (as per 3.1) 2015-11-10 14:24: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
Daniel Hensby
95ae107c4c Merge pull request #4486 from uniun/patch-2
BUGFIX. FulltextFilter requires table identifiers in match query
2015-10-07 10:28:15 +01:00
Elvinas L.
ee6b250a46 Ajustments
Altered code to according to the feedback and added phpdoc.
2015-10-06 18:58:22 +03:00
Peter Thaleikis
6ef03d29bb removing a bunch of trailing spaces in the source code 2015-10-06 18:31:58 +13:00
Damian Mooyman
1686c83826 Revert #3425 #3396 to restore deprecated functionality
Fixes #4514
2015-08-24 11:26:25 +12:00
Elvinas L.
29016645e5 BUGFIX. FulltextFilter requires table identifiers in match query
Fixes #4483
2015-08-05 09:41:44 +03: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
Damian Mooyman
782c4cbf6f API Enable single-column fulltext filter search as fallback 2015-06-12 15:36:03 +12:00
micmania1
40c5b8b675 FIX FulltextFilter did not work and was not usable 2015-06-12 15:31:45 +12:00
Damian Mooyman
922d02f535 API Enable filters to perform 'IS NULL' or 'IS NOT NULL' checks 2015-05-26 12:09:17 +12:00
Damian Mooyman
319b96b48b Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	docs/en/02_Developer_Guides/09_Security/04_Secure_Coding.md
	docs/en/05_Contributing/01_Code.md
	forms/TreeDropdownField.php
	model/DataObject.php
	security/Member.php
	tests/model/DataObjectTest.php
2015-03-11 11:40:06 +13:00
Christopher Darling
140895d355 added space after class name in InvalidArgumentException for applyMany + excludeMany
"ClassNamecan't be used to filter by a list of items." => "ClassName can't be used to filter by a list of items."
2015-03-04 11:47:28 +00:00
Damian Mooyman
0b1f297873 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	README.md
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/screen.scss
	api/RestfulService.php
	conf/ConfigureFromEnv.php
	control/injector/ServiceConfigurationLocator.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	core/Object.php
	css/AssetUploadField.css
	css/ComplexTableField_popup.css
	dev/CSSContentParser.php
	dev/DevelopmentAdmin.php
	docs/en/changelogs/index.md
	docs/en/misc/contributing/code.md
	docs/en/reference/execution-pipeline.md
	filesystem/GD.php
	filesystem/ImagickBackend.php
	filesystem/Upload.php
	forms/Form.php
	forms/FormField.php
	forms/HtmlEditorConfig.php
	forms/gridfield/GridFieldDetailForm.php
	forms/gridfield/GridFieldSortableHeader.php
	lang/en.yml
	model/Aggregate.php
	model/DataList.php
	model/DataObject.php
	model/DataQuery.php
	model/Image.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	model/fieldtypes/HTMLText.php
	model/fieldtypes/Text.php
	scss/AssetUploadField.scss
	search/filters/SearchFilter.php
	security/Authenticator.php
	security/LoginForm.php
	security/Member.php
	security/MemberAuthenticator.php
	security/MemberLoginForm.php
	security/Security.php
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
	tests/control/HTTPTest.php
	tests/control/RequestHandlingTest.php
	tests/filesystem/UploadTest.php
	tests/forms/FormTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataListTest.php
	tests/model/DataObjectTest.php
	tests/model/TextTest.php
	tests/security/MemberAuthenticatorTest.php
	tests/security/SecurityDefaultAdminTest.php
	tests/view/SSViewerCacheBlockTest.php
	tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Will Rossiter
920978df99 API: Add ClassInfo::table_for_object_field
Returns the table name for a field in a class hierarchy.

This issue raised itself with GridFieldSortableHeader not supporting sorting on fields from parent class fields.
2014-09-26 10:38:31 +12:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Sean Harvey
404478b07f Removing @deprecated 3.1 functionality and classes.
Changelog has been updated to include what was removed in terms of
major functionality, and what to use as a replacement.
2014-08-18 16:00:13 +12:00
Damian Mooyman
d8e9af8af8 API New Database abstraction layer. Ticket #7429
Database abstraction broken up into controller, connector, query builder, and schema manager, each independently configurable via YAML / Injector
Creation of new DBQueryGenerator for database specific generation of SQL
Support for parameterised queries, move of code base to use these over escaped conditions
Refactor of SQLQuery into separate query classes for each of INSERT UPDATE DELETE and SELECT
Support for PDO
Installation process upgraded to use new ORM
SS_DatabaseException created to handle database errors, maintaining details of raw sql and parameter details for user code designed interested in that data.
Renamed DB static methods to conform correctly to naming conventions (e.g. DB::getConn -> DB::get_conn)
3.2 upgrade docs
Performance Optimisation and simplification of code to use more concise API
API Ability for database adapters to register extensions to ConfigureFromEnv.php
2014-07-09 18:04:05 +12:00
froog
755857b22a NEW: Created LessThanOrEqualFilter and GreaterThanEqualFilter 2013-11-25 03:59:51 +00:00
Simon Welsh
5dc5e0b4c5 Quote table/column names when falling back to $fullName 2013-07-05 10:41:18 +12:00
Jeremy Thomerson
50e9eee2e9 FIX #2174: SearchFilter needs casting helper for DataObject base fields
Commit 964b3f2 fixed an issue where dbObject was returning casting helpers for
fields that were not actually DB objects, but had something in $casting config.

However, because dbObject was no longer calling DataObject->castingHelper, this
exposed a bug that the underlying function db($fieldName) was not returning
field specs for the base fields that are created by SS automatically on all
DataObjects (i.e. Created, LastEdited, etc).

This commit fixes the underlying issue that DataObject->db($fieldName) should
return the field specs for *all* DB fields like its documentation says it will,
including those base fields that are automatically created and do not appear in
$db.
2013-07-03 03:03:40 +00:00
Will Rossiter
9775204436 FIX Allow filtering on joined columns 2013-06-15 12:06:24 +12:00
Will Rossiter
0129e185b8 Coding conventions, PHPDoc cleanup 2013-06-15 12:06:24 +12:00
Ingo Schommer
e6e47cb35e API DB-specific comparisators in SearchFilter and DataList
Too many edge cases to leave this up to datalists,
particularly now that we introduced enforced
case sensitivity/insensitivity in the ORM APIs.
2012-12-11 12:04:48 +01:00
Sean Harvey
671881420b Remove deprecated PartialMatchFilter, use PartialMatchFilter instead 2012-11-15 14:43:12 +13:00
Simon Welsh
c49f7566c3 API Allow use of :not, :nocase and :case modifiers to SearchFilters.
More modifiers can be added to each class as desired.
2012-10-10 10:26:47 +13:00
Simon Welsh
79b3f8ac45 API Add exclude() method to SearchFilters that excludes items that match the filter. 2012-10-09 14:43:47 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Ingo Schommer
2facc31e1f BUGFIX Case insensitive search filters for PostgreSQL (fixes #6548) 2012-09-02 23:02:20 +02:00
unclecheese
66dfa38d0a ENHANCEMENT: GreaterThanFilter should be consistent with LessThanFilter
Numeric or float values weren't supported.
2012-08-21 12:48:01 -03:00
Sean Harvey
a9c7c69289 MINOR Ensure DataQuery used in apply() is returned on Filter classes (to be consistent with GreaterThanFilter etc which will return it) 2012-06-15 15:48:47 +12:00
unclecheese
119739de68 If a DataObject has a many_many to a SiteTree subclass, and that subclass has no database fields defined, and $this->name is "ID", this function will errantly return "SiteTreeSubClass.ID", which can never exist in a search query, since there is no such table as SiteTreeSubClass. The problem is that DataObject::hasOwnTableDatabaseField() is a little eager when passed an argument of "ID." It doesn't check to see if the object has its own table first. 2012-06-04 12:27:58 -03:00
Sam Minnee
7036abbd75 BUGFIX: Make WithinRangeFilter work with dates and related columns. 2012-05-18 16:15:13 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Ingo Schommer
3a068a0d18 MINOR Removed references to outdated versions from docs 2012-03-09 21:34:05 +01:00
Ingo Schommer
c7a301521d MINOR SearchFilter->setName()/setFullName() 2012-03-02 13:41:35 +01:00
Stig Lindqvist
5d7aa8f35a BUGFIX Allow PartialMatchFilter to use an array as search term 2012-02-15 11:42:29 +01:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sam Minnee
fece61c90b BUGFIX: Use numeric literal for numeric less-than filter. 2011-12-17 16:42:31 +13:00
Sam Minnee
5a157a6365 API CHANGE: Deprecate SubstringFilter in favour of PartialMatchFilter. 2011-12-17 16:42:30 +13:00
Stig Lindqvist
671c8b734d BUGFIX NegationFilter and SubstringFilter did not set the DataModel on apply() 2011-12-17 16:42:30 +13:00
Will Rossiter
1732a17114 Merged new-orm into datagrid 2011-09-26 16:47:54 +13:00
Ingo Schommer
ce8e72cf0e MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:02 +02:00
ajshort
81c0caaddb API CHANGE: Renamed DataList::filter() and DataQuery::filter() to ::where(). 2011-05-01 15:26:30 +12:00
Sam Minnee
c615c4eb91 ENHANCEMENT: First cut of running SearchContext through DataList/DataQuery. Note that the eventual goal is probably to ditch SearchContext entirely. 2011-05-01 15:25:58 +12:00
Sam Minnee
2948bc1c64 MINOR: Misc merges from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:53:12 +00:00