Commit Graph

210 Commits

Author SHA1 Message Date
Sam Minnée
603a984ad4 Merge pull request #236 from silverstripe-big-o/pull/SSF-25
SSF-25: ModelAdmin
2012-03-09 15:23:20 -08:00
Ingo Schommer
3a068a0d18 MINOR Removed references to outdated versions from docs 2012-03-09 21:34:05 +01:00
Ingo Schommer
4b8895c8b6 BUGFIX Don't scaffold has_one relations into a DropdownField in ForeignKey->scaffoldFormField() if more than 100 records would be created, to avoid exceeding PHP memory (fixes #6776) 2012-03-09 15:58:46 +01:00
Hamish Friedlander
05cf5a833b MINOR: Dump deprecation notices introduced by the config system to 3.1.0 as it breaks heaps of code 2012-03-09 18:16:45 +13:00
Hamish Friedlander
4315e51358 BUGFIX: Fix deprecated and removed static accessor calls 2012-03-09 18:16:44 +13:00
Hamish Friedlander
9c2ebc3e5f BUGFIX: Replace deprecated extraStatics with new methods on Versioned and Hierarchy 2012-03-09 18:16:44 +13:00
Hamish Friedlander
876f4c5299 API CHANGE: Modify extensions system to support new config system. Statics are now declared directly on extensions, and there is an add_to_class method extensions can hook into to modify class configuration 2012-03-09 18:16:44 +13:00
Sam Minnee
adbcf61c56 MINOR: Minor fixes after new SS_List interfaces cleanup 2012-03-09 17:50:32 +13:00
Stig Lindqvist
4f1da0a5e8 MINOR If the limit clause on DataObject::get() passes a SQL type of limit, modify it for SS_List::limit() 2012-03-09 17:07:42 +13:00
Stig Lindqvist
0a82b903bc MINOR ListDecorator::limit must exactly match SS_Limitable::limit() 2012-03-09 17:07:41 +13:00
Stig Lindqvist
2cb67efe07 API CHANGE DataObject::getComponents() should use default value for limit as NULL 2012-03-09 17:07:41 +13:00
Sam Minnee
e9e7655867 API CHANGE: Added SS_Sortable, an extra interface to apply to SS_Lists. 2012-03-09 17:07:41 +13:00
Sam Minnee
f000a47813 API CHANGE: Added SS_Filterable, an extra interface to apply to lists. 2012-03-09 17:07:40 +13:00
Sam Minnee
a55e06f6b5 API CHANGE: Introduce SS_Limitable class for adding to SS_Lists that have limit capability.
API CHANGE: Deprecated SS_List::getRange() in favour of SS_Limitable::limit().
API CHANGE: Introduce SS_Limitable::limit($limit, $offset = 0) as the only modern way of specifying limits; deprecate all others.
2012-03-09 17:07:40 +13:00
Sean Harvey
0d8151fd3d Merge remote-tracking branch 'upstream/master' into deprecation_fixes 2012-03-09 15:03:43 +13:00
Sean Harvey
a2353f793d MINOR Fixed misspelled "extension" in
DataExtension::load_extra_statics()
2012-03-09 14:35:12 +13:00
Sean Harvey
71c2a2286a API CHANGE Removed support for extraDBFields method in DataExtension, please ensure you are using extraStatics on your extension classes 2012-03-09 14:34:25 +13:00
Mark Stephens
627708e3a8 BUGFIX: add Director::isDev parameter so we can test if we know we're dev mode already without touching the database. Used in showqueries on MySQL, so that errors are avoided when showing queries on initial switch to dev move (#6856) 2012-03-09 14:20:22 +13:00
Ingo Schommer
e4a6dd5850 Merge branch 'integration'
Conflicts:
	forms/gridfield/GridField.php
2012-03-08 20:25:21 +01:00
Ingo Schommer
51bae9e4a6 ENHANCEMENT Allowing to save ManyManyList with multiple foreign keys (e.g. required to add to an overloaded Group->Members() relationship) 2012-03-06 21:38:33 +01:00
Ingo Schommer
bb6d4c506e BUGFIX Fixed HasManyList and ManyManyList queries for relationships on new records (was returning all available records due to the SQL filtering ignoring ID=0) 2012-03-06 01:23:34 +01:00
Sam Minnee
adfdd068e2 Merge branch 'ereg-to-preg' of https://github.com/AngryPHPNerd/sapphire
Conflicts:
	model/fieldtypes/Date.php
2012-03-05 13:54:20 +13:00
Ingo Schommer
299bf8b9c6 Merge branch 'integration' 2012-03-02 20:53:06 +01:00
Ingo Schommer
e5c4b0a36b ENHANCEMENT Hierarchy->Breadcrumbs() 2012-03-02 20:46:19 +01:00
Ingo Schommer
c3f4db1d7d ENHANCEMENT Using new UploadField in ForeignKey scaffolding, replacing deprecated ImageField/FileField classes 2012-03-01 12:00:03 +01:00
Ingo Schommer
586ca7374f Merge pull request #202 from halkyon/date_changes
Date changes
2012-02-29 13:02:30 -08:00
Sean Harvey
8109a5e54d MINOR phpDoc to methods in Date, small tweaks to DayOfMonth method to be consistent with value checks 2012-03-01 09:56:05 +13:00
Ingo Schommer
da879da940 MINOR Styling and structural fixes for File/Image->getCMSFields() and relates usage in UploadField/HTMLEditorField. 2012-02-29 21:06:43 +01:00
Ingo Schommer
bcc73de85e Merge branch '106-add-edit-records-rc'
Conflicts:
	admin/code/LeftAndMain.php
	admin/css/screen.css
	admin/scss/_style.scss
	admin/templates/Includes/LeftAndMain_EditForm.ss
	css/GridField.css
	filesystem/Folder.php
	forms/gridfield/GridField.php
	forms/gridfield/GridFieldDefaultColumns.php
	forms/gridfield/GridFieldPopupForms.php
2012-02-27 23:58:10 +01:00
Julian Seidenberg
550f75408e ENHANCEMENT: File and Image CMSFields styling 2012-02-27 23:52:40 +01:00
AngryPHPNerd
0e2cbb0b88 Replace ereg with preg_* 2012-02-27 22:14:02 +01:00
Sean Harvey
58d48583a9 ENHANCEMENT Date::DayOfMonth() now supports ordinal argument, so you can get somehing like "10th" or "2nd". Also supported in Date::RangeString 2012-02-24 20:38:11 +13:00
Sean Harvey
8fdc531345 BUGFIX Ensure Date and Datetime field types actually set NULL, false, empty string values correctly instead of "1970-01-01" which gets saved to the database instead of NULL.
BUGFIX Datetime::Nice() and casting methods return NULL when there is no value, to be consistent with Date::Nice() and so on
2012-02-24 20:37:58 +13:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sean Harvey
591dd4efa9 BUGFIX SS_Map::keys() and SS_Map::values() are identical, keys() should return the *keys* not the values #6818 2012-02-11 11:46:20 +13:00
Andrew O'Neil
267050171a BUGFIX Fix HasManyList::removeByID() 2012-02-09 14:33:00 +13:00
Sam Minnee
d1a39b0b1a BUGFIX: Fixed operation of the onlyDeletedFromStage parameter of Hierarchy::liveChildren(). 2012-02-08 18:38:37 +13:00
Ingo Schommer
db5ac15bb1 MINOR Fixed spelling mistake in HasManyList 2012-02-03 01:00:12 +01:00
Ingo Schommer
8e3ce755cf MINOR Casting return values in HTMLText correctly (followup on security fixes applied to Text, Varchar, StringField) 2012-01-31 16:22:22 +01:00
Ingo Schommer
6ecf7ffe84 API CHANGE Deprecated Text->EscapeXML(), use DBField->XML() instead 2012-01-31 16:11:55 +01:00
Ingo Schommer
618d767dcb API CHANGE Removed XML escaping in DBField->LowerCase() and UpperCase(), in order to consistently allow SSViewer to deal with casting. Affects subclasses like Text, Varchar and HTMLText.
API CHANGE Deprecated StringField->Lower() and Upper(), use String->LowerCase() and UpperCase() instead. Moved methods from DBField to StringField.
2012-01-31 16:11:55 +01:00
Ingo Schommer
e1e5546ab6 BUGFIX Casting return values on text helper methods in StringField, Text, Varchar 2012-01-31 16:11:55 +01:00
Ingo Schommer
0b0d42c24e MINOR Formatting 2012-01-30 18:28:15 +01:00
Stig Lindqvist
056e564217 BUGFIX Subtract should not add order by on subselect 2012-01-27 18:27:24 +13:00
Stig Lindqvist
7f09b6931b API CHANGE DataList::subtract and DataQuery::subtract for subtracting a list from another list
Minor Stripped out ManyManyList tests from DataListTest into it's own test case
2012-01-26 17:59:43 +13:00
Dominik Beerbohm
09c1f8f576 Bad parameter forwarding from SS_ListDecorator (sort,filter,exclude) to i.e. DataList. 2012-01-17 00:34:54 +01:00
Ingo Schommer
9451993d74 API CHANGE Moved DataObject->writeWithoutVersion() to Versioned extension
BUGFIX Don't create new version on related VirtualPage records in SiteTree->onAfterWrite() when the write was triggered through writeWithoutVersion(). Use a new $_nextWriteWithoutVersion flag replacing the -1 Version number for this purpose (AIR-97)
2012-01-14 13:07:12 +01:00
Sam Minnee
d296a9411d Merge remote-tracking branch 'refs/remotes/scienceninjas/story/sort-by-relation-on-datalist' 2012-01-10 17:33:04 +13:00
Sam Minnee
3c1d62acfd API CHANGE: Added ArrayList::dataClass(), which will return the class of the first item in the list. 2012-01-10 16:58:49 +13:00
Ingo Schommer
d9538d3085 ENHANCEMENT Migrating AssetAdmin fields to File/Folder/Image->getCMSFields() 2012-01-09 21:17:53 +01:00
Sam Minnee
93eb2dda54 API CHANGE: Added ArrayList::byID(), to improve its compatibility with DataList. 2012-01-09 18:47:59 +13:00
Stig Lindqvist
3c516b7b97 API CHANGE: Refactored GridField modifiers into GridField_ColumnProvider, GridField_HTMLProvider, GridField_ActionProvider, and GridField_DataModifier interfaces, all added as components in the config.
API CHANGE: Simplified state handling so that it's just a key store. Affectors are replaced with GridField_ActionProviders. API CHANGE: Removed GridField state manipulation actions instead opting for GridField_ActionProvider actions.
API CHANGE: Removed support for modifiers that add "body" rows, instead having core support for generating the body rows hardcoded into the GridField.
API CHANGE: Allow modification of columns across the whole GridField with the GridField_ColumnProvider interface.
API CHANGE: Renamed GridField_AlterAction to GridField_Action, and added actionName/args parameters, since it can be used for all actions (including batch actions and row actions)
API CHANGE: Removed GridFieldRow class.
2012-01-09 13:30:34 +13:00
Sam Minnée
9a1644f9e1 Merge pull request #148 from ajshort/pull-2
Added GroupedList
2012-01-06 16:19:20 -08:00
ajshort
5242ed1051 FEATURE: Added GroupedList for grouping lists into sub-lists by common values of a field. 2011-12-26 19:48:53 +11:00
Simon Welsh
f7516481b1 BUGFIX Sanitise keys and tags before using them with Zend_Cache. 2011-12-23 10:38:37 +13:00
Stig Lindqvist
f59d11c91e MINOR DataList::sort() can sort by relation name 2011-12-18 04:28:09 +01:00
Stig Lindqvist
20554b1bf9 BUGFIX DataQuery::orderby() don't sort relations DESC 2011-12-18 04:21:00 +01:00
Stig Lindqvist
9bf247cc33 API CHANGE Introduced DataQuery::whereAny() and SQLQuery::whereAny() 2011-12-17 16:42:30 +13:00
Stig Lindqvist
aafdb8e01c API CHANGE All SS_List implementators supports filter, exclude and sort methods 2011-12-17 16:42:29 +13:00
Stig Lindqvist
2306ec94c3 MINOR Updated inline documentation and added visibility keywords to methods for SS_List, DataList and ArrayList 2011-12-17 16:42:29 +13:00
Sam Minnee
60ced3b167 BUGFIX: Added default value for limit on LimitCharacters() to prevent backwards-compat issue (fixes 0c3af805) 2011-12-17 16:41:54 +13:00
Sam Minnée
99b2430565 Merge pull request #131 from halkyon/master
Nice debug formatting for ArrayList and DataList
2011-12-16 18:05:09 -08:00
Sean Harvey
30f049bd26 ENHANCEMENT ArrayList and DataList now show a nice view of the items inside when using Debug::show() 2011-12-17 12:45:45 +13:00
Ingo Schommer
0c3af80514 BUGFIX Better handling of multibyte strings in LimitCharacters(), removed code duplication by more flexible base implementation at StringField->LimitCharacters() (Merge pull request #121 from edlund/sapphire) 2011-12-17 00:40:13 +01:00
Ingo Schommer
9b27a4c1be ENHANCEMENT More flexible URL filtering through new URLSegmentFilter API. Support for multibyte URL segments through URLPathFilter::$default_allow_multibyte. Abstraction from Convert::raw2url() (and SiteTree->generateURLSegment()) 2011-11-29 11:04:08 +01:00
Fred Condo
dbfd54ba50 BUGFIX: Get all method names to find cached images
Because some extensions add functions that generate cached images, deleteFormattedImages()
needs to find all the method names by passing true to allMethodNames().
2011-10-31 11:36:01 -07:00
Fred Condo
5f1faec3e2 BUGFIX: regex-escape strings to prevent regex syntax errors
Apply preg_quote to each generator name and to $this->Name so that their use in a
regular expression will not cause run-time errors.

Provided fixture and test.
2011-10-31 11:34:33 -07:00
Stig Lindqvist
260a9e230c BUGFIX Versioned returns error on singleton($className)->summaryFields()
This solves a bugfix when calling singleton($className)->summaryFields() and Versioned kicks back. It is needed to by the GridField functionality to get default columns to show.

This is due to DataExtension calls ClassName::extraStatics() when calling ::load_extra_statics() statically, we need to pass in class and extension.
2011-10-31 11:17:37 +13:00
Sean Harvey
dd48a605b6 BUGFIX Removing DB coupling in SQLQuery::orderby() stopping functions from being fixed in the select list when used in orderby
BUGFIX DataQuery::ensureSelectContainsOrderbyColumns() shouldn't mess with "_SortColumn*" fields created by SQLQuery::orderby()
2011-10-29 23:54:35 +13:00
Sam Minnee
1a0673fa3f API CHANGE: Remove deprecated db/build. 2011-10-29 17:44:56 +13:00
Sam Minnee
085598fac0 API CHANGE: Replaced ManyManyList::removeByFilter() with ManyManyList::removeAll(). 2011-10-29 17:36:39 +13:00
Sam Minnee
a5a94b520f MINOR: Remove uses of deprecated extendedSQL() 2011-10-29 17:36:39 +13:00
Sam Minnee
5ed14915bb BUGFIX: Fixed DataList::find() for find by ID and find multiple times. 2011-10-29 17:36:39 +13:00
Sam Minnee
0d683dd8ef MINOR: Removed use of deprecated join() in favour of innerJoin() and leftJoin(). 2011-10-29 17:36:38 +13:00
Sam Minnee
42b8d3da04 MINOR: Use FieldList over deprecated FieldSet 2011-10-29 17:36:38 +13:00
Sam Minnee
22e5617ee2 MINOR: Moved from use of deprecated SQLMap to SS_Map. 2011-10-29 17:36:37 +13:00
Sam Minnee
c8ce6f9f55 BUGFIX: Don't create unnecessary aliases in generated SQL. 2011-10-29 17:36:37 +13:00
Sam Minnee
a4ee0f4dad ENHANCMEMENT: Added SS_Map to replace SQLMap.
API CHANGE: Deprecate SQLMap.
2011-10-29 17:34:32 +13:00
Sam Minnee
0d0ad0e572 MINOR: Undeprecated Currency because the Money class is overkill in many situations where you're dealing with a single-currency system. 2011-10-29 17:34:32 +13:00
Sam Minnee
e5afa25522 MINOR: Use Deprecation class to indicate deprecated methods in core. 2011-10-29 17:34:31 +13:00
Sean Harvey
3bf983200b BUGFIX DataQuery: ensuring ORDER BY columns are set in SELECT clauses 2011-10-29 17:28:46 +13:00
Simon Welsh
f976af78be BUGFIX: Apply engine changes only if there is no existing FulltextSearch index on the table, and apply them before column index changes. 2011-10-29 16:57:10 +13:00
Simon Welsh
c8f1379407 Merge branch 'master' of git://github.com/silverstripe/sapphire 2011-10-29 13:55:50 +13:00
Simon Welsh
ca074eb7ba Changes default MySQL storage engine to InnoDB. File requires MyISAM for FulltextSearch. 2011-10-29 13:34:45 +13:00
Simon Welsh
6bf3f7ded4 Switches MySQLDatabase to use the MySQLi class rather than the mysql_* functions. 2011-10-29 13:34:11 +13:00
Stig Lindqvist
83e90aaafe ENHANCEMENT Release of DataGridPagination
This class extends the DataGridPresenter with the behaviour and looks of a paginated Datagrid.
2011-10-28 17:34:15 +13:00
Sam Minnée
92e8f6a2f4 Merge pull request #70 from stojg/ss_list-changes
API CHANGE Childclasses to SS_List matches the same signature on abstract
2011-10-27 20:09:25 -07:00
Stig Lindqvist
e38dd08ea5 MINOR: Fix docblocks to reference SS_List instead of (now deprecated) DataObjectSet where appropriate 2011-10-28 15:58:55 +13:00
Hamish Friedlander
0a3e0f15de MINOR: Replace references to FieldSet (now deprecated) with references to FieldList 2011-10-28 15:58:55 +13:00
Hamish Friedlander
4c0105a3c4 MINOR: Fix deprecated notices - change old references to 2.5 from ORM work to 3.0.0, and use new deprecation notice system 2011-10-28 15:58:55 +13:00
Stig Lindqvist
fb8ff50451 API CHANGE Childclasses to SS_List matches the same signature on abstract methods column and map.
This was failing under php 5.2
2011-10-22 16:08:51 +02:00
Fred Condo
9bd499617b Spelling correction
Found and fixed all misspellings of "[Hh]ierarchy"
2011-10-18 15:32:52 -07:00
Ingo Schommer
340a779cfd MINOR More transliteration matches for Lithuanian (fixes #6724, thanks zyzzza) 2011-10-10 10:14:19 +02:00
Ingo Schommer
c630f83344 BUGFIX Setting level in DataObject->getChangedFields() to 'value change' rather than 'type change' for CompositeFields, so they save correctly (fixes #6726, thanks frankmullenger) 2011-10-07 22:57:23 +02:00
Sam Minnee
0601384cda BUGFIX: Reapply decorator statics if it has been removed and re-added. (merged from r100706) 2011-10-07 14:12:50 +02:00
Ingo Schommer
8302af1ea8 ENHANCEMENT Added Database->getLock() and Database->releaseLock() for application-level advisory locks 2011-10-07 14:12:50 +02:00
Ingo Schommer
67568b08a3 MINOR Checking for valid field type in DataDifferencer (built-in fields like 'RecordClassName' can't be casted to a field object) 2011-10-07 14:12:50 +02:00
Ingo Schommer
55183ec386 BUGFIX Reset WHERE clause in SQLMap->getItem() to ensure it can be invoked more than once 2011-10-07 14:12:49 +02:00
Ingo Schommer
99355c0089 ENHANCEMENT Added new onBeforeDuplicate() and onAfterDuplicate() hooks to DataObject 2011-10-07 14:12:49 +02:00
Ingo Schommer
54b81a3953 MINOR Don't set cookies in CLI mode for Versioned (AIR-75) 2011-10-07 14:12:48 +02:00