Commit Graph

504 Commits

Author SHA1 Message Date
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
Sean Harvey
2cca0b0a7b API CHANGE Added SSLogFileWriter to replace Debug::log_errors_to() and Debug::log_error_if_necessary() - the existing formatting for the Debug deprecation functions is now wrapped into SSLogErrorFileFormatter
MINOR Moved SSErrorLogTest to SSLogTest
MINOR Documentation updates for SSLog and other bits and pieces



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 21:55:03 +00:00
Sam Minnee
dfbd16e140 BUGFIX: Fixed querying of composite fields (broken due to inappropriate optimisation of hasField)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84796 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:59:40 +00:00
Sam Minnee
e0e12aeb40 BUGFIX: Reverted some changes from r84163 because they broke cases where you have two fields of the same name on different subclasses.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:34:28 +00:00
Sean Harvey
a682ab9c0e API CHANGE Moved Debug::backtrace() to SSBacktrace::backtrace()
API CHANGE Moved Debug::get_rendered_backtrace() to SSBacktrace::get_rendered_backtrace()
ENHANCEMENT Added SSLog, SSLogEmailWriter and SSLogErrorEmailFormatter for silverstripe message reporting
API CHANGE Debug::send_errors_to() and Debug::send_warnings_to() are deprecated in favour of SSLog. See class documentation for SSLog on configuration of error email notifications
MINOR Added SSLogTest for basic testing of the SSLog and SSLogEmailWriter classes



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84774 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 03:55:23 +00:00
Ingo Schommer
26ff1f9264 MINOR Added test for SiteTree::get_by_url() in TranslatableTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84576 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-17 22:46:39 +00:00
Sam Minnee
2b7572e21a BUGFIX: Removed some code that needed Extension to extend from Object.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84162 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:50:32 +00:00
Sam Minnee
5790ddf708 API CHANGE: Added DataObject::is_composite_field() and DataObject::composite_fields() to efficiently keep track of which fields are composite.
API CHANGE: Deprecated DataObject::databaseFields() in favour of the static DataObject::database_fields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84161 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:49:52 +00:00
Sam Minnee
d5cf940d69 API CHANGE: Make Object::uninherited_static() have a separate execution path to Object::get_static(), for more reliable operation. The intention is that for any given static, you either use Object::get_static() or you use Object::uninherited_static() - not both.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84151 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 05:01:17 +00:00
Normann Lou
869625dcc5 ENHANCEMENT: add more assertion in SearchFilterAapplyRelationTest to test more cases for many_many relation.
MINOR: fine tuning using DataObjectSet::column('ID') to get the object's ID, instead of DataObjectSet::First()->ID

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84149 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 04:58:37 +00:00
Normann Lou
575bb1a3f5 ENHANCEMENT: add more assertion in SearchFilterAapplyRelationTest to test more cases for many_many relation.
MINOR: fine tuning using DataObjectSet::column('ID') to get the object's ID, instead of DataObjectSet::First()->ID

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84117 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 00:11:17 +00:00
Normann Lou
95a8939c7e ENHANCEMENT: add "InnerJoin" clause for an has_many component's ancestry classes for SearchFilter::applyRelation() so that an searchfliter could filter on that component's ancestry's field. add unit tests for this enhancement and r83500
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84113 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 23:34:32 +00:00
Sam Minnee
50176c631b BUGFIX: Fixed filtering by archive date
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84092 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 04:35:50 +00:00
Normann Lou
5c68bb3bde BUGFIX: an time field input between 12:00pm to 12:59pm can't save back to database or always save as 00:00:00.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 03:56:59 +00:00
Sam Minnee
3c47db80d8 BUGFIX: Fixed other parts of core in response to the changing of MySQLDatabase to not inherit from object.
BUGFIX: Restored SiteTree::canView() functionality.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 04:23:05 +00:00
Sam Minnee
24e4c7b806 MINOR: Updated SiteTreeActionsTest to have more precise fixture generation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 04:21:51 +00:00
Sam Minnee
25f22d3e99 BUGFIX: Fixed manifest builder tests to not have fake data, and to test that classes can be in files with different names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 03:39:12 +00:00
Ingo Schommer
9ae437e577 BUGFIX Fixed SiteTreeActionsTest to use unconditional class defintion - was failing due to recent changes in ClassInfo and class_exists()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83969 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 21:39:04 +00:00
Sam Minnee
43ad2ad6b5 ENHANCEMENT: Dramatically improved performance of large-scale canEdit() and canDelete() checks, so that big sites can be supported in the CMS.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-31 05:43:41 +00:00
Ingo Schommer
946025adb9 API CHANGE Removed TableField->FieldSet() and TableField->SubmittedFieldSet(), please use Items() and TableField_Item->Fields() instead (merged branches/2.3-nzct)
BUGFIX Fixed re-loading of unsaved TableField form data (e.g. after a validation error). The (now removed) method SubmittedFieldSet() was setting incremental temporary identifiers ("new1", "new2", etc), which wasn't picked up by Items() (merged from branches/2.3-nzct)
BUGFIX Using $this->value instead of $_POST to process submitted data in TableField (merged from branches/2.3-nzct)
BUGFIX TableField validation logic iterates over TableField_Item instances to get all formfields, rather than creating their own set in SubmittedFieldSet()
MINOR Removed repitition of temporary Form generation in TableField by generateTableFieldItem() method (merged from branches/2.3-nzct)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82089 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-17 02:09:27 +00:00
Ingo Schommer
94216da276 MINOR Documented and unit tested ArrayLib::invert() (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-17 00:01:06 +00:00
Ingo Schommer
4499420ff2 BUGFIX Fixed PhpSyntaxTest? parsing of return value - some PHP versions seem to return a string rather than an error code (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82063 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:55:46 +00:00
Ingo Schommer
8a20d5c1ad ENHANCEMENT Added TableField?->autoRelationSetting to allow for automatic saving into relationships (similiar to ComplexTableField? implementation) (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82060 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:49:32 +00:00
Ingo Schommer
f512347e33 BUGFIX Making sure RequirementsTest? has combine_files activated (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:45:23 +00:00
Sam Minnee
a738dc2027 BUGFIX: returns duplicated number of the same sentences (from r78773, r78778)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81472 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 06:14:04 +00:00
Sam Minnee
f88fb435e3 FEATURE Added RemoveOrphanedPagesTask (from r78473)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81470 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 06:11:55 +00:00
Sam Minnee
d38c79f584 ENHANCEMENT: If you are logged in and Security::permissionFailure() is called, just return a 403
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 03:20:32 +00:00
Sam Minnee
5a9ca7d682 BUGFIX: More fixes to i18n text collection with escaping of quotes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81420 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 02:37:01 +00:00
Sam Minnee
8ee9373807 ENHANCEMENT: Allow string concatenation in default text in _t() calls
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81409 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 01:02:43 +00:00
Ingo Schommer
e54a2e75e6 BUGFIX Fixed many_many relations querying in RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81346 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 08:28:17 +00:00
Ingo Schommer
b8736bd5b2 BUGFIX Fixed SiteTreeTest to work with new fixture handling: objFromFixture() can no longer be used to determine if an item has been deleted, as it will throw a warning
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81319 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 04:06:23 +00:00
Ingo Schommer
883be66524 MINOR Fixed array/string notation in SapphireTest error messages
BUGFIX Using get_by_id() in DataObjectTest to grab deleted pages, to avoid error messages for missing fixtures from SapphireTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81313 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 02:54:01 +00:00
Ingo Schommer
f3959b038d API CHANGE Deprecated use of SapphireTest->fixture to access YML fixtures, please use gateway methods on SapphireTest instead (e.g. $this->objFromFixture() instead of $this->fixture->objFromFixture())
ENHANCEMENT Allowing multiple fixtures to be defined in SapphireTest::$fixture_file through array notation. 
BUGFIX Disabling DataObject validation in YamlFixture->saveIntoDatabase() instead of SapphireTest->setUp()
MINOR Adapted sapphire unit tests to deprecated $this->fixture usage

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81286 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 00:06:16 +00:00
Ingo Schommer
4a531820cd BUGFIX Accepting dot-notation in TabSet->fieldByName()
BUGFIX Using fieldByName() instead of dataFieldByName() in Form->handleField() to allow rendering of nested tabs through a URL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81128 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-06 21:53:50 +00:00
Sam Minnee
2b61c12adc BUGFIX #4325: Fixed publishing of empty values by fixing DataObject::forceChange()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80934 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-03 01:21:48 +00:00
Sean Harvey
1b1809f1a2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80873 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-02 07:18:18 +00:00
Ingo Schommer
aaef41a122 MINOR renamed case sensitive SSDatetimeTest for filename to match classname
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80666 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-01 00:36:57 +00:00
Ingo Schommer
8ae9db13c0 ENHANCEMENT Added ClassInfo::classes_for_folder()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80641 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 22:08:59 +00:00
Rainer Spittel
ca4ec1af03 ENHANCEMENT: enabled saveInto to use the setter method when available instead of passing through the form field values directly to the money class.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80521 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 03:16:28 +00:00
Sean Harvey
14e77970c8 MINOR Added test for the inverse for DataObjectDecoratorTest::testOneToManyAssociationWithDecorator()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80352 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-29 05:14:06 +00:00
Sam Minnee
73cfe3ab84 API CHANGE: Added increase_time_limit_to(), which respects safe_mode.
API CHANGE: Added no-arg option to increase_memory_limit_to()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80241 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-28 02:36:46 +00:00
Sam Minnee
e2dcc48d48 ENHANCEMENT ajshort: Allow a HTTPResponse to be encapsulated in a HTTPResponse_Exception, which can be later caught by the request handler.
MINOR ajshort: Updated RequestHandler->httpError() to interrupt the execution flow by throwing an exception.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80226 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:48:44 +00:00
Sam Minnee
6bcabcbe46 BUGFIX #4306 simon_w: Fixed ConfirmedPasswordField::setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80192 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 04:00:10 +00:00
Ingo Schommer
da1f065cf7 BUGFIX Removing quotes from test data in RestfulServiceTest, it gives different results depending on magic_quotes_gpc setting on PHP configuration
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-26 03:14:22 +00:00
Ingo Schommer
0d1db9834d MINOR Added WebserverRoutingTest as a substitute smoke test for .htaccess problems etc. - this used to be implicit functionality in RestfulServiceTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79948 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-24 04:56:50 +00:00
Ingo Schommer
6b90c02940 ENHANCEMENT Refactored RestfulServiceTest to use a mocked RestfulService with Director::test() instead of curl calls. Simplified test cases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79927 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-24 03:05:33 +00:00
Sam Minnee
e0fbc7ac83 BUGFIX: Added explicit DataObjectDecorator::load_extra_statics() calls as a workaround for issues with extensions defined directly in-object.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79720 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-22 02:42:42 +00:00
Andrew O'Neil
742984cb49 BUGFIX: Allow extraDBFields() on decorators for compatibility, throw a deprecated notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-19 00:58:02 +00:00
Tom Rix
fcded47353 MINOR Unit test for broken dataobjectdecorator manymany relationships
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-19 00:11:05 +00:00
Ingo Schommer
6fa83caae6 ENHANCEMENT Making SSDatetime mockable through SSDatetime::set_mock_now()
ENHANCEMENT SSDatetime::now()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 00:10:02 +00:00
Sean Harvey
6c754d29e9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 11:36:49 +00:00
Sean Harvey
73e43c27ea MINOR Added test case for decorator static loading on Object::add_extension() to DataObjectDecoratorTest. This is the test case for r79430
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79434 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 09:24:02 +00:00
Sam Minnee
0540bec71f BUGFIX #4255 sharvey: Fix application of extra db fields by DataObjectDecorators.
API CHANGE #4255 sharvey: DataObjectDecorator::extraStatics() can no longer refer to $this because it's called staticly


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 07:01:28 +00:00
Ingo Schommer
204620b99d BUGFIX Conditionally setting and getting NULL values in TimeField->setValue()/dataValue(). Previously overriding a TimeField with an empty value wasn't possible.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79357 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 07:03:17 +00:00
Ingo Schommer
efb6f0ceaf API CHANGE TimeField doesn't internally store value as "Y-m-d g:ia" (including date), but only as "g:ia"
BUGFIX Allowing TimeField and subclasses to be set to NULL through setValue()
BUGFIX Added TimeField->dataValue() to apply same conversion as setValue()
MINOR Added TimeFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 06:39:57 +00:00
Sam Minnee
5fb45eb846 MINOR: Don't run MySQL-specific tests on any other database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79350 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 05:33:03 +00:00
Sam Minnee
4df21d29e0 BUGFIX: Fixed date field manipulation.
MINOR: Added sorts to TableListFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 04:03:47 +00:00
Sam Minnee
02d4c34d6f MINOR: Fixed test to check for correct format of datetime value.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 03:21:13 +00:00
Sam Minnee
882a2cc533 MINOR: Added DataObjectTest for date field types.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79309 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 02:56:59 +00:00
Ingo Schommer
14abe5a2e2 BUGFIX Fixed TranslatableTest->testSavePageInCMS(), needed admin login to edit ViewersGroups field
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79278 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:49:17 +00:00
Ingo Schommer
da2291c297 MINOR Added TranslatableTest->testSavePageInCMS()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79273 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:34:43 +00:00
Ingo Schommer
20ada72b4d BUGFIX Don't remove translation groups in Translatable->onBeforeDelete() if the decorated record uses Versioned, as other representations of the record might still exist in other tables (e.g. SiteTree_Live) (see #4219)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 05:02:43 +00:00
Ingo Schommer
059aa76eec BUGFIX Fixed DataObjectTest->testHasDatabaseField(), test wasn't activated due to method naming. Fixed one assertion in this test which was the wrong way around.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78424 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 21:00:41 +00:00
Sam Minnee
b2460de140 ENHANCEMENT: Removed circular references from extensions to improve garbage collection.
API CHANGE: The result of any extension returned by Object::extInstance() should have setOwner() called on it before calling a method, and clearOwner() after.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 06:48:44 +00:00
Ingo Schommer
4d02ee68d0 MINOR Added CompositeDBFieldTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78237 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:45:38 +00:00
Ingo Schommer
634ff10c89 BUGFIX Excluding names of CompositeDBFields from DataObject::custom_database_fields() and including the actually generated columns in CompositeDBField->compositeDatabaseFields(). This is necessary for DataObject->hasField() to work correctly and avoid generated queries with wrong column identifiers
BUGFIX Querying db() in DataObject->hasField() in addition to hasDatabaseField(), as the two might differ when CompositeDBFields are used
MINOR Added DataObjectTest->hasDatabaseField()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78235 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:43:45 +00:00
Ingo Schommer
b0798db91e MINOR Removed debug output
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:06:23 +00:00
Ingo Schommer
e121c2f8fd BUGFIX Prevent relations without $api_access to be shown through RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:04:40 +00:00
Ingo Schommer
dfa44c055c API CHANGE Changing DataObject::$changed to private visiblity. Please use getChangedFields() and isChanged()
ENHANCEMENT Added DataObject->isChanged() to detect if a field has been changed in this object instance
MINOR Changing call to CompositeDBField->compositeDatabaseFields() in DataObject->hasOwnDatabaseField()
BUGFIX Unsettig "Version" property in DataObject->getChangedField() to allow versioned to write a new version after a call to forceChange()
BUGFIX Introduced $markChanged in Money class
BUGFIX Casting Money->__toString() return value as string
MINOR Changing Member class to use new DataObject->isChanged() API
BUGFIX Using new $markChanged API for CompositeDBFields in DBField::create()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:09:23 +00:00
Sean Harvey
60c5570bf8 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 02:19:50 +00:00
Sam Minnee
d8b46e5501 ENHANCEMENT: Allow altering of DataObject:$api_access by decorators.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77787 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 00:52:54 +00:00
Ingo Schommer
b478c8be34 FEATURE Added MoneyField as a form field to edit Money values
ENHANCEMENT Using MoneyField in Money->scaffoldFormField()
BUGFIX Fixed Money->setValue() to respect $value parameter over $record to avoid wrongly updated values from stale $record values instead of new $value

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 22:21:02 +00:00
Sean Harvey
75ba6a1ab9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77764 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:59:21 +00:00
Ingo Schommer
4d55f1e5d7 BUGFIX Fixed Money->Nice() to provide symbol and currency shortname based on Money->getCurrency()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77754 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:03:06 +00:00
Ingo Schommer
86388328a1 BUGFIX Fixed SQL syntax error in MATCH AGAINST clause in FulltextFilter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77672 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 21:27:48 +00:00
Saophalkun Ponlu
ce6402f8d0 ENHANCEMENT: use image file name (without file path and extension) for alt attribute when title is not provided
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77668 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 12:16:17 +00:00
Ingo Schommer
9f7bbc57d0 BUGFIX Inspecting the change status of all CompositeDBFields when invoking DataObject->getChangedFields(), as their value setting is not performed through DataObject->setField(), it doesn't trigger the built-in change detection.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77667 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-23 05:32:16 +00:00
Ingo Schommer
825362bf00 MINOR Added MoneyTest->testLoadFromFixture()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77633 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 04:45:07 +00:00
Will Rossiter
cf35533a78 EHANCHMENT: update the regular expression to disregard any underscores directly before a capital letter, as well as using the PCRE functions and adding a small test. PATCH: #4081
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77612 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 03:49:15 +00:00
Ingo Schommer
a2a507f73c BUGFIX Fixed Money->writeToManipulation() to correctly overwrite with NULL values
ENHANCEMENT Added Money->NiceWithName()
ENHANCEMENT Changed Money->NiceWithShortname() to use Zend_Currency options
BUGFIX Setting isChanged flag on Money individual setters
MINOR Added Money->__toString()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 04:46:58 +00:00
Sean Harvey
7cb259f051 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77454 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 00:14:47 +00:00
Sean Harvey
5ed5cdd48a MINOR Renamed deprecated extraDBFields() on i18nTestModuleDecorator to extraStatics()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:40:56 +00:00
Sean Harvey
e768d955df ENHANCEMENT #3677 Added more rules for escaping reserved characters in XML to their proper entities e.g. ' => &apos;
BUGFIX When exporting data from TableListField to a CSV via TableListField_Item->Fields(), don't convert the values to XML
MINOR Added test class ConvertTest with tests for various Convert functions



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77298 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 03:09:50 +00:00
Ingo Schommer
336bce8bf8 ENHANCEMENT Added DataObject::$create_table_options to pass through special options to Database->requireTable(). Contains a keyed array by database driver. Example use is specifying different storage engines for MySQL: array('MySQLDatabase'=>'ENGINE=InnoDB')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 03:55:14 +00:00
Ingo Schommer
104470006e API CHANGE Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
MINOR Renamed internal property Translatable::$reading_lang to $current_lang

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77006 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 05:36:01 +00:00
Ingo Schommer
fdcaba515c MINOR Added SiteTreeTest for all-numerical URL generation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76863 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:58:23 +00:00
Ingo Schommer
45217d0ca5 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76861 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:57:57 +00:00
Sean Harvey
b1018f5864 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76846 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:26:47 +00:00
Ingo Schommer
5b0ee9678f API CHANGE Deprecated Translatable->getTranslatedLangs(), use getTranslatedLocales()
ENHANCEMENT Added Translatable::$allowed_locales to limit the available locales in the CMS for page translations. Added Translatable->canTranslate() and Translatable->canEdit() to determine if a translation is allowed.
ENHANCEMENT Added $instance parameter to LanguageDropdownField to call instance-specific canTranslate() on it (optionally)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:16:49 +00:00
Ingo Schommer
4c94455a4d ENHANCEMENT Improved TranslatableTest->testCreateTranslationTranslatesUntranslatedParents() to translate two grandchildren - this used to be an issue in branches/2.3 (see #4016)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76594 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 00:46:57 +00:00
Sam Minnee
ed06eb37c0 BUGFIX: Created Versioned's Version field as a proper Dataobject field.
API CHANGE: DataObject's internal $this->record array doesn't import null values, so that they don't get written back out.
API CHANGE: DataObject queries explicitly list columns, rather than using *.  This means that extraneous columns won't be included.
MINOR: Updated tests for db abstraction.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76372 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:50 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Ingo Schommer
5e8e47ef77 FEATURE Added Money class for managing monetary amounts with currencies through the Money design pattern. Uses the CompositeDBField interface to contain multiple database columns in a single DBField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76100 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 08:10:51 +00:00
Ingo Schommer
3fcb2a336a BUGFIX Fixed TranslatableTest URLSegment detection
BUGFIX Removed URLSegment detection from Translatable->onBeforeWrite() - it was always preceeded by SiteTree->onBeforeWrite() which already alters the URL, so the appending of locale values to disambiguate the URL was pointless (never triggered)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 08:48:14 +00:00
Ingo Schommer
4f90da4fa3 BUGFIX Resetting default language in TranslatableTest - this was breaking VirtualPageTest before
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75936 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 04:28:09 +00:00
Ingo Schommer
681380424a BUGFIX Fixed empty ErrorPage types in output by setting status code in init() instead of index() and checking for "index" action - introduced in r75096 (see #3960)
BUGIFX Changed ErrorPage->publish() to doPublish->doPublish() - the publication of static HTML into the /assets directory was lagging one version behind the actual published content
BUGFIX Fixed wrong parameter in ErrorPage::get_static_filepath()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75915 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 02:20:57 +00:00
Sean Harvey
f4eecd4d0d Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75903 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:20:12 +00:00
Sean Harvey
9b75cb1987 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:49:34 +00:00
Ingo Schommer
c28c90b708 MINOR Re-added Translatable->extendWithSuffix()
BUGFIX Fixed DBLocaleTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 08:39:49 +00:00
Ingo Schommer
c1c920cca0 ENHANCEMENT Added DBLocale class for Translatable extension
API CHANGE Deprecated Translatable::get_langs_by_id() - use getTranslations()
MINOR Removed Translatable::is_default_locale() - no deprecation necessary, was recently added
MINOR Removed commented out methods in Translatable: augmentNumChildrenCountQuery(), augmentAllChildrenIncludingDeleted() and augmentStageChildren()
MINOR Removed fieldsInExtraTables() and extendWithSuffix()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 07:37:09 +00:00
Ingo Schommer
332e231529 ENHANCEMENT Added Versioned support to Translatable::getTranslation() and getTranslations()
ENHANCEMENT Marking 2.1-style "_lang" tables obsolete in Translatable::requireDefaultRecords()
ENHANCEMENT Added override flag to Translatable::addTranslationGroups()
MINOR Disabled Translatable->TranslationMasterID - not implemented yet

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75677 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:18:17 +00:00
Ingo Schommer
3d0c4a1615 BUGFIX Fixed i18n::get_locale_from_lang() to return original parameter if it detects a fully qualified locale that shouldn't be converted
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75675 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:15:38 +00:00
Sean Harvey
4615fd74b3 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:21:38 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
13b358a8dd Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 00:07:39 +00:00
Sean Harvey
76b5adc979 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75579 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:52:15 +00:00
Ingo Schommer
99c1fe9f93 BUGFIX Allowing translated homepages in RootUrlController
BUGFIX Limiting RootURLController to just trigger Translatable if no DomainForHomepage value is found
BUGFIX Using $locale parameter in Translatable::get_homepage_urlsegment_by_locale()
BUGFIX Updated enabling mechanism in Translatable->alternateGetByUrl()
MINOR Removed HTTP_HOST setting in TranslatableTest, wasn't necessary
API CHANGE Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 23:08:39 +00:00
Ingo Schommer
ca24365c6f BUGFIX Fixed Translatable->onBeforeWrite() to change ClassNames on all translations when the "master page" (default language) changes its class to avoid inconsistencies with saving translations (see #3487)
BUGFIX Correctly showing the available languages dropdown in Translatable->getCMSFields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:57:11 +00:00
Ingo Schommer
e55f3126fa BUGFIX Changed DataObject->newClassInstance() to only force changes if a differing classname was set. Setting ClassName property on new instance to trigger change detection (required for Translatable->onBeforeWrite())
BUGFIX Only force DataObject->forceChange() on fields which aren't already marked as changed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75248 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:55:25 +00:00
Sam Minnee
b165bde578 BUGFIX #3919: Fix DataObject::dbObject() for decorated fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 00:44:10 +00:00
Ingo Schommer
bac89fd2c5 BUGFIX Setting the correct ParentID for children with existing parents in Translatable->createTranslation() - see #3861
BUGFIX Fixed Locale duplication detection for queries in Translatable->augmentSQL()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75027 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-23 04:41:49 +00:00
Ingo Schommer
235ce958b8 BUGFIX Fixed TranslatableSearchFormTest->setUp() method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-22 03:24:50 +00:00
Ingo Schommer
228b976ce1 ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_down_once() for better test performance with state that just needs to be initialized once per test case (not per test method). Added new SapphireTestSuite to support this through PHPUnit.
ENHANCEMENT Using set_up_once() in TranslatableTest and TranslatableSearchFormTest for better test run performance

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74941 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-22 03:22:09 +00:00
Ingo Schommer
50fc4959a2 ENHANCEMENT Improved deprecated fallbacks in Translatable by auto-converting short language codes to long locales and vice versa through i18n::get_lang_from_locale()/i18n::get_locale_from_lang()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 21:49:40 +00:00
Ingo Schommer
d1a9e2b3f6 BUGFIX Fixed DateTest timestamp->date testing - was assuming a NZ timezone environment setting, hence failing in other timezones
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74011 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 17:16:34 +00:00
Ingo Schommer
93a931edbb MINOR Fixed DateTest to be more expressive (no iteration on test values)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74010 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 16:45:10 +00:00
Ingo Schommer
e0ec30dcc8 ENHANCEMENT Allowing usage of global settings via asterisk (*) in RequestHandler->$allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74009 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 16:34:27 +00:00
Ingo Schommer
e482ada014 API CHANGE Deprecated Translatable::enable() and i18n::enable()- use Object::add_extension('SiteTree','Translatable'), Deprecated Translatable::disable() and i18n::disable() - use Object::remove_extension('SiteTree','Translatable'), Deprecated Translatable::enabled() - use $myPage->hasExtension('Translatable')
API CHANGE Removed Translatable::creating_from() - doesn't apply any longer
ENHANCEMENT Translatable extension is no longer hooked up to SiteTree by default, which should improve performance and memory usage for sites not using Translatable. Please use Object::add_extension('SiteTree','Translatable') in your _config.php instead. Adjusted several classes (Image, ErrorPage, RootURLController) to the new behaviour.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-01 16:35:32 +00:00
Ingo Schommer
9f0be3eb7b API CHANGE Deprecated Object->extInstance(), use getExtensionInstance() instead
ENHANCEMENT Added Object->getExtensionInstances()
ENHANCEMENT Added Object::get_extensions()
ENHANCEMENT Unsetting class caches when using Object::add_extension() to avoid problems with defineMethods etc.
BUGFIX Fixed extension comparison with case sensitivity and stripping arguments in Object::has_extension()
BUGFIX Unsetting all cached singletons in Object::remove_extension() to avoid outdated extension_instances
MINOR Documentation in Object

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73900 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 22:27:53 +00:00