Commit Graph

422 Commits

Author SHA1 Message Date
Andrew Short
4a054c0cc5 FEATURE: Allow you to link to SiteTree? objects in HTMLText or HTMLVarchar fields by using a "[sitetree_link id=n]" shortcode.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88481 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:04 +00:00
Andrew Short
cf2cf11b57 ENHANCEMENT: Do not allow access to actions that have not been defined or do not have an action template.
ENHANCEMENT: Added Controller->hasActionTemplate() to check if a template exists for a specific action.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88477 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:01 +00:00
Andrew Short
365b4784a9 FEATURE: Refactored ViewableData. The main changes are:
* Values are not always casted before being rendered into a template.
	* Casting information can by dynamically provided by $casting_properties, rather than being hardcoded to $casting and $db.
	* Removed unneeded ViewableData_Iterator - ArrayIterator is instead used.
	* Removed ViewableData_ObjectCustomised - now just uses ViewableData_Customised.
ENHANCEMENT: Added template and value methods to database fields.
MINOR: Added ViewableDataTest and extended DataObjectTest.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88474 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:58 +00:00
Andrew Short
4ece35937f FEATURE: Added the Shortcode API (ShortcodeParser) to allow you to replace simple BBCode-like tags in a string with the results of a callback.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88472 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:57 +00:00
Andrew Short
75b875ae39 BUGFIX: Updated HTTP::findByTagAndAttribute() to be more versatile, especially when dealing with attributes containing special characters.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:55 +00:00
Sean Harvey
dbc560d59b MINOR Fixed broken SiteTreeTest in databases that don't support LIMIT. Instead of limit, just return the first record in the sorted set
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88242 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-07 02:08:06 +00:00
Ingo Schommer
09822abd09 BUGFIX Added setup/teardown routines to SiteTreeActionsTest to avoid breaking with Translatable enabled on recent canTranslate()/canEdit() extensions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 21:02:21 +00:00
Ingo Schommer
16a67fe479 BUGFIX Added setup/teardown routines to SiteTreeTest and SiteTreePermissionsTest to avoid breaking with Translatable enabled on recent canTranslate()/canEdit() extensions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88143 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 21:00:49 +00:00
Ingo Schommer
2506816ad6 ENHANCEMENT Added Translatable->getAllowedLocalesForMember()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88125 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:07:03 +00:00
Ingo Schommer
703d602450 BUGFIX Added required permissions to TranslatableSearchFormTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 19:47:00 +00:00
Ingo Schommer
0faf03ee4e API CHANGE Requiring TRANSLATE_ALL or TRANSLATE_<locale> permission for authors without administrative access to edit translations
ENHANCEMENT Added Translatable->providePermissions()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 10:33:36 +00:00
Will Rossiter
af9e4f59f5 MINOR: Reverted previous commit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88112 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 03:37:05 +00:00
Will Rossiter
620aa651aa FEATURE: added extend() call to enable FieldHolder() html to be customized via extensions.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88104 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 02:17:19 +00:00
Ingo Schommer
aa127e52c9 BUGFIX Fixed CSVBulkLoaderTest not to assume ID ordering in the assertions, which breaks with databases not ordering by PK automatically (e.g. Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88003 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-02 00:07:36 +00:00
Ingo Schommer
2310f85ce0 BUGFIX Fixed SearchContextTest not to assume ID ordering in the assertions
BUGFIX Fixed SearchContextTest capitalization of string assertions

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88000 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-02 00:05:19 +00:00
Ingo Schommer
277bffb664 BUGFIX Fixed SearchFilterApplyRelationTest not to assume ID ordering in the assertions, which breaks with databases not ordering by PK automatically (e.g. Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87926 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 22:20:04 +00:00
Ingo Schommer
8a4f2f2bf0 BUGFIX Fixed SoapModelAccessTest not to assume ID ordering in the assertions, which breaks with databases not ordering by PK automatically (e.g. Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87925 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 22:11:00 +00:00
Ingo Schommer
7ab121fcc5 BUGFIX Fixed RestfulServerTest not to assume ID ordering in the assertions, which breaks with databases not ordering by PK automatically (e.g. Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87922 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 22:07:50 +00:00
Ingo Schommer
afcf846b90 BUGFIX Fixed ID associations in TableListFieldTest (was assuming numerically ascending IDs, which isnt necessarily true in Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87913 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:51:58 +00:00
Geoff Munn
d9b1b66c2b BUG FIX: tests which aren't supported by Postgres temporarily disabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87897 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:04:46 +00:00
Geoff Munn
6d189756b3 Transaction test created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:04:18 +00:00
Geoff Munn
e603bb8915 MINOR: Dataobject now has enforced ordering
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87769 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 21:54:49 +00:00
Geoff Munn
a56db7cff1 MINOR: tests that don't work with Postgres disabled until a fix for ID requirements can be found
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87765 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 21:24:53 +00:00
Geoff Munn
fbe610ae13 MINOR FIX: column names escaped properly, plus ordering now on the query results
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87571 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:04:32 +00:00
Geoff Munn
6f9a17621a MINOR FIX: column names escaped properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87570 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:03:30 +00:00
Geoff Munn
59e5e25fbc MINOR FIX: column names escaped properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:03:05 +00:00
Sam Minnee
a18724c243 BUGFIX: Fix MemoryLimitTest not to fail on machines with <1G of memory and later versions of PHP 5.2.x that check available memory before setting memory_limit setting.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87234 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-24 07:14:30 +00:00
Ingo Schommer
2cb99122d3 BUGFIX Fixed content-type for SapphireSoapServer->wsdl() (#4570, thanks Cristian)
MINOR Added documentation for SapphireSoapServer

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86876 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-21 09:55:43 +00:00
Sean Harvey
2fdb548594 Merged Text::ContextSummary() changes from branches/2.3 - r82035 and r82036
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86669 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-18 02:53:46 +00:00
Geoff Munn
84e4d7fee1 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86533 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:27:16 +00:00
Geoff Munn
7a392bd91b MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86530 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:19:32 +00:00
Geoff Munn
e4005468f7 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86527 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:17:46 +00:00
Geoff Munn
8c313aa31d MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86526 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:17:27 +00:00
Geoff Munn
a711b459ce MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86525 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:17:06 +00:00
Geoff Munn
5e15362a32 MINOR FIX: columns quoted properly + database agnostic version of RANDOM() created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86505 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:04:09 +00:00
Geoff Munn
e1763ab4f2 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:03:22 +00:00
Geoff Munn
b1ab0a5bc0 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:02:53 +00:00
Geoff Munn
34db005f65 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86502 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:02:29 +00:00
Ingo Schommer
0b02436943 BUGFIX Fixed SearchFilterApplyRelationTest to match new SearchContext->addFilter() API: Needs the full name including relation instead of the ambiguous stripped name. This matches DataObject->scaffoldSearchFields() and getDefaultSearchContext()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-15 22:00:08 +00:00
Ingo Schommer
2b711fe45f MINOR Added ControllerTest for $allowed_actions with permission codes, switched this class to extend FunctionalTest and use get() instead of Director:;test() for this purpose (better login/session mocking capabilities)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86083 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 06:34:40 +00:00
Ingo Schommer
fc03a8608a API CHANGE Don't exempt 'index' controller actions from $allowed_actions check - they might still contain sensitive information (for example ImageEditor). This action has to explicitly allowed on controllers with $allowed_actions defined now.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86002 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 01:37:44 +00:00
Ingo Schommer
2cc0d016f4 API CHANGE Removed unnecessary WidgetFormProxy class and Widget->FormObjectLink(), broken functionality since the RequestHandler restructuring in 2.3. Use Widget_Controller instead.
FEATURE Added Widget_Controller class to enable nested forms within Wiget class.
ENHANCEMENT Changed WidgetArea.ss to iterate over $WidgetControllers instead of $Widgets, to allow forms rendered within to retain their controller context (through Widget_Controller and $failover mechanisms).
ENHANCEMENT Added handleWidgets() to ContentController to support new Widget_Controller class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-07 03:28:23 +00:00
Julian Seidenberg
2cf002e333 ENHANCEMENT: added option to truncate (clear) database table before importing a new CSV file with CSVBulkerLoader and ModelAdmin.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85709 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-04 00:31:08 +00:00
Ingo Schommer
5e3cffec1f BUGFIX More robust URL handling in SecurityTest to avoid failing on custom /admin redirects
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85514 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-01 06:48:31 +00:00
Ingo Schommer
04ae6d0f55 MINOR Added SiteTreePermissionsTest->testRestrictedEditLoggedInUsersDeletedFromStage(), which verifies that previous fixes in r85335 and r85336 apply the correct permissions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85338 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 06:56:13 +00:00
Ingo Schommer
685cd996a6 MINOR More robust RedirectorPageTest implementation that doesn't rely on _t() calls which are mysteriously failing on all subsequent calls in PHPUnit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85311 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 03:10:13 +00:00
Sam Minnee
e4ca69dc3f BUGFIX #4463: Set AuthorID and PublisherID correctly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 07:35:05 +00:00
Sean Harvey
a1d20b8ae9 BUGFIX #3228 Fixed undefined offset error in Text::BigSummary() if trying to summarise text that is smaller than the requested word limit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85076 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 06:16:56 +00:00
Sam Minnee
1e83a8b51e Ensure that DataObject->ClassName is set on object instantiation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84981 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-21 05:02:31 +00:00
Sean Harvey
df31edf8b6 MINOR Added unit test for DropdownField::performReadonlyTransformation()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84978 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-21 04:16:21 +00:00