Commit Graph

973 Commits

Author SHA1 Message Date
Geoff Munn
fc4756ddcd BUG FIX: function now() now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72925 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:24:50 +00:00
Geoff Munn
586a1888ee BUG FIX: allTablesSQL function now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:00:01 +00:00
Geoff Munn
53d551d2e6 API CHANGE: raw2sql now uses DB-specific method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:50:26 +00:00
Geoff Munn
cac97f9d78 API CHANGE: Auto-increment of ID column now DB-specific
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72921 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:48:59 +00:00
Geoff Munn
3201b4fd79 API CHANGE: addslashes function included for MySQL database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:48:30 +00:00
Geoff Munn
9448927b09 API CHANGE: NOW() replaced with DB-specific version
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:47:31 +00:00
Geoff Munn
8479c88e09 API CHANGE: Versioned fixed to use DB-specific ID auto-increment settings
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:44:58 +00:00
Geoff Munn
aec798623e API CHANGE: raw2sql changed to use DB-specific quote escaping
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72915 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:44:10 +00:00
Geoff Munn
8182a015f6 API CHANGE: "SHOW TABLES" replaced with DB-specific version
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72914 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:43:28 +00:00
Sam Minnee
fca5a8c573 Don't throw an error when trying to set the PastMember cookie if content has already been sent. It gets annoying when you're debugging.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 04:44:03 +00:00
Sam Minnee
189f0567f8 Merged from branches/2.2
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72811 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:17:26 +00:00
Sam Minnee
08a5a7c387 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72803 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:08:52 +00:00
Sean Harvey
c5d1a53281 MINOR Fixed Database class PHP notices caused by a missing array index when running dev/build to create a new table
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 02:02:14 +00:00
Geoff Munn
553f2e74af API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 05:14:45 +00:00
Sean Harvey
87f9f13c3b BUGFIX Fixed duplicate function committed in r72468
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72673 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 04:54:31 +00:00
Geoff Munn
fed4d9b862 API CHANGE: Databases now support index types such as hash, btree (default) and rtree.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 21:54:33 +00:00
Sam Minnee
a581e748d9 ENHANCEMENT: Added dev/tests/cleanupdb action to remove test databases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72463 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 07:31:23 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Geoff Munn
334cfc8f3e API CHANGE: function RequireField now explained a bit more clearly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 21:45:54 +00:00
Geoff Munn
6a21071e4c API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72426 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 21:44:21 +00:00
Ingo Schommer
2e8a572875 BUGFIX Requirements were ignored if only CSS requirements were present due to bug in Requirements::includeInHTML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72374 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 02:26:36 +00:00
Ingo Schommer
7f4f57c307 ENHANCEMENT Added i18n::get_lang_from_locale() and i18n::convert_rfc1766()
ENHANCEMENT Using IETF/HTTP compatible "long" language code in SiteTree->MetaTags(). This means the default <meta type="content-language..."> value will be "en-US" instead of "en". The locale can be either set through the Translatable content language, or through i18n::set_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72367 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-02 22:13:30 +00:00
Ingo Schommer
94c71b3447 MINOR Casting ViewableData->Even() and ViewableData->Odd() as boolean
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72359 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-02 20:25:18 +00:00
Ingo Schommer
4b4b7cca9a BUGFIX Fixed finding a translated homepage without an explicit URLSegment (e.g. http://mysite.com/?lang=de) - see #3540
ENHANCEMENT Added Translatable::get_homepage_urlsegment_by_language()
ENHANCEMENT Added RootURLController::get_default_homepage_urlsegment()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72054 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-22 21:30:41 +00:00
Geoff Munn
338bb01f1a API CHANGE: Column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-18 03:12:39 +00:00
Geoff Munn
0c5e363a68 API CHANGE: 'ID' columns now no longer appear as being changed in Postgres
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71943 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-17 03:54:39 +00:00
Geoff Munn
57dcdaa8be API CHANGE: 'Year' datatype now uses abstracted array structure
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-17 03:54:10 +00:00
Geoff Munn
345693a6e0 API CHANGE: RequireField now no longer returns *all* fields as needing to be changed in Postgres.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71927 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-17 02:49:39 +00:00
Sean Harvey
a1f21fe5ec MINOR Code formatting fixes in Requirements_Backend
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71906 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-16 21:10:03 +00:00
Sean Harvey
5012fcb3ca BUGFIX Fix errors if empty array passed for vars in Requirements_Backend::javascriptTemplate()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71905 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-16 21:08:54 +00:00
Sean Harvey
0b9db33164 BUGFIX MySQLDatabase->decimal() was being casted as an integer, when in actual fact the precision could be "9,2", for example
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71891 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-16 03:42:37 +00:00
Sean Harvey
0f1cf8899a BUGFIX Fixed calls to undefined function in Hierarchy. Should have been calling a property of the same name instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71838 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-14 03:02:16 +00:00
Sean Harvey
0ca4177e3b ENHANCEMENT Added getValue() to DBField. This helps for unit testing DBField values.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71833 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-13 09:30:32 +00:00
Geoff Munn
040913369d API CHANGE: The standard ID column is now database-specific
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71824 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-13 02:37:58 +00:00
Sean Harvey
7a065b087a ENHANCEMENT Strip tags before limiting characters when using LimitCharacters() on HTMLText field type
MINOR Added test to TextTest for LimitCharacters()
MINOR Added test HTMLTextTest and added test case for LimitCharacters()



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71795 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 09:38:43 +00:00
Sean Harvey
1d121b7f90 ENHANCEMENT Allow setting date timestamp for Date::setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 04:57:17 +00:00
Ingo Schommer
74ab33f23b ENHANCEMENT Added Director::is_absolute_url()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71707 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 21:07:58 +00:00
Sean Harvey
569447d2ba BUGFIX Added E_USER_ERROR error to ComponentSet::getExtraData() if a NULL component name is passed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 00:18:00 +00:00
Sean Harvey
1cb6b5c8ee BUGFIX Added E_USER_ERROR error to ComponentSet::getExtraData() if a non-numeric child ID is passed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71639 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 00:14:42 +00:00
Sean Harvey
df36ae07e8 ENHANCEMENT Allow getting extra field data for a many-to-many relation by calling getExtraData() on a ComponentSet and passing the component name, and child ID
ENHANCEMENT Hooked up setting field values for many_many_extraFields into ComplexTableField. See r71613 for the original many-to-many auto setting addition
BUGFIX When editing an existing record, many-to-many auto setting wasn't being done because saveComplexTableField() is called on ComplexTableField_ItemRequest
 


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71635 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 00:10:37 +00:00
Sean Harvey
bbe3bc0535 MINOR Code formatting of ComponentSet::add()
MINOR Removed unused variable $id in ComponentSet::add()



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71615 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 06:21:08 +00:00
Sean Harvey
fa4c42d642 ENHANCEMENT Allow auto setting a many-to-many relation on ComplexTableField in the similar fashion of auto setting the foreign key for a one-to-many or one-to-many relation.
ENHANCEMENT Added DataObject::many_many_extraFields() for getting the many_many_extraFields fields for a component name on both sides of a many-to-many relation.
MINOR Added test for many_many_extraFields in DataObjectTest



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 06:04:36 +00:00
Sean Harvey
bf07ed2d87 MINOR Code formatting for Date::past_date() and phpDoc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 05:56:07 +00:00
Geoff Munn
5312773e18 'URLSegment' on line 484 and 494 now escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 00:49:16 +00:00
Ingo Schommer
023e733b16 BUGFIX Fixed wrong condition in Requirements::includeInHTML() which failed to process requirements if only customCSS() was used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-08 19:06:15 +00:00
Ingo Schommer
5513f569b6 BUGFIX Including Hierarchy->children in flushCache() and renamed to _cache_children. This caused problems in TranslatableTest when re-using the same SiteTree->Children() method with different languages on the same object (even with calling flushCache() inbetween the calls)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71340 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-04 01:36:12 +00:00
Sean Harvey
b34713dffc BUGFIX Fix to Convert::xml2raw() for &apos;
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71325 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 23:17:01 +00:00
Sean Harvey
162a11350e MINOR Added code example for using DataObject::$many_many_extraFields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 21:07:32 +00:00
Sean Harvey
b3ffe8d4e2 MINOR Code formatting tidy up in Percentage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71301 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 20:29:21 +00:00
Sean Harvey
2f81c822bb BUGFIX: Fix translatable being enabled when it shouldn't be
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71258 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 02:49:34 +00:00