Commit Graph

514 Commits

Author SHA1 Message Date
Hamish Friedlander
e8e4604457 API Prep DataList for immutability in 3.1 per 7673
DataList had several methods that should act on a copy and return
that copy, but was instead mutating the existing list.

We cant change this behaviour in the 3.0 line for backwards compt.
reasons, but this makes the desired behavior the default, and
makes disabling the mutation in 3.1 easier

It also introduces two new methods to deal with the common pattern
of wanting to modify the underlying dataQuery, which we want to be
able to reliably do in a way that always acts immutably. The main
method of these two is alterDataQuery
2012-07-20 15:58:18 +12:00
Hamish Friedlander
1ed41b8d67 API Prep ArrayList for immutability in 3.1 per 7673
ArrayList had several methods that should act on a copy and return
that copy, but was instead mutating the existing list.

We cant change this behaviour in the 3.0 line for backwards compt.
reasons, but this makes the desired behavior the default, and
makes disabling the mutation in 3.1 easier
2012-07-20 14:55:44 +12:00
Hamish Friedlander
c9b3430470 Update docs to indicate lists not mutable as per 7673 2012-07-20 14:51:12 +12:00
Ingo Schommer
3ae8b0b665 Merge remote-tracking branch 'origin/3.0' 2012-07-18 15:00:06 +02:00
Ingo Schommer
e0477321d3 Merge pull request #651 from willrossi/enumtidyup
API: Renamed EnumField::Lower() and EnumField::Upper() to LowerCase() and UpperCase()
2012-07-17 23:43:00 -07:00
Hamish Friedlander
e8cd675c94 BUG trac 7482 couldnt publish composite fields to live
When publishing to live, DataObject#forceChange is called, which wasnt correctly loading
in fields that were lazy (unloaded) if those fields were from composite fields
like Money. The end result is that any Money values would be forced to null on
publish to live

Also changes the API of the (internal, protected) loadLazyFields method so that
not passing a class argument just unlazys all lazy fields regardless of source table
2012-07-18 16:28:24 +12:00
Hamish Friedlander
69928631fe BUG trac 7482, we werent unlazying composite fields right
In getField we check if the field we are getting is currently lazy (unloaded), and
load it if it is. This was only working for simple fields though - composite
fields like Money werent working
2012-07-18 16:25:37 +12:00
Will Rossiter
a38bfc577c API: Deprecate EnumField::Lower() and EnumField::Upper() to LowerCase() and UpperCase() for consistency with StringField 2012-07-18 11:54:42 +12:00
Mateusz Uzdowski
70dcb55fe0 BUG Use prepStringForDB consistently across the framework.
Also remove a line from DBFieldTest, it's redundant with the previous
line.

Ref: os7229
2012-07-17 14:27:58 +12:00
Ingo Schommer
712f28bc78 Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
Ingo Schommer
55c348d01b Merge pull request #621 from chillu/pull/dbdatetimetest-offsets
Skip tests rather than throw PHP error on wrong offests in DBDatetimeTest
2012-07-06 02:34:19 -07:00
Ingo Schommer
e00c87541e Merge pull request #618 from chillu/pull/deprecate-profiler
API Deprecated Profiler class, removed related debug GET params
2012-07-05 13:43:37 -07:00
Ingo Schommer
64357a4522 Merge branch '3.0'
Conflicts:
	admin/css/screen.css
	admin/scss/_forms.scss
	docs/en/changelogs/3.0.0.md
2012-07-05 18:01:09 +02:00
Ingo Schommer
683d420247 NEW Database->supportsTimezoneOverride() 2012-07-05 16:16:36 +02:00
Ingo Schommer
0fe515e182 API Deprecated Profiler class, removed related debug GET params
Use third party tools like XHProf instead.
Removed defunct or unnecessary debug GET parameters:
debug_profile, debug_memory, profile_trace, debug_javascript, debug_behaviour
2012-07-05 12:02:06 +02:00
Hamish Friedlander
890f7e3919 BUG $db in extensions not inited early enough (#7598)
When querying DataObjects by a generic parent class (like SiteTree for instance), fields added via $db
set on child classes wouldnt appear.

This is because Object::__construct wasnt called early enough in DataObject::__construct, so
extensions werent initialised when $db was first accessed
2012-07-02 17:25:14 +12:00
Simon Welsh
cd0a1ff623 FIX DataQuery::applyRelation was returning the base class.
If the applyRelation() was passed a relation that went to a class with a parent
class with a database table, applyRelation would return the name of the parent
class, rather than the class the relation was actually too.
2012-06-29 21:54:48 +12:00
Will Rossiter
4ee709e88d FIX: ensure limits to SQLQuery are passed as positive values 2012-06-29 19:40:28 +12:00
Ingo Schommer
63afdba7a5 Merge pull request #584 from silverstripe-droptables/ssexpress
BUG: notify PaginatedList the full-text results are already limited.
2012-06-27 23:59:01 -07:00
Mateusz Uzdowski
3141e713b7 BUG: notify PaginatedList the full-text results are already limited.
PaginatedList needs to be notified about this, otherwise it will
errorneously try to further limit the already limited set, making the
subsequent pages empty.
2012-06-28 13:19:13 +12:00
Sam Minnee
b654b95472 BUGFIX: Allow Versioned::get_latest_version() and Version::get_version() to return results if the classname has changed.
Without this bugfix, if you had a Page that used to be a SiteTree, and you tried to use Versiond::get_version() or Versioned::get_latest_version() to return the older SiteTree version, nothing would be returned, because the results were being filtered by ClassName.  This caused bugs in the history panel for certain combinbations of page classname alteration.
2012-06-28 13:00:40 +12:00
Ingo Schommer
34a2ce23d8 NEW Documentation for Versioned 2012-06-27 16:09:31 +02:00
Ingo Schommer
868d3697fd Fixed usage of DataList etc in docs (fixes #7518) 2012-06-27 16:09:31 +02:00
Simon Welsh
070ba56104 FIX DataQuery::applyRelation was returning the base class.
If the applyRelation() was passed a relation that went to a class with a parent
class with a database table, applyRelation would return the name of the parent
class, rather than the class the relation was actually too.
2012-06-25 11:34:02 +12:00
Andrew Short
119da09549 BUG Fixed DataList filtering and excluding by ID.
If a filter or exclude by ID was applied across more than one table it
would throw an ambiguous column error as the table name was not specified.
2012-06-25 10:16:18 +12:00
Sam Minnee
1b5768975c BUG: exclude() clears previously selected filters() (Trac #7529)
This bug was caused by the fact that SQLQuery::whereAny() removed existing filters.  In line with addWhere() and setWhere(), I split this into addWhereAny() and setWhereAny().  Strictly speaking, this drops the method SQLQuery::whereAny(), but it was really just an internal function for exclude, and so I think that's acceptable.
2012-06-22 16:31:29 +12:00
Ingo Schommer
3a7128d00c MINOR Fixed phpdocs 2012-06-20 23:59:16 +02:00
Ingo Schommer
88582e7483 Revert "BUGFIX Aborting marking in Hierarchy->markPartialTree() before loading nodes, if the expected node count would exceed the totals (regardless of the in-memory marking state)"
This reverts commit f1bf0d0fc4. Fixes #7481
2012-06-15 11:53:33 +02:00
Sam Minnée
d014b4d106 Merge pull request #539 from simonwelsh/transliterator_rename
API CHANGE Renames Transliterator to SS_Transliterator
2012-06-14 20:59:56 -07:00
Simon Welsh
9bd7765272 API CHANGE Renames Transliterator to SS_Transliterator
The intl extension in PHP 5.4 provides a Transliterator class, which
conflicts with the SilverStripe one. This leads to some really weird
ReflectionExceptions about Transliterator's constructor being
private.
2012-06-15 15:54:47 +12:00
Sean Harvey
538bcdc74d BUGFIX Ensure that the DataList is being used correctly when applying filters in HtmlEditorField and Hierarchy 2012-06-15 15:49:22 +12:00
Sam Minnee
a1e7c1f9bf BUGFIX: Updated MySQLDatabase::indexList() to return index columns escaped by double quotes 2012-06-15 13:25:50 +12:00
Sam Minnée
a93dd9459e Merge pull request #496 from sminnee/dataquery-aggregate
Dataquery aggregate
2012-06-14 17:20:35 -07:00
Sam Minnée
aebfea7f68 Merge pull request #505 from schmengler/index-fix
BUGFIX: Added double quotes to column names in automatically generated i...
2012-06-14 17:19:48 -07:00
Sean Harvey
0a2e877625 MINOR Remove PostgreSQLDatabase boolean workaround in
DataObject::__construct()

The database adapter uses smallint instead of the boolean datatype,
which works around the issue instead of converting the value.
2012-06-12 14:21:59 +12:00
Sean Harvey
59e68f16da MINOR Remove MSSQLDatabase date/datetime workarounds from DataObject::__construct()
These are being handled by the MSSQLDatabase class in the mssql module
instead, which keeps the workarounds separated from the framework core.
2012-06-12 12:25:15 +12:00
Sam Minnee
1aefc0aa94 BUGFIX: Ensure that extensio arugments are passed when temporarily instantiating for setting up statics. 2012-06-11 22:56:11 +12:00
Sam Minnee
114ebb6953 API CHANGE: Don't have any instance caching in singleton(), rely on Injector for this. 2012-06-11 22:41:12 +12:00
Sam Minnee
f65a7c6b21 API CHANGE: Remove dodgy DataObject::destroy() behaviour, opting instead for using PHP5.3's garbage collector. 2012-06-11 22:41:12 +12:00
Sam Minnee
e19ab7aa5a BUGFIX: Ensure that DataList::filter() doesn't modify the original object. 2012-06-06 16:13:54 +12:00
Sam Minnee
0821f021cc API CHANGE: Added DataList::filterByCallback() to allow filtering by PHP code. 2012-06-06 16:12:05 +12:00
Sam Minnee
780f2d2b16 API CHANGE: Added DataQuery::aggregate() to allow for aggregates beyond Min, Max, Avg, Sum. 2012-06-06 16:12:05 +12:00
Sean Harvey
13be7cb2b9 BUGFIX Ensure that enum values with a single quote are escaped correctly for PHP coming out of MySQL ('' to \'), otherwise dev/build shows these as changed all the time. 2012-06-06 10:39:00 +12:00
Fabian Schmengler
afdd8683e4 BUGFIX: Added double quotes to column names in automatically generated indexes for many_many relationships (this time in the right place, should not interfere with index name - all tests pass) 2012-06-05 11:51:04 +02:00
Sam Minnee
5499079c1c BUGFIX: Fixed ORM bugs introduced in ec55468932 2012-06-05 11:07:19 +12:00
Sam Minnée
f8921f7c9f Merge pull request #500 from nyeholt/injector_strong_create
RECOMMIT This is a recommit of a previously merged, but reverted, commit...
2012-06-04 15:32:19 -07:00
Sam Minnée
90378b0998 Merge pull request #504 from schmengler/namespace-fixes-rc1
BUGFIX: Handling of classes with namespaces in database
2012-06-04 15:31:26 -07:00
Fabian Schmengler
ec55468932 BUGFIX: Handling of classes with namespaces in database
MySQLDatabase::enumValuesForField() - Added stripslashes because backslashes are escaped in the type description

DataObject::requireTable() - Added double quotes to column names in automatically generated indexes for many_many relationships

DataObject::write() - Escaped class name for DB query

DataQuery::getFinalisedQuery() - Escaped class names for DB query
2012-06-04 20:22:37 +02:00
Marcus Nyeholt
82a1e7d282 MINOR Use injector for creating Member_GroupSet object
MINOR Use injector for creating many many list objects

MINOR Use injector for creating objects from within the DataList

MINOR Use Injector::inst() for creating objects; cannot rely on this->injector being present due to many classes being created with 'new', so use inst() directly

MINOR Remove injector autoset property for now; automatically setting it breaks a few test cases that don't know about it for now, and it's not needed just yet
2012-06-05 01:33:44 +10:00
Marcus Nyeholt
ae7fc6f4d2 RECOMMIT This is a recommit of a previously merged, but reverted, commit. The initial commit had problems when running "tests/all flush=all" when dev/build would re-analyse a bunch of stuff; fixes to address this went into https://github.com/silverstripe/sapphire/pull/487, but for some reason the actual base changes didn't, so I'm re-submitting them in a separate pull.
BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through

CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-06-03 20:41:00 +10:00
Sean Harvey
c4a1523fac Merge pull request #465 from halkyon/aggregate_fixes
Deprecated aggregates fix
2012-05-30 02:04:36 -07:00
Sean Harvey
909c5bd3b1 MINOR Fixed spelling error 2012-05-29 20:10:34 +12:00
Sean Harvey
f43273f217 MINOR Provide a better error if incorrect number of arguments are passed
to filter() or exclude() on a DataList
2012-05-29 20:09:36 +12:00
Sean Harvey
792c89e103 ENHANCEMENT Adding List() in the GenericTemplateGlobalProvider so
templates can use <% cached List(Member).max(LastEdited) %> instead
of deprecated "Aggregate" syntax.
2012-05-29 20:04:51 +12:00
Sean Harvey
c3eabffcb9 MINOR Use shorthand {class}::get() syntax instead of DataList::create()
in core code.
2012-05-28 21:13:42 +12:00
Sean Harvey
862d7f249b MINOR If $containerClass passed in to DataObject::get() isn't DataList,
use Deprecation::notice() instead of throwing a notice
2012-05-28 21:12:06 +12:00
Sean Harvey
9074f524cc BUGFIX Fixing regression in Boolean::scaffoldSearchField() 2012-05-24 14:13:55 +12:00
Sam Minnée
c5616f8724 Merge pull request #487 from nyeholt/injector_bugfixes
Change singleton and strong_create to use dependency injector, with additional fixes to existing classes to behave correctly
2012-05-23 18:46:48 -07:00
Sean Harvey
1ed5e3c9be Merge pull request #485 from halkyon/deprecate_director_statics_for_controller
Deprecate director controller static functions
2012-05-23 15:54:57 -07:00
Marcus Nyeholt
82495f5a7e BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector

BUGFIX: Provide default constructor values for classes (fixes issues when used in 'singleton' scenario during dev/build in particular)

MINOR Clear out injector state when resetting db schema during tests (a follow on from changing singleton() calls to use the injector underneath)
2012-05-23 21:10:04 +10:00
Sean Harvey
60c72c40d9 API CHANGE Use of the DropdownField $emptyString argument is now
properly deprecated (has been marked as deprecated since 2.3). Please
use setEmptyString() on the DropdownField instance instead.
2012-05-23 22:59:40 +12:00
Sean Harvey
77c2365b87 MINOR Replacing deprecated static function calls to Director with
current Controller instance replacements.
2012-05-23 21:50:02 +12:00
Sean Harvey
29e04a1049 Revert "BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through"
This reverts commit 5eaca340b4.
2012-05-23 09:52:57 +12:00
Marcus Nyeholt
5eaca340b4 BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-05-22 19:09:35 +10:00
Sean Harvey
e5e8f489a2 Merge branch (pull request #247) 'template-global-fixes' of https://github.com/sminnee/sapphire into sminnee-template-global-fixes 2012-05-19 15:39:59 +12:00
Yuki Awano
c04b01fc2a BUGFIX Changed Date.php and DateTime.php to use DateTime->Format instead of strtotime to handle extended dates on 32bit environment(fixes #7311) 2012-05-18 16:09:38 +09:00
Sam Minnee
7201f06476 API CHANGE: Added new config option Money.default_currency. 2012-05-18 16:15:13 +12:00
Ingo Schommer
8f2ede8fcf MINOR Fixed syntax errors from SQLQuery/DataQuery cleanup 2012-05-16 13:17:19 +02:00
Ingo Schommer
3a11c690ed MINOR Updated security documentation (phpdoc and markdown) around new DataList and SQLQuery APIs, additional automatic escaping on some stricter inputs like column names 2012-05-16 11:59:22 +02:00
Ingo Schommer
9326d9e60e BUGFIX Fixing SQLQuery->getFilter() usage of non-existent method (removed during refactoring of pull request), more accurate deprecation notice 2012-05-15 21:29:43 +02:00
Sean Harvey
b1104dac25 BUGFIX Don't try lazy loading fields when the record ID is set to something non-numeric, otherwise you'll get a SQL error. 2012-05-15 17:18:50 +12:00
Sean Harvey
a53cca8932 MINOR Renaming getFieldSet with getFieldList in FormScaffolder 2012-05-14 15:03:22 +12:00
Sean Harvey
0fe0d87d9f Merge pull request #434 from halkyon/using_non_deprecated_template_controls
Replacing use of deprecated <% control %> with <% with %> or <% loop %> as necessary
2012-05-11 15:08:16 -07:00
Ingo Schommer
13c9011082 Merge pull request #430 from halkyon/getallfields_fixes
MINOR Fixing use of deprecated getAllFields(), mark field as deprecated ...
2012-05-11 01:04:38 -07:00
Sean Harvey
6f672e5f36 MINOR Fixing use of <% control %> with <% with %> or <% loop %> as necessary. 2012-05-11 13:49:20 +12:00
Sean Harvey
46f51d5653 MINOR Fixing deprecated use of SQLQuery 2012-05-11 11:39:06 +12:00
Sean Harvey
1859070fa9 MINOR Fixing use of deprecated getAllFields(), mark field as deprecated properly. 2012-05-11 11:23:24 +12:00
Sean Harvey
56e75b4486 MINOR Revert changes for 5.4 2012-05-10 14:11:33 +12:00
Sean Harvey
f30a3bd760 BUGFIX Database::doesSchemaNeedUpdating() if schemaUpdateTransaction is NULL, then return FALSE. If schemaUpdateTransaction is an array, then return TRUE. This replaces the automatic casting which is not clear. 2012-05-10 13:58:29 +12:00
Ingo Schommer
8281678d4c BUGFIX Urlencode paths in URLSegmentFilter when $allowMultibyte=true to avoid creating invalid URLs (and breaking assumptions based on ascii-only URLs, such as static publishing filename creation) 2012-05-08 15:32:15 +02:00
Ingo Schommer
59d31c2fc2 MINOR Removed mbstring support checks, its an installation requirement 2012-05-08 15:32:15 +02:00
Sean Harvey
7c272d3139 MINOR SQLQuery doc cleanup 2012-05-07 17:11:10 +12:00
Sean Harvey
3bc1da0543 MINOR Tidy up of SQLQuery constructor docs and default args, limit is
stored internally as an array, not a string.
2012-05-07 17:07:30 +12:00
Sean Harvey
bb9ffd2eb1 ENHANCEMENT SQLQuery::selectField() returns a SQLQuery object to be
consistent with how the other add/set methods work.
MINOR Fixing DbDatetimeTest to use the correct selectField to select an
alias
2012-05-07 16:59:42 +12:00
Sean Harvey
e50f90bf8e BUGFIX Ensure end bracket for HAVING clause is put in the right place 2012-05-07 16:36:05 +12:00
Sean Harvey
051d9de482 API CHANGE Deprecated internal access to SQLQuery properties, update core code to reflect these changes.
Using set/add instead in accessor methods, and use Database::sql*ToString() to allow easier per-database adapter SQL overloading.
2012-05-07 14:21:44 +12:00
Ingo Schommer
68051fdb96 Merge pull request #371 from halkyon/sapphire
---

Dont start the session until its actually necessary, which is to say there is a cookie available with the current PHP session name (or a request variable with the session_name() - typically PHPSESSID.) The latter allows for passing session ID through as an alternative to cookies.
2012-05-03 14:58:09 +02:00
Sean Harvey
37369abf1d BUGFIX Fixing SortColumn alias to be recognised by MSSQL/PGSQL 2012-05-03 12:02:21 +12:00
Sean Harvey
151abde17d Merge pull request #388 from chillu/trac/7170-i18n-sprintf-injections
#7170 i18n sprintf injections
2012-05-02 16:18:30 -07:00
Sam Minnée
a004acfb59 Merge pull request #381 from AngryPHPNerd/patch-2
MINOR: Colliding field check runs twice
2012-05-02 14:14:40 -07:00
Ingo Schommer
7b18d9d0da MINOR Switching _t() calls from sprintf() to using injection parameters (#7170) 2012-05-01 22:17:00 +02:00
Ingo Schommer
2288d80c30 Merge pull request #387 from sminnee/sapphire
---

The primary goal of this branch was to fix the sort bugs in AssetAdmin, however, it started a bit of a yak shave in that the API around SQLQuery was poor.  The biggest change that this pull request makes is it changes the format of SQLQuery::$select to contain aliases as array keys (and consistently puts the "implicit alias" in there to assist with various query generation logic), but it also makes a bunch of changes to avoid direct access of that property.
2012-05-01 17:57:03 +02:00
Sam Minnee
2207e3d978 API CHANGE: Add SQLQuery::prepareSelect(), to further remove the need for direct property access.
API CHANGE: Change the format of SQLQuery::$select to use aliases as keys.
2012-05-01 18:15:11 +12:00
Sam Minnee
a8e8a6060a BUGFIX: Fixed errors caused by complex raw SQL sort() calls. (#7236) 2012-05-01 18:15:08 +12:00
Sam Minnee
5abf8cf0f3 BUGFIX: Don't select *any* column() in DataQuery::initialiseQuery(); leave that until finaliseQuery(). It shouldn't be necessary and just risks field collisions. 2012-05-01 17:57:44 +12:00
Sam Minnee
8661164c19 API CHANGE: Add SQLQuery::clearSelect(), SQLQuery::selectField() and SQLQuery::itemisedSelect() to make it easier for other subsystems to use SQLQuery without resorting to direct property access.
API CHANGE: Remove DataQuery::select() in place of DataQuery::selectField().
BUGFIX: Remove direct property access to SQLQuery::$select
2012-05-01 17:57:39 +12:00
Sean Harvey
0882741f54 API CHANGE Renamed setModel for DataModel instances to setDataModel for
semantics, and also to allow a field name called "Model"
2012-05-01 14:45:44 +12:00
Sean Harvey
c84254c5b1 API CHANGE Rename SQLQuery prepareSelect to prepareWhere 2012-05-01 12:04:11 +12:00
Dominik Beerbohm
fdd5e71ba9 ENHANCEMENT: Remove unnecessary NULL check. 2012-04-30 13:44:31 +03:00
Robert Curry
ff6909df97 ENHANCEMENT: Add lazy loading to DataQuery. 2012-04-30 16:12:15 +12:00
Sean Harvey
80575a0e5e MINOR Re-adding getFilter as a deprecated method instead of removing it 2012-04-27 16:56:07 +12:00
Sean Harvey
f63d137d49 ENHANCEMENT Session::start() now only called when there is changed
session data to be saved, and started on Director::direct() when there
is a cookie (or request var) containing the current PHP session name.
2012-04-27 16:28:46 +12:00
Will Rossiter
9938b64cf6 FEATURE: implement SS_Sortable->reverse()
API CHANGE: SQLQuery:: now an array object rather than string. Existing strings will continue to work
2012-04-27 15:54:14 +12:00
Mateusz Uzdowski
6469d83569 API CHANGE: add a remote relation class getter to DataObject 2012-04-23 15:01:55 +12:00
Sean Harvey
1683299d81 MINOR Ignore any values that come through as arrays in DataObject::cache_composite_fields() 2012-04-20 15:25:52 +12:00
Sam Minnee
8e48e6e231 API CHANGE: Allow <classname>::get(), eg, Member::get()->byID(5) 2012-04-20 14:58:24 +12:00
Will Rossiter
585417d141 Merge pull request #343 from halkyon/object_static_remove_deprecation
BUGFIX Remove calls to deprecated Object static methods, update ConfigTest
2012-04-19 14:41:45 -07:00
Ingo Schommer
a1327faae4 Merge pull request #344 from halkyon/remove_deprecated_extrastatics_usage
ENHANCEMENT Remove use of deprecated extraStatics in core files
2012-04-18 15:42:51 -07:00
Sean Harvey
4cf8db3ee4 ENHANCEMENT Remove use of deprecated extraStatics in core files 2012-04-19 08:37:51 +12:00
Ingo Schommer
7f62ad0f3e Merge branch 'master' into 7094-combine-tree-edit-view 2012-04-18 14:19:55 +02:00
Sean Harvey
4c6be2931b BUGFIX Removing use of deprecated Object static functions like
get_static(), set_static(), uninherited() etc. Replace with equivalent
Config system get(), update()
2012-04-18 23:10:57 +12:00
Sean Harvey
7d84aff01e Merge pull request #339 from ajoneil/remove-pre-53-support
Remove pre 5.3 support
2012-04-17 16:19:23 -07:00
Andrew O'Neil
fb3b03f38b MINOR: Remove support for PHP <5.3.2 2012-04-18 11:01:03 +12:00
Mateusz Uzdowski
be97535b1e ENHANCEMENT: add an infinite-loop check as validation in Hierarchy (os4399)
Check only when the parent has changed - hierarchy traversal is
expensive operation, so we do it only when it is needed.
2012-04-18 10:50:35 +12:00
Mateusz Uzdowski
42e6ae2cdf APICHANGE: add validation extension hook to DataExtension 2012-04-18 09:25:48 +12:00
Ingo Schommer
761bae3418 ENHANCEMENT Support for anonymous functions instead of eval() in Hierarchy->getSiteTreeAsUL() 2012-04-17 22:29:38 +02:00
Mateusz Uzdowski
59663f9289 BUGFIX: fix up some E_STRICT errors 2012-04-17 11:51:55 +12:00
Ingo Schommer
d44f6b3e1f MINOR Removed deprecated usage of $priority argument in _t() calls 2012-04-15 17:17:17 +02:00
Ingo Schommer
b81863cfd9 MINOR Caching DataObject->fieldLabels() in memory, to avoid _t() being called excessively through fieldLabel() 2012-04-15 17:17:17 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Ingo Schommer
8ba9c3ca6b API CHANGE Removed $params argument to DataObject->getCMSFields(), please use FormScaffolder directly (fixes #7135) 2012-04-13 15:46:47 +02:00
Ingo Schommer
c73b80049a MINOR Removed usage of deprecated Object::uninherited_static() in core, improves CMS loading speed in live mode by ~3.5% 2012-04-12 18:26:56 +02:00
Mateusz Uzdowski
ae5bd7d65e ENHANCEMENT: refer to cache statics explicitly via DataObject (os6175)
Unify the usage across the class. Since the intention is to have a
single site-wide cache, calling via DataObject seems to be a better
option - self could theoretically end up calling a redefined field from
a subclass.
2012-04-12 17:04:24 +12:00
Mateusz Uzdowski
aedadebae6 BUGFIX: adjust the cache flush and reset functions to cover all caches (os6175) 2012-04-12 17:04:22 +12:00
Mateusz Uzdowski
8ea2460e50 BUGFIX: make internal DataObject caches more consistent (os6175) 2012-04-12 17:03:18 +12:00
Mateusz Uzdowski
621b2e1888 APICHANGE: deprecate DataObject::setComponent, no longer does anything. 2012-04-12 17:02:09 +12:00
Mateusz Uzdowski
360e9df54e MINOR: fix typo 2012-04-12 16:22:36 +12:00
Sam Minnée
d766100335 Merge pull request #304 from halkyon/e_strict_fixes
Enable E_STRICT by default for development, fix all E_STRICT errors affected by tests.
2012-04-11 17:54:18 -07:00
Sam Minnee
aa659a2326 MINOR: Fixed classname displayed in Hierarchy::markChildren() error. (#4406) 2012-04-12 12:38:07 +12:00
Sean Harvey
6b40377a1c BUGFIX Time::setValue() now conforms to DBField::setValue() for E_STRICT compliance. 2012-04-12 12:08:22 +12:00
Sean Harvey
9a9cebb369 MINOR Versioned::add_to_class() now conforms to parent
DataExtension::add_to_class() with $args being optional (default to
null). This is for E_STRICT compliance.
2012-04-12 12:07:35 +12:00
Sean Harvey
41433f1211 BUGFIX Fixing FulltextSearchable and Hierarchy to conform to the parent DataExtension for E_STRICT compliance. 2012-04-12 12:06:02 +12:00
Sean Harvey
9bd7068394 MINOR Fixed class documentation for CompositeDBField 2012-04-12 12:04:58 +12:00
Ingo Schommer
ac45e5b9c0 Merge branch 'integration'
Conflicts:
	admin/css/ie8.css
	admin/css/screen.css
	admin/scss/_style.scss
	dev/install/config-form.html
	dev/install/install.css
	dev/install/php5-required.html
2012-04-11 16:31:12 +02:00
Andrew O'Neil
75c5134bc9 BUGFIX: Fix Money::setValue() using old api 2012-04-11 15:30:38 +12:00
Andrew O'Neil
bdb312c665 API CHANGE: DBField::hasValue() conflicts with ViewableData::hasValue(), use DBField::exists() instead. 2012-04-11 14:48:06 +12:00
Ingo Schommer
8c5e56fe31 Merge branch 'master' into integration
Conflicts:
	admin/css/screen.css
	dev/install/php5-required.html
2012-04-09 21:10:08 +02:00
Julian Seidenberg
e76913f811 API-CHANGE: adding a default option of null to the $args argument in DataExtension::add_to_class. The args argument isn't used anywhere in the class and adding a third argument to every call to this function is tedious. 2012-04-05 14:15:00 +12:00
Ingo Schommer
40d73127ae MINOR Using late static binding instead of Object::create() calls 2012-04-04 17:10:31 +02:00
Ingo Schommer
6517f4496b Merge pull request #273 from ajoneil/sapphire
---

This allows DataList::create(SiteTree) as equivalent to Object::create(DataList, SiteTree), without
having to have a create() function on DataList.

Required for E_STRICT compliance, as child classes cant override create() if they change the arguments.

DBField::create() is also renamed to DBField::create_field(), as this does not just call the constructor, which all other cases of create() do.

Conflicts:
	tests/model/DateTest.php
	tests/model/DatetimeTest.php
2012-04-04 16:48:16 +02:00
unclecheese
59706d5bf5 Using deprecated StringField::Upper() and StringField::Lower(). Calling $MyEnumField.Upper on the template returns an unresolvable deprecation error. 2012-04-03 15:58:17 -03:00
Sam Minnee
58433d38ce BUGFIX: Tidied up relObject() behaviour on DataLists to restore broken SearchContext functionality. 2012-03-30 15:59:57 +13:00
Sean Harvey
e097f6e1a8 MINOR Fixes to method arguments in core classes for E_STRICT support.
API CHANGE Remove abstract static function and just use static functions
in Authenticator (PHP 5.3+ doesn't support abstract static functions)
2012-03-28 22:41:42 +13:00
Normann Lou
9e60225064 MINOR : Update core docs to use DataList::create() rather than DataObject::get()/get_one()/get_by_id() where appropriate - Trac#6891 2012-03-27 17:02:18 +02:00
Andrew O'Neil
de2832e65f ENHANCEMENT: Allow Object::create() to be called with late static binding.
This allows DataList::create('SiteTree') as equivalent to Object::create('DataList', 'SiteTree'), without
having to have a create() function on DataList. Required for E_STRICT compliance.
2012-03-27 17:57:42 +13:00
Sam Minnee
2576944a45 API CHANGE: Added DataObject::relField(), which pushes the "relation dot syntax" code of TableListField/GridField back to the model.
BUGFIX: Made DataObject::relObject() more flexible; allowable thanks to new ORM.
2012-03-24 14:04:08 +13:00
Sean Harvey
02c8019bb8 ENHANCEMENT Introduce Database::prepStringForDB(), used by
DBField::prepValueForDB() and StringField::prepValueForDB() to ensure
the field value is escaped correctly for the database. This means
databases like MSSQL can introduce an "N" prefix (marking text as
unicode to be saved correctly) by overloading the
prepStringForDB method. MySQL, PostgreSQL and SQLite3
operate as usual.
2012-03-20 21:20:35 +13:00
Sam Minnee
8bbfa970d7 API CHANGE: Remove Controller::Now(), as it was only ever a template global provider, and use the new TemplateGlobalProvider interface on SS_Datetime instead. 2012-03-16 15:05:28 +13:00
Sean Harvey
f5a91cbbe8 ENHANCEMENT SS_Map_Iterator::rewind() SS_Map_Iterator::current() will
return the titleField if there's a method of the same name (same
behaviour as DataObjectSet::map() from SS 2.4)
2012-03-15 17:28:00 +13:00
Ingo Schommer
2555ccb543 BUGFIX Qualify join table in ON clause in ManyManyList to avoid ambiguous column names 2012-03-14 22:44:07 +01:00
Ingo Schommer
687a1ca72b BUGFIX Don't include has_many/many_many relationships in DataObject->scaffoldFormFields() when the record doesn't have an ID yet - as the scaffolded GridFieldAddExistingAutocompleter component assumes the component has an ID to query against (fixes #5723) 2012-03-14 22:44:07 +01:00
Sean Harvey
f63497d6f9 ENHANCEMENT Extension arguments are now passed through to add_to_class()
static function on Extension classes.
BUGFIX FulltextSearchable didn't pass through arguments, use now
available $args parameter with FulltextSearchable::add_to_class()
2012-03-12 16:14:47 +13:00
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