Commit Graph

1217 Commits

Author SHA1 Message Date
Ingo Schommer
9e7611e891 ENHANCEMENT Added 'updateImageForm', 'updateFlashForm', 'updateLinkForm' hooks to HtmlEditorField (the imageform hook was necessary to make the 'pixlr' module work) (see #3938)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100753 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:52 +13:00
Ingo Schommer
83675fc248 BUGFIX Fixed SapphireTest->loginWithPermission() and MemberAuthenticatorTest to use existing Members based on their unique_identifier_field (if existing) to accommodate recent Member->onBeforeWrite() changes (see r100705)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100723 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:51 +13:00
Ingo Schommer
90e8171536 API CHANGE Removed "auto-merging" of member records from Member->onBeforeWrite() due to security reasons - please use DataObject->merge() explicitly if this is desired behaviour (from r100705)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100718 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:51 +13:00
Geoff Munn
7af896d9ec BUG FIX: column names quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100693 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:50 +13:00
Geoff Munn
4b14821bee BUG FIX: column names quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100692 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:50 +13:00
Sean Harvey
84a7755e4e MINOR Removed Requirements:: static call and replace with instance
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100533 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
975e3b5a82 ENHANCEMENT #3387 Requirements now has a new static function called Requirements::set_combined_files_folder() for setting where the combined files should belong
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
d730def583 MINOR Removed whitespace
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
ddf0f35d27 MINOR Removed end php tag for Requirements and RequirementsTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100514 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
Sean Harvey
450c3cb408 API CHANGE Refactored Requirements to use Requirements_Backend at all times - this makes testing far easier. Thanks tobych!
MINOR Updated RequirementsTest to test Requirements_Backend instead of global statics


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100513 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
Sean Harvey
d91fa6fdfd MINOR Changed places of Object::extInstance() to Object::getExtensionInstance() and added a notice if extInstance is used in future
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100487 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Sean Harvey
20cbc51554 ENHANCEMENT #4599 DataObjectSet now uses more array functions instead of performing equivalent tasks - thanks simon_w!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Sean Harvey
4e2272334a ENHANCEMENT Convert JSON functions now use the Services_JSON library where appropriate instead of custom code, and if json_decode() or json_encode() are available these are used
MINOR Added unit tests for Convert JSON functions


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:45 +13:00
Sean Harvey
2332128460 ENHANCEMENT #5072 RSSFeed_Entry::rssField() now respects custom getters on the data class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:45 +13:00
Sean Harvey
c4760f41a4 API CHANGE #5107 Upload now uses Upload_Validator to separate the validation rules from the File loading done in the Upload class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:44 +13:00
Sean Harvey
fd1ca45c07 MINOR Reinstated UploadTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99862 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00
Luke Hudson
be26cf2579 BUGFIX: Fix #5097, Translatable uses augmentValidURLSegment to check that URLSegment is valid
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99850 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00
Sam Minnee
66da3c5928 MINOR: More tests for array data
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:42 +13:00
Ingo Schommer
578aa21de9 ENHANCEMENT Allow DataObjectSet to remove duplicates based on any field (#5094, thanks mobiusnz) (from r99736)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99737 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:41 +13:00
Ingo Schommer
916518e8c5 ENHANCEMENT Added OptionsetField->setDisabledItems() to allow specifically disabling certain checkboxes
ENHANCEMENT Added CheckboxSetField->setDefaultItems() to tick specified checkboxes regardless of the value passed (from r99596)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:40 +13:00
Ingo Schommer
f44b9941ed MINOR Added ComponentSetTest (from r99580)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99654 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:40 +13:00
Ingo Schommer
d2ade7e844 MINOR Added MemberCsvBulkLoaderTest->testCleartextPasswordsAreHashedWithDefaultAlgo() (from r98841)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99645 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:39 +13:00
Ingo Schommer
508ead95e9 MINOR Fixed SapphireTest->logInWithPermission() spelling
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99491 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
c945e23c62 FEATURE New DatetimeField class (form field wrapper composed of DateField andTimeField)
FEATURE New DateField and TimeField form classes with more consistent API and easier localization
API CHANGE Date/time parsing in DateField, TimeField and DatetimeField defaults to i18n::get_locale() ('en_US') instead of using en_NZ/en_GB specific parsing. Use i18n::set_locale('en_NZ') in mysite/_config.php to revert to old behaviour.
API CHANGE $timeformat constructor parameter in TimeField needs to be in ISO date notation (not PHP's date())
API CHANGE TimeField, DateField and related subclasses use Zend_Date for date parsing, meaning they're stricer than the previously used strtotime()
API CHANGE Removed DMYCalendarDateField and CalendarDateField, use DateField with setConfig('showcalendar')
API CHANGE Removed CompositeDateField, DMYDateField, use DateField with setConfig('dmyfields')
API CHANGE Removed DropdownTimeField, use TimeField with setConfig('showdropdown')
API CHANGE Removed PopupDateTimeField, use DatetimeField
API CHANGE Changed 'date', 'month' and 'year' HTML field names to lowercase in DMYDateField
API CHANGE Removed support for ambiguous date formats in DateField, e.g. '06/03/03'. Use DateField->setConfig('dateformat', '<format>') to revert to this behaviour.
API CHANGE Removed $futureOnly flag from DateField, CalendarDateField etc., use DateField->setConfig('min') and DateField->setConfig('max')
ENHANCEMENT Using Zend_Date for DateField and TimeField, with more robust date handling, starting localization support. Set globally via i18n::set_locale(), or for a field instance through setLocale(). Note: Javascript validation is not localized yet.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99360 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
c02956d5c7 MINOR Temporarily disabled nested url specific cases inTranslatableTest->testAlternateGetByLink(), unclear functionality requirements
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99350 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
f5424da34a BUGFIX: Fixed SiteTree_versions version numbers for published virtual pages. (from r98675)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
474b0b9f7a MINOR refactored setting/getting strict hierarchy setting. (from r98654)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99064 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
59b7d14720 MINOR more unit tests around loose hierarchy (from r98509)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99062 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
861466f8f8 MINOR added enforce_strict_hierarchy option, and tests around not cascading deletions (from r98498)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99059 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
b05117bd68 BUGFIX: Generate SiteTree_version records for VirtualPages more reliably. (from r98309)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Mateusz Uzdowski
ec5f472139 BUGFIX: the ID should be that of untranslated child (it's the middle segment that's from translated version, not the last one)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98946 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:32 +13:00
Ingo Schommer
6b556ef90d ENHANCEMENT Added GroupCsvBulkLoader class to facilitate group imports with permission codes and hierarchy (merged from r94252)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98715 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:30 +13:00
Ingo Schommer
8f098c1341 ENHANCEMENT MemberCsvBulkLoader for easy member import with group associations (merged from r94251)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98714 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:30 +13:00
Ingo Schommer
f9f2ed9c8f ENHANCEMENT Added BulkLoader->deleteExistingRecords(), removed unnecessary parameters from BulkLoader->load() (merged from r94250)
ENHANCEMENT Decreased memory usage in BulkLoader->load() when deleting all records before importing  (merged from r94250)
MINOR Re-enabled CsvBulkloaderTest cases, were disabled by accident (merged from r94250)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98713 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:30 +13:00
Sam Minnee
f6c710443c MINOR: Renamed manifest test temp dir as there was some kind of conflict
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98519 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:28 +13:00
Sam Minnee
958b6a0ebc MINOR: Speed up cache test (1s is as good a test expiry as 8s)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98433 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:28 +13:00
Sean Harvey
f1ee9d45d5 MINOR Fixed SiteTreeBacklinksTest on Windows
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Ingo Schommer
092b8ced92 MINOR Fixed HTTPTest->testSetGetVar()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98409 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Ingo Schommer
4b6330b0e1 MINOR Fixed HTTPTest->testSetGetVar()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98407 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Ingo Schommer
badd45a663 BUGFIX Fixed Hierarchy->loadDescendantIdList() to call setOwner() on the extension instance. This was necessary due to underlying Object/Extension changes in 2.4.
MINOR Fixed HierarchyTest assertions around including grand children counts

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Ingo Schommer
ccf4db936f MINOR Fixed HTTPTest when invoked through dev/tests/all or with GET parameters (see r98373)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Sean Harvey
062975d30a MINOR Testing of grand-children items in HierarchyTest::testLoadDescendantIDListIntoArray() and HierarchyTest::testNumChildren()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98376 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Ingo Schommer
792b4cc1c4 API CHANGE HTTP::setGetVar() always returns absolute URLs. Use Director::makeRelative() to make them relative again.
API CHANGE HTTP::setGetVar() combines any GET parameters in PHP array notation (e.g. "foo[bar]=val") instead of replacing the whole array
BUGFIX HTTP::setGetVar() uses parse_url() and http_build_query() to add query parameters to an existing URL, instead of doing its own regex-based parsing. This means existing GET parameters are correctly url encoded.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98373 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sean Harvey
fd3fa79804 MINOR Fixed test case name in Hierarchy
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sean Harvey
be919f2898 MINOR Added test case for Hierarchy::getDescendantIDList() which also tests Hierarchy::loadDescendantIDListInto()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sean Harvey
a93d12cf31 MINOR Use 'b' mode for fopen() where possible for better portability
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98321 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Ingo Schommer
96f022be85 MINOR Fixed unit tests after change Member->checkPassword() to return ValidationResult instead of boolean (see r98268)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98274 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Sam Minnee
60f93644a0 BUGFIX: Updated SiteConfig-based theme selection to remove inappropriate coupling from SSViewer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98263 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Ingo Schommer
f31ec616a7 MINOR Adding SiteConfig as Translatable dependency in SiteTreeTest and TranslatableTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98228 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Sam Minnee
e26333e3c9 APICHANGE: Refactor Versioned so a single state is kept for stage, archived date, or any module specific reading modes (from r98161)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Sam Minnee
7fb2185ec5 MINOR: Fixed PermissionTest assertion (from r96642)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
cbb882be5c MINOR: Fixed TableListField test to suit changed behaviour. (from r96639)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98141 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
728e51dd8a MINOR remove sort direction when running canSortBy. Also added test coverage for this. (from r96428)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98138 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sean Harvey
3e66a0093c MINOR Cleanup test folder after SiteConfigTest::testAvailableThemes() is run
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Julian Seidenberg
ec18557735 MINOR: added descriptive text to test assert.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98115 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Julian Seidenberg
b48c1fb883 BUGFIX: fixed test that was trying to do a assertContains between a DataObjectSet and a Member object. Changed it to an assertEquals between Member and the First item in the Set. Also added an inverse test to check that Set doesn't contain the wrong Member.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98114 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sean Harvey
caff92709f ENHANCEMENT Allow user theme selection through SiteConfig, falling back to SSViewer::set_theme() as a default if there are none selected
MINOR Unit tests for SSViewer::current_theme() and SiteConfig::getAvailableThemes()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98110 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sean Harvey
19d1a64ef4 MINOR Fixed broken tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98106 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sean Harvey
f12a9e8197 MINOR Removed specific removal of temporary directory in ManifestBuilderTest::testThemeRetrieval() and replaced it with Filesystem::replaceFolder() which does the same thing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98098 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sean Harvey
0137ef0f84 ENHANCEMENT ManifestBuilder::get_manifest_info() now uses ManifestBuilder::get_themes() instead of doing it's own retrieval of available themes
MINOR Added ManifestBuilderTest::testThemeRetrieval() to test ManifestBuilder::get_themes()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98091 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
bd46a95c85 MINOR: Fixed FileTest execution if the assets/ directory doesn't exist. (from r88353)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
f0dfab1308 MINOR unit test for getting members by permission via roles (from r88276)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98084 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sean Harvey
2116c46d11 API CHANGE Decimal now allows setting a default value properly
MINOR Unit tests for Decimal field type default value through new test class DecimalTest



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98056 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Andreas Piening
3b7f93e0c0 MINOR: permission code is case sensitive in some cases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Normann Lou
8afcd186f0 APICHANGE: rename the class "Cache" to "SS_Cache" (ref ticket: #4997)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97996 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Sam Minnee
2294d0986b BUGFIX #5009: Removed inappropriate field-detection change on multienums with no default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97980 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Ingo Schommer
662ee20141 BUGFIX Allowing translations of VirtualPage by not copying over original Locale property (see #5000)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97912 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Carlos Barberis
654e583c7f Added values for new permission code 'VIEW_DRAFT_CONTENT' test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97898 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Carlos Barberis
7adcc967ae Added test for new permission code.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97897 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Sam Minnee
17a5887a80 API CHANGE: Added cancelSchemaUpdate() and doesSchemaNeedUpdating() to the Database class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97827 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Ingo Schommer
db31ff5ad1 API CHANGE Removed $blankItemText parameter from Permission::get_codes()
ENHANCEMENT Allow ungrouped retrieval of Permission::get_codes() through new $grouped switch

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97819 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Ingo Schommer
5170f33915 API CHANGE Fixed i18n _t() calls without namespaces in template includes: They now default to setting the include filename as namespace, rather than the including template (#4915, #3400 - thanks Henk_Poley, jwalsoe, walec51)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97797 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Sam Minnee
c212f40bb5 BUGFIX Use BASE_PATH and BASE_URL instead of data from $_SERVER.
API CHANGE: Determine default BASE_PATH/BASE_URL from the __FILE__ content, so that the script that initiated the Sapphire process doesn't matter.  This means that index.php doesn't need to manipulate those variables.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
9ac547d32d BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97728 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
c49b454d4b MINOR: Make SecurityDefaultAdminTest when you run it by itself.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97652 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
58cf79731b BUGFIX: Fixed potential data corruption issue when you are changing the class of a SiteTree subclass between two subclasses that share a fieldname.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97594 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Sam Minnee
cfea61ac54 MINOR: Re-enabled SiteTreePermissionsTest tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Sam Minnee
93d09a66fa BUGFIX #4929: Fixed Object::add_static_vars() for uninherited static.s
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97586 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Sam Minnee
9300e52969 API CHANGE #4929: Add $class argument to DataObjectDecorator::extraStatics()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Ingo Schommer
31280ece2c BUGFIX Checking for presence of all columns in Security::database_is_ready(). This was necessitated by an earlier change to the sapphire ORM which now selects all columns explicitly in a SQL query (instead of SELECT *) (see #4027)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97480 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Ingo Schommer
51c14227b2 API CHANGE Security::setDefaultAdmin() no longer writes credentials to any Member database records (created through Security::findAnAdministrator(). This prevents outdated credentials when setDefaultAdmin() code changes after creating the database record (see #4271)
API CHANGE Security::findAnAdministrator() no longer sets 'Email' and 'Password' properties on newly created members. Removed the $username and $password argments from the method.
ENHANCEMENT Member->requireDefaultRecords() no longer creates a default administrator based on $_REQUEST data. Moved functionality into Installer->install()
MINOR Security::findAnAdministrator() names any default administrators 'Default Admin' instead of 'Admin'

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97478 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Sam Minnee
161d04342c MINOR: Fixed deep-nested-URLs test to work on sites in subfolders (from r96836)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97434 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Andrew Short
46a8083e57 BUGFIX: Fixed nested URLs operation for pages more than 4 levels deep.
From: Andrew Short <andrewjshort@gmail.com> (from r95902)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97433 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Hamish Friedlander
c826191897 BUGFIX: Was using custom_database_fields in Aggregate, not database_fields, and so aggregates for the common fields (LastEdited, Created, ClassName) would fail
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Hamish Friedlander
9aa9d936b9 FEATURE: Add partial caching support to SSViewer.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97391 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Hamish Friedlander
0d76dac5a1 FEATURE: Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97390 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Hamish Friedlander
83c4431af7 FEATURE: Add cache factory that provides nice API over top of Zend_Cache
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97389 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Ingo Schommer
3e8526960b FEATURE Allowing translation of SiteConfig (including toplevel permission groups)
BUGFIX Fixed SiteConfig->canView()/canEdit() to respect empty CanViewType/CanEditType assignments.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Ingo Schommer
e08667ead5 MINOR Fixed MemberAuthenticatorTest, was setting global state in r97357
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Geoff Munn
81d775f06f BUGFIX: old 2.3 passwords now handled correctly and migrated accordingly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97357 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Sam Minnee
1c851476b6 BUGFIX: Let users without a specific TRANSLATE_ permission edit the default locale, so that things don't break when you install the Translatabe module.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97267 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:10 +13:00
Will Rossiter
afd8d0b570 FEATURE: added Session::clearAll() functionality. ENHANCEMENT: Added Unit Tests covering Session API. MINOR: Tided up formatting in session class and included doc comments for API level documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97024 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:09 +13:00
Will Rossiter
1125de1b99 BUGFIX: removed name attribute from label fields since this is invalid html. Ticket: #4887. PATCH via tobych
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97013 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:09 +13:00
Sam Minnee
916be1aa2f MINOR: Removed unnecessary illegalExtensions data from TranslatableTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00
Sam Minnee
3b88d34230 MINOR: Added explicit listing of testonly dataobjects for widget tests.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96830 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00
Luke Hudson
529eee8040 BUGFIX: Adjust EncryptAllPasswordsTask test to match API for BuildTask
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00
Sam Minnee
d2d32dafa5 MINOR: Ensure that cuke can work with --dry-run (from r94819)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:07 +13:00
Sam Minnee
3bce0ea42f BUGFIX: Don't publish virtual pages on regular page publish unless the page has already been published. (from r93529)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96760 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:07 +13:00
Sam Minnee
332ddb700a BUGFIX: Virtual pages can be deleted from the live site even when the're not publishable. (from r93319)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96758 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:06 +13:00
Sam Minnee
b10f8a908d BUGFIX: Fixed notice-level errors when checking permissions of pages that don't exist anywhere (from r93166)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96755 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:06 +13:00
Sam Minnee
3c88905299 BUGFIX: Add a default list of allowed extensions so that the CMS works reasonably out of the box.
BUGFIX: Allow files that don't have an extension (most notably folders)
BUGFIX: Ensure that file URL rewriting works if you rename a page twice without publishing.
BUGFIX: Ensure that the page doesn't go green after URLs are rewritten
ENHANCEMENT: Recognise HTTP_X_FORWARDED_HOST header and use that in place of HTTP_HOST (from r93148)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96752 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:06 +13:00
Sam Minnee
b868893a54 BUGFIX: Update virtual pages semantics to grab content from the published version of the source page when you publish the virtual page, and to not allow publication before their source page is published. (from r92209)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96748 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
337019a4c9 API CHANGE: Added Hierarchy::numHistoricalChildren() and Versioned::get_including_deleted_query()
API CHANGE: Added numChildrenMethod arg to getChildrenAsUL, markPartialTree, markChildren, markingFinished
BUGFIX: Clear the bypassStaticCache cookie when you return to the live site. (from r91165)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96739 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
b82640cf62 BUGFIX: Include newly set fields in the differences shown by DataDifferencer (from r90264)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96736 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Sam Minnee
efd9b2f666 BUGFIX: Use draft site permissions over published, if available. (from r90220)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96735 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Sam Minnee
63096cfefb API CHANGE: Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
API CHANGE: Added SapphireTest::resetDBSchema() (from r90054)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96734 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Sam Minnee
8a0302d2ac BUGFIX: Fixed broken link correction when a page is deleted. (from r89989)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Sam Minnee
5296f59d23 API CHANGE: Renamed SapphireTest::set_up_once/tear_down_once to setUpOnce/tearDownOnce, and made them instance methods.
API CHANGE: Added SapphireTest::$illegalExtensions and SapphireTest::$requiredExtensions for making tests depending on particular extension sets (from r89958)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96727 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:03 +13:00
Sam Minnee
f0173f5531 BUGFIX: Fixed image link rewriting in virtual pages. (from r89904)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96721 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:03 +13:00
Sam Minnee
51a2eeed15 MERGE merged back a whole bunch of defect fixes from trunk (from r87846)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96712 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:02 +13:00
Sean Harvey
f204f96b1f MINOR Added unit test for ViewableData::MultipleOf() when using an offset of 1 (an alternative approach)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95966 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:00 +13:00
Mateusz Uzdowski
55ded86c8f FEATURE: added several tests for PermissionCheckboxSetField, PermissionRole and Group
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94887 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Andreas Piening
cdada2784d BUGFIX: fixed typing error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94721 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Andreas Piening
848526dfb7 MINOR: test support for superglobals in testrequest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94711 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Andreas Piening
aee97d78c3 MINOR: test support for superglobals in testrequest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94710 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Sam Minnee
e3543daeca MINOR: Added db-fixture creation for cucumber-based testing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:58 +13:00
Sam Minnee
efb81e59b9 MINOR: Added small fixture YML that just lets you log in, for bootstrapping browser automation tests.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94429 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:57 +13:00
Sean Harvey
faab8f7d16 MINOR Added tests methods for Member::can*() methods to MemberTest
MINOR Added test Extension classes for testing decorated can*() methods


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94359 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:57 +13:00
Sean Harvey
06b7dc5de3 BUGFIX #4686 Fixed $member non-object error, and decorated checks from not working in Member::canView(), Member::canEdit() and Member::canDelete()
MINOR Added additional tests to MemberTest


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94358 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:57 +13:00
Sean Harvey
80793d0336 MINOR Less obtrusive tests for testing the SS temp directory
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94135 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Sean Harvey
4eaa2f6001 BUGFIX #4661 Fix SS temporary directory bug with Windows environments - the directory would always be "silverstripe-cache" instead of a namespaced one so that multiple SS sites don't conflict with eachother
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94134 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Sean Harvey
8022f06c8d BUGFIX Modulus and MultipleOf should start at index 0 to match the iterator position, by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94071 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Sean Harvey
1f96b5e2b2 MINOR Added a few missing pieces to DataObjectSetTest::testMultipleOf()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Sean Harvey
f185bbf898 FEATURE Added MultipleOf and Modulus methods to ViewableData - useful for templating work
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94063 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Ingo Schommer
4ca6a29aad ENHANCEMENT Added support for loading external plugins (with relative paths) in HtmlEditorConfig. This means relative paths can be separate from the plugin name, and fixes a bug where paths containing dashes were ignored by TinyMCE.init().
ENHANCEMENT Changed sapphire/thirdparty/tinymce-advcode to use the original plugin name, and specify its relative path through HtmlEditorConfig instead.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94060 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:55 +13:00
Ingo Schommer
c66446b34d ENHANCEMENT Added parameter to DBLocale->Nice()
ENHANCEMENT Added DBLocale->getNativeName()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93771 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Sean Harvey
d93ee14be1 MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93682 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Ingo Schommer
4452101790 API CHANGE Refactored hiding of Permissions added in r92428. Added PermissionCheckboxSetField?->setHiddenPermissions() (from r92865)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@92878 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:38 +13:00
Normann Lou
65b1bc4839 APICHANGE: add the ability to remove some permissions specified by their code in the rendered field html of PermissionChecksetBoxField and full-covered unit tests of this ability.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@92428 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:38 +13:00
Sean Harvey
71fb665ed3 BUGFIX Fixed newlines working properly across different platforms - Windows, for example, won't work properly with just \n so use PHP_EOL for a cross-platform solution
MINOR Fixed appropriate failing tests to use PHP_EOL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@92220 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:38 +13:00
Sam Minnee
45bbebe19f BUGFIX: Made use of new BasicAuth::protect_entire_site() consistent. (from r91658)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:37 +13:00
Ingo Schommer
65c1c6fd20 NOTFORMERGE Fixed merge error from r91576
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Ingo Schommer
07fc3650a3 ENHANCEMENT Pluggable password encryption through PasswordEncryptor class (#3665) (merged from r90949)
BUGFIX Fixed password hashing design flaw in Security::encrypt_password(). Removing base_convert() packing with unsafe precision, but retaining backwards compatibilty through pluggable encryptors: PasswordEncryptor_LegacyPHPHash (#3004) (merged from r90949)
API CHANGE Deprecated Security::encrypt_passwords() (merged from r90949)
API CHANGE Deprecated Security::$useSalt, use custom PasswordEncryptor implementation (merged from r90949)
API CHANGE Removed Security::get_encryption_algorithms() (merged from r90949)
API CHANGE MySQL-specific encyrption types 'password' and 'old_password' are no longer included by default. Use PasswordEncryptor_MySQLPassword and PasswordEncryptor_MySQLOldPassword
API CHANGE Built-in number of hashing algorithms has been reduced to 'none', 'md5', 'sha1'. Use PasswordEncryptor::register() and PasswordEncryptor_PHPHash to re-add others. (merged from r90949)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91576 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Ingo Schommer
2a1abcae2a BUGFIX Legacy password hash migration in MemberAuthenticator::authenticate() which fixes the precision problems mentioned in #3004 when a user logs in (from r90950)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Ingo Schommer
710f701645 MINOR Moved Security::encryptallpasswords() to EncryptAllPasswordsTask (merged from r90948)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91564 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Ingo Schommer
4a850fe00f BUGFIX Added setup/teardown methods to SiteTreeBrokenLinksTest? to make it work with Translatable enabled (merged from r91033)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:33 +13:00
Sean Harvey
17f6f3fbe7 MINOR #6397 CoreTest should use test specific paths, otherwise conflicts can occur in certain environments (from r115854)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115855 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-26 22:51:08 +00:00
Geoff Munn
360176d23c MINOR: cached fieldlist array can now be cleared
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-12 00:10:38 +00:00
Geoff Munn
f2156243a4 MINOR: transaction function names fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115441 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-11 23:01:42 +00:00
Sean Harvey
60f237092a BUGFIX #6299 TableListField::Link() includes $action value twice (thanks ajshort!) (from r115379)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-10 03:46:28 +00:00
Will Rossiter
2ed7c9c1b0 BUGFIX: fixed accessing private variable from Geoip. ENHANCEMENT: added Geoip::get_default_country_code(). Fixes #6315
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115364 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-09 05:55:17 +00:00
Sean Harvey
2b0729d435 ENHANCEMENT XMLDataFormatter::convertDataObjectWithoutHeader() now escapes HTML fields using CDATA (thanks random-value!)
MINOR Added unit test for XMLDataFormatter::convertDataObjectWithoutHeader()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 04:51:24 +00:00
Will Rossiter
bda08c6988 ENHANCEMENT: abstract generateURLSegments functionality out to Convert::raw2url() to allow non site tree objects to safely make use of the logic. BUGFIX: #5586 Group::setCode() now calls Convert::raw2url() rather than requiring a SiteTree instance
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 03:18:51 +00:00
Will Rossiter
71c52f01df EHANCEMENT: #5673 allow further manipulation on Image_Cached objects. Thanks charden!. BUGFIX: generate valid png files in ImageTest to prevent getimagesize() calls returning false results
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115202 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 02:19:17 +00:00
Ingo Schommer
e4c586f78e BUGFIX Checking for existence of FormAction in Form->httpSubmission() to avoid bypassing $allowed_actions definitions in controllers containing this form
BUGFIX Checking for $allowed_actions in Form class, through Form->httpSubmission()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115182 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 00:00:38 +00:00
Will Rossiter
0b54ce3450 ENHANCEMENT: #5248 improved the handling of attaching invalid extensions to dataobjects.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115174 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-19 23:04:44 +00:00
Will Rossiter
573acaed89 FEATURE: added Geoip::set_default_country_code() to set fall back country (thanks ronan). ENHANCEMENT: added set_enabled() and is_enabled() to Geoip to allow disabling of Geoip lookups. (Fixes #4452)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115157 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-17 01:30:48 +00:00
Sean Harvey
c7a98407b1 ENHANCEMENT #5055 Convert unpredictability and replacing inconsistent conversion. Use htmlspecialchars() and html_entity_decode() wherever possible which are faster than str_replace()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 22:55:17 +00:00
Ingo Schommer
f056abc818 ENHANCEMENT Added NullHTTPRequest as a placeholder for new RequestHandler/Controller instances that haven't handled a URL yet. This means RequestHandler->request can be safely called from singleton controllers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115116 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 04:06:13 +00:00
Will Rossiter
815e9efd94 APICHANGE: removed page comments from core. Please see the github.com account for page comments functionality
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 05:43:08 +00:00
Sean Harvey
073563a24e MINOR Fixed unit test to use a better approach of array_keys()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114820 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 05:39:06 +00:00
Sean Harvey
441bf4d910 MINOR Test for insertBefore functionality on FieldSet::addFieldsToTab()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114818 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 03:38:11 +00:00
Will Rossiter
21f84c9513 APICHANGE: changed BaseHref to AbsoluteBaseURL for consistency. FEATURE: added BaseURL for getting non absolute value. PATCH via muzdowski (#6158)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114815 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 02:01:13 +00:00
Ingo Schommer
4b2c64c843 BUGFIX Avoid potential referer leaking in Security->changepassword() form by storing Member->AutoLoginHash in session instead of 'h' GET parameter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114758 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-09 21:18:49 +00:00
Sam Minnee
05d6df2193 MINOR Fixed php tag in SecurityTokenTest, should be "<?php" not "<?" (from r114016)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114543 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:41:38 +00:00
Sam Minnee
400157c8bf MINOR Fixed RSSFeedTest which should put test configuration code into setUp() and tearDown() methods. If the test fails halfway through, these will get called to clean up the state (from r113430)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114535 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:35:33 +00:00
Sam Minnee
1a3897ab1a ENHANCEMENT Validation for uploaded files (from r113420)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114534 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:35:06 +00:00
Sam Minnee
854e0e30b4 ENHANCEMENT Added Form->enableSecurityToken() as a counterpart to the existing disableSecurityToken() (from r113284)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114531 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:30:32 +00:00
Sam Minnee
9ec31acacb ENHANCEMENT Added SecurityToken to wrap CSRF protection via "SecurityID" request parameter (from r113272)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114525 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:22:57 +00:00
Sam Minnee
662f581b24 BUGFIX Fixed month conversion in DateField_View_JQuery::convert_iso_to_jquery_format() (fixes #6124, thanks mbren and natmchugh) (from r113247)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:20:13 +00:00
Ingo Schommer
c378448f19 ENHANCEMENT Added RandomGenerator for more secure CRSF tokens etc.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114497 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 00:18:19 +00:00
Ingo Schommer
396f297acb API CHANGE Using i18n::validate_locale() in various Translatable methods to ensure the locale exists (as defined through i18n::$allowed_locales)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114470 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:28:24 +00:00
Ingo Schommer
17ac4753fd BUGFIX Check for valid locale in i18n::set_locale()/set_default_locale()/include_locale_file()/include_by_locale() (as defined in i18n::$allowed_locales). Implicitly sanitizes the data for usage in controllers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:27:41 +00:00
Ingo Schommer
07c821c4a7 ENHANCEMENT Added $argCharLimit to SS_Backtrace::full_func_name(), to avoid printing really long strings its set to 10,000 by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:50 +00:00
Ingo Schommer
ab563c1418 MINOR Using built-in ORM methods for GroupTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114135 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:49 +00:00
Ingo Schommer
b15019a95f ENHANCEMENT Added SS_HTTPResponse->setStatusDescription() as equivalent to setStatusCode(). Added documentation.
BUGFIX Strip newlines and carriage returns from SS_HTTPResponse->getStatusDescription() (fixes #6222, thanks mattclegg)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114082 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-23 19:38:15 +00:00
Sean Harvey
9ac991636e MINOR Merged r113933,113936-113937 from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-22 02:02:11 +00:00
Ingo Schommer
ab92919b27 ENHANCEMENT Allowing i18nTextCollector to discover entities in templates stored in themes/ directory (thanks nlou)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113918 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-18 19:00:13 +00:00
Ingo Schommer
854cbe79c8 API CHANGE Don't partially URI encode strings in SiteTree->RelativeLink(), rely on XML casting in templates instead (fixes #6125, thanks paradigmincarnate)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113694 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-13 02:54:13 +00:00
Sam Minnee
f0dc6c65ca BUGFIX Ensure that \r carriage return characters get stripped out before setting content in HTMLValue::setContent(). DOMDocument will transform these into &#13 entities, which is apparently XML spec, but not necessary for us as we're using HTML (from r111949)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112946 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:07:27 +00:00
Sam Minnee
8222d72d39 MINOR #6083 FileTest doesn't remove test folders and files created during test (from r111903)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112943 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:06:39 +00:00
Sam Minnee
f51f5bc958 BUGFIX Ensure that windows-style newlines ("\r\n") don't get converted to their XML entity representation through DOMDocument in SS_HTMLValue->setContent() (from r111878)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112935 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:03:29 +00:00
Sam Minnee
1fc540c16b MINOR Fixed regression from r111843 (i18nText, MemberDatetimeFieldTest, MemberTest) (from r111844)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112929 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:01:35 +00:00
Sam Minnee
7d09ef3e60 MINOR Change matchesRoughly threshold slightly in DbDatetimeTest to allow for slower database server connections (from r111821)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:55:50 +00:00
Sam Minnee
6449e3a1a7 MINOR Added FulltextSearchable::get_searchable_classes() in order to introspect currently searchable classes, added FulltextSearchableTest, added documentation (from r111789)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:53:36 +00:00
Sam Minnee
dd92459517 MINOR CoreTest::testGetTempPathInProject() will try to create a temp dirs when running. CoreTest::tearDown() will now remove these temp dirs when the test finishes (from r111748)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:52:46 +00:00
Sam Minnee
2dca48ba09 MINOR: Unit test breaks if another module or project extends Folder (from r111669)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112917 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:52:20 +00:00
Sam Minnee
d6c1d3b28d MINOR Fixed SQL quoting bug in FolderTest (caused by r111493) (from r111496)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:51:22 +00:00
Sam Minnee
b2624e0012 BUGFIX Moving folder after executing Folder::findOrMake will not set the Filenames properly. Invoking updateFilesystem() in File->onAfterWrite() instead of onBeforeWrite(), and avoid caching in FIle->getRelativePath() (fixes #5994 and #5937, thanks muzdowski) (from r111493)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112908 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:00:57 +00:00
Sam Minnee
976f96ee0a ENHANCEMENT Added "module=" argument to FullTestSuite (to support comma-separated module lists) (from r111489)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112906 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:55:44 +00:00
Sam Minnee
dd1c02cd90 BUGFIX: Search didn't respect searchableClasses passed to FulltextSearchable::enable() (from r111464)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112905 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:54:51 +00:00
Sam Minnee
de795ba0aa MINOR Code formatting in FullTestSuite (from r111133)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112898 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:47:39 +00:00
Sam Minnee
8d0253ad57 MINOR PHPUnit annotations for PhpSyntaxTest (from r111116)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:46:47 +00:00
Sam Minnee
3808b1f393 BUGFIX Fixed PhpSyntaxTest not to rely on relative folder references (broken due to chdir() changes in cli-script.php and bootstrap.php) (from r111097)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112894 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:46:04 +00:00
Sam Minnee
b93fe403c0 MINOR Don't use chdir(), it confuses the hell out of phpunit (e.g. directory_exists() and realpath() no longer work as expected) (from r111051)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112889 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:43:31 +00:00
Sam Minnee
064ccecd6b ENHANCEMENT Allowing to run single tests via phpunit through new test bootstrap XML file (e.g. "phpunit sapphire/tests/api/RestfulServerTest.php" or "phpunit sapphire/tests/api") (from r111048)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:41:34 +00:00
Sam Minnee
12d8b6994f MINOR Fixed SSViewerTest to initialize controller properly (from r111047)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112885 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:38:47 +00:00
Sam Minnee
96beff54fb MINOR Remove all session data in TestSession that might've been set by the test harness (necessary for test runs through the phpunit binary) (from r111046)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112884 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:38:31 +00:00
Sam Minnee
2e91384e72 ENHANCEMENT: Added FullTestSuite.php, so that you can test by running "phpunit sapphire/tests/FullTestSuite". (from r111045)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112883 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:36:48 +00:00
Sam Minnee
ffba082738 BUGFIX Fixed column names that were not quoted that broke PostgreSQL (from r110944)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112869 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:06:15 +00:00
Sam Minnee
0b2ed12c63 BUGFIX: delete orphaned records from versioned tables when updating. #5936 (from r110901)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:01:51 +00:00
Sam Minnee
ef36436f75 BUGFIX Protect MemberTest from side effects caused by auth_openid and forum modules (from r110894)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112865 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:01:29 +00:00
Sam Minnee
2d82ae6217 BUGFIX Enforcing canEdit() checks in ComplexTableField_Popup - making form readonly if the current user can't edit (from r110857)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112863 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:00:45 +00:00
Sam Minnee
d8a8635374 API CHANGE Member->canEdit() returns false if the editing member has lower permissions than the edited member, for example if a member with CMS_ACCESS_SecurityAdmin permissions tries to edit an ADMIN (fixes #5651) (from r110856)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112861 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 02:46:26 +00:00
Sam Minnee
995f1f4157 BUGFIX: ensure that pages can only be requested from staging and live (from r110759)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:32:39 +00:00
Sam Minnee
a1044749b0 BUGFIX: fix TranslatableSearchFormText by supporting fulltext search for MSSQL and using extendedSQL function call that augments queries properly (previously it was using DB::query which does not augment). Added wait to TranslatableSearchFormText so the test actually passes. (from r110262)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112840 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:30:10 +00:00
Sam Minnee
3f90b70db2 BUGFIX: force the test to wait until indexing completes. Do not use stop words ('me') (from r110130)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112832 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:27:18 +00:00
Sam Minnee
274387f0f4 BUGFIX: BasicAuthTests fail when Member's unique_identifier_field is anything except the default of Email (from r109834)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112831 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:26:49 +00:00
Sam Minnee
29ca5ff9a7 BUGFIX: disable basic auth for the restful controller test (from r109714)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112829 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:26:09 +00:00
Sam Minnee
46a38e972f MINOR: return a fail instead of an error (from r109382)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112825 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:25:03 +00:00
Sam Minnee
38f9e74fba MINOR Tests for Member::getName() and Member::setName() (from r109333)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112823 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:24:04 +00:00
Sam Minnee
99fde26091 MINOR CSSContentParser::__construct() now gives a better error if the content could not be parsed. This will mostly happen if tidy isn't present. (from r109274)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:23:00 +00:00
Sam Minnee
496e9bcef6 API CHANGE #5873 DataObjectSet::shift() now performs a proper shift instead of unshift (wrong). Please use DataObjectSet::unshift($item) if unshifting was intended!
API CHANGE Added DataObjectSet::pop()
MINOR Unit tests for DataObjectSet::shift(), DataObjectSet::unshift() and DataObjectSet::pop() (from r109156)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:20:56 +00:00
Sam Minnee
fcc20b5e1a BUGFIX Fixed ContentNegotiator to handle HTML and XHTML base tags properly when converting, regression from r108413 (from r108421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112815 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:20:07 +00:00
Sam Minnee
97be4d2ca6 BUGFIX: Remove () that was breaking coverage report (from r109128)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112787 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:58:40 +00:00
Sam Minnee
634a3afeff MINOR: Applied patch from walec51 for <% control %> on empty set (#5579) Also added unit tests by ischommer (from r109127)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112785 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:58:23 +00:00
Sam Minnee
bf935d5a5e MINOR: Clear out the test database in between each salad scenario. (from r109100)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112778 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:54:45 +00:00
Sam Minnee
db8035e1a1 MINOR Added tests for File::getURL() and File::getAbsoluteURL() (from r109066)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:52:57 +00:00
Sam Minnee
7f3f167748 ENHANCEMENT: make RestfulService support PUT method. (from r108942)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112768 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:51:33 +00:00
Sam Minnee
83e31e1f8a MINOR Fixed DirectorTest to restore it's REQUEST_URI state to the original one after each test method is run (from r108665)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112764 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:50:15 +00:00
Sam Minnee
b7f21302bc MINOR Fixed failing test as session being set before logging out and losing BackURL (from r108518)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112759 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:47:19 +00:00
Sam Minnee
d60ef78ba4 ENHANCEMENT: Restful service returns cached response on http and curl errors (from r108437)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:36:48 +00:00
Sam Minnee
6a83da1455 MINOR Fixed Director::forceSSL() breaking unit tests because headers were already sent (from r108435)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112749 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:36:06 +00:00
Sam Minnee
8d5c684453 MINOR Reverted r108433 (from r108434)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112748 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:33:52 +00:00
Sam Minnee
07329cc45c MINOR DirectorTest should not extend from FunctionalTest (regression from r108428) (from r108433)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112747 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:33:30 +00:00
Sam Minnee
63e425b418 ENHANCEMENT #2856 Limiting of relative URLs for Director::forceSSL() using a map of PCRE regular expressions (from r108428)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:32:42 +00:00
Sam Minnee
43c0e432ed BUGFIX CurrencyField doesn't accept negative value (#5769, thanks simon_w) (from r108422)
BUGFIX: Take note of output format when building Location header for RestfulServer (from r108427)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112744 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:32:18 +00:00
Sam Minnee
684e76e36b ENHANCEMENT Added argument to SQLQuery->leftJoin()/innerJoin() (#5802, thanks stojg) (from r108418)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112732 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:58:43 +00:00
Sam Minnee
e5a07227c2 ENHANCEMENT: Full-text search with double quotes returns too many results. ticket #5733. Thanks ktauber.
Using htmlentities($keywords,ENT_NOQUOTES) instead of proposed solution (from r108417)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:58:23 +00:00
Sam Minnee
2058ee31ee BUGFIX: DataObjects without the Versioned decorator cannot have a "Version" field. ticket #5775. Thanks ajshort (from r108399)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:53:19 +00:00
Sam Minnee
2ec9234da6 BUGFIX Bypass BasicAuth when in CLI mode so unit tests can run (regression from r104962) (from r108193)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112715 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:42:45 +00:00
Sam Minnee
d30b478690 MINOR: Added test for #5662 (calling delete twice) (from r108025)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112708 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:40:56 +00:00
Sam Minnee
c35349f90d ENHANCEMENT: added getter to get array back out of an ArrayData instance. MINOR: updated docblocks in ArrayData (from r108012)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112705 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:39:19 +00:00
Sam Minnee
7254c00aef BUGFIX #5833 Duplicate IDs when two similar date formats in Member_DatetimeOptionsetField containing different delimiters (e.g / and .) replaced to an empty string (from r108001)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112703 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:34:09 +00:00
Sam Minnee
0e3693f99e BUGFIX: tests now pass when the locale is set to something other than 'en_US' in the mysite's _config.php file (from r107940)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112702 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:33:41 +00:00
Sam Minnee
93eb6214b7 ENHANCEMENT Allowing custom messages and permission codes in BasicAuth::protect_entire_site()
ENHANCEMENT Making $permissionCode argument optional for BasicAuth::requireLogin(). If not set the logic only checks for a valid account (but no group memberships)
ENHANCEMENT Using SS_HTTPResponse_Exception instead of header()/die() in BasicAuth::requireLogin() to make it more testable (from r107867)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112701 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:29:35 +00:00
Sam Minnee
c5f4926d4d BUGFIX Fixed DateField->validate() with keyed, but empty array values
MINOR Fixed DateField/TimeField validation message translation (wrong sprintf() nesting) (from r107789)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112696 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:25:41 +00:00
Ingo Schommer
1c54a6dc77 BUGFIX Case insensitive extension checks in File::validate() (fixes #5781, thanks simon_w) (from r107539)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112604 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:53:54 +00:00
Ingo Schommer
b64015e2cf BUGFIX Remove dummy entry created by Versioned if record is first written to Live stage (fixes #5596, thanks muzdowski) (from r107537)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112603 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:53:14 +00:00
Ingo Schommer
577e82a123 BUGFIX Fixed Member->PasswordEncryption defaults when writing new Member without setting a password. Fixes critical issue with MemberTableField saving in admin/security, where new members are stored with a cleartext password by default instead of using the default SHA1 (see #5772) (from r107532)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112602 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:52:38 +00:00
Ingo Schommer
bd927c9355 ENHANCEMENT: html2raw now properly replace strong tag with asterix #5494 (from r107443)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112600 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:51:55 +00:00
Ingo Schommer
d67c43ad7d ENHANCEMENT Using jQuery UI datepicker in DateField and DatetimeField instead of outdated DHTML calendar.js (fixes #5397)
ENHANCEMENT Abstracted optional DateField->setConfig('showcalendar') logic to DateField_View_JQuery (from r107438)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:48:39 +00:00
Ingo Schommer
f097b678d8 ENHANCEMENT: allow adding a new a field to ArrayData (from r107434)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112595 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:47:27 +00:00
Ingo Schommer
556e753fee ENHANCEMENT: Added documentation and changed static names (from r107429)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112593 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:46:32 +00:00
Ingo Schommer
f179458542 BUGFIX: Added quotes for postgres (from r107428)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:46:08 +00:00
Ingo Schommer
2f4fe2ff35 ENHANCEMENT: Added static to set regeneration of default pages (ticket #5633) (from r107426)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:44:57 +00:00
Ingo Schommer
bd6e51c87f BUGFIX: Only highlight strings more than 2 characters long. #4949 (from r107423)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:44:24 +00:00
Ingo Schommer
aa1553517c ENHANCEMENT Use array_combine() instead of custom logic for ArrayLib::valuekey() (thanks paradigmincarnate!) (from r107380)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:24:32 +00:00
Ingo Schommer
47762cdf5b ENHANCEMENT #5352 Decouple date display from i18n locales, users now have access to change their date and time formats in Member::getCMSFields() using Member_DatetimeOptionsetField field (from r107326)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:23:02 +00:00
Ingo Schommer
706553ee95 MINOR Checking that Folder::findOrMake() can create an assets/assets/ folder (from r107276)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:21:41 +00:00
Ingo Schommer
5d5bb2618a API CHANGE Don't reflect changes in File and Folder property setters on filesystem before write() is called, to ensure that validate() applies in all cases. This fixes a problem where File->setName() would circumvent restrictions in File::$allowed_extensions (fixes #5693)
API CHANGE Removed File->resetFilename(), use File->updateFilesystem() to update the filesystem, and File->getRelativePath() to just update the "Filename" property without any filesystem changes (emulating the old $renamePhysicalFile method argument in resetFilename())
API CHANGE Removed File->autosetFilename(), please set the "Filename" property via File->getRelativePath()
MINOR Added unit tests to FileTest and FolderTest (some of them copied from FileTest, to test Folder behaviour separately) (from r107273)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:20:47 +00:00
Ingo Schommer
8ed5e18085 MINOR Changed ImageTest to use fixture files located in assets/ folder, the filesystem API doesn't support Folder objects with "sapphire/..." paths, which leads to inconsistent results (from r107272)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:17:14 +00:00
Ingo Schommer
9d227ba2e4 MINOR Making FileTest->setUp()/tearDown() more resilient against in-test file/folder renames (from r107271)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:16:33 +00:00
Ingo Schommer
8b88f4aaf4 MINOR More identifiable file naming in FileTest (from r107270)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:16:16 +00:00
Ingo Schommer
96d1625102 MINOR Made File::get_file_extension() more readable, and added unit test (from r107267)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112555 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:14:59 +00:00
Ingo Schommer
25a0c3e7fb ENHANCEMENT: in referencing a file in combine_files() it should fall back to standard requirement tags if combining has been disabled eg dev mode (from r107091)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112549 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:09:15 +00:00
Ingo Schommer
dcb402479a MINOR Added FileTest->testValidateExtension() (related to #5693) (from r106805)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112539 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:04:54 +00:00
Ingo Schommer
d51627a342 MINOR Fixed hardcoded error message in PasswordValidator (fixes #5734)
MINOR Added PasswordValidatorTest (from r106687)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112534 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:03:19 +00:00
Ingo Schommer
39b056024f APICHANGE: moved Group::addToGroupByName to $member->addToGroupByCode. (from r106217)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:00:48 +00:00
Ingo Schommer
197cdb0f64 BUGFIX: updated tests for Text (from r106205)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112527 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:00:12 +00:00
Ingo Schommer
e36247c1ed ENHANCEMENT: added prefix and suffix support to ContextSummary (from r106200)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112526 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:59:46 +00:00
Ingo Schommer
f0d03207a6 MINOR: Better checking of safe_mode in MemoryLimitTest (from r106187)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112524 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:58:55 +00:00
Ingo Schommer
02c2af7249 MINOR: Don't run memory limit tests in safe mode, (from r106156)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:58:39 +00:00
Ingo Schommer
06ba0085dd MINOR: Added test for Database::hasTable(). (from r106119)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112519 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:57:14 +00:00
Ingo Schommer
c7b47d8a8b BUGFIX: Don't let deleteFromStage() kill the ID of the original record. (from r106080)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112515 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:55:45 +00:00
Ingo Schommer
09d4d0ccb3 BUGFIX: fixed phpunit directive (from r105907)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112510 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:53:46 +00:00
Ingo Schommer
3b4d0a7422 ENHANCEMENT: Added method for $this->request->latestParam() backwards compatibility with Director::urlParam() (from r105890)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:53:11 +00:00
Ingo Schommer
3aee3e2b23 BUGFIX: invalid use of @covers annotation (from r105889)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:52:20 +00:00
Ingo Schommer
91700a3dac BUGFIX: updated select options classes to work with the dataobjectset returned by selectoptions rather than the array previously (from r105872)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:51:33 +00:00
Ingo Schommer
4c2ff4bd0a APICHANGE: refactored methods in session to use coding conventions (from r105756)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112502 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:50:43 +00:00
Ingo Schommer
567143b3ff MINOR More solid markup testing in TableListFieldTest through xpath (from r105305)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:48:27 +00:00
Ingo Schommer
1dc0675abf MINOR Fixed TableListFieldTest->testSelectOptionsRendering() (from r105297)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:47:39 +00:00
Ingo Schommer
12fa850986 ENHANCEMENT: Preserve sort options in pagination links in TableListField (from r105275)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112475 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:29:44 +00:00
Ingo Schommer
bcbe9c254d ENHANCEMENT Allowing batch checkbox selection of TableListField rows with TableListField->Markable and TableListField->addSelectOptions() (from r105266)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112473 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:27:59 +00:00
Ingo Schommer
4c1938fabd MINOR Added DbDatetimeTest cases to sapphire (these were previously in the sqlite3 module, but they actually test core Database functionality) (from r105196)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112443 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:28:43 +00:00
Ingo Schommer
f22260487a MINOR: Save and restore lang state in test (from r104835)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112397 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:16:13 +00:00
Ingo Schommer
0eccb61c17 ENHANCEMENT: added plugins to i18n to support modules that provide custom translations. (from r104827)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112395 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:15:54 +00:00
Ingo Schommer
2341f3fdd3 MINOR Fixed SiteTreeTest and SiteTreePermissionsTest to work alongside subsites module (SiteTreeSubsites changes the canEdit() behaviour) (from r104798)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112384 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:14:24 +00:00
Ingo Schommer
689494d55e MINOR Fixed SiteConfigTest to work alongsite subsites module (SiteTreeSubsites changes the canEdit() behaviour) (from r104796)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:13:55 +00:00
Ingo Schommer
ecb758de10 MINOR Added DirectorTest->testURLParam() and DirectorTest->testURLParams() (from r104711)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112376 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:10:43 +00:00
Ingo Schommer
9cc825e769 BUGFIX: Fixed Controller::join_links() handling of fragment identifiers (from r104580)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112352 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:29:29 +00:00
Ingo Schommer
971d0f108f BUGFIX: When finding an old page in the 404 handler, favour existing subpages over historical ones. (from r104468)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:28:02 +00:00
Ingo Schommer
253c27e2a8 BUGFIX: Fix legacy URL redirection for pre-nestedurls URLs, after it has been enabled. (from r104463)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112347 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:05:18 +00:00
Ingo Schommer
8f2d9200ae Multi-use redemption page created (from r104442)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112346 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:04:47 +00:00
Ingo Schommer
b637914510 FEATURE: Add 'Given I load the fixture file "app/tests/xyz.yml"' step to salad (from r104232)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112342 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:02:51 +00:00
Ingo Schommer
2bab8c8729 BUGFIX ViewableData->castingClass() cuts off last character of a casting definition if it has bracketed arguments (fixes #5536, thanks ajshort) (from r104063)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112331 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:56:11 +00:00
Ingo Schommer
bf9a3d43f6 MINOR: Unit test fails if the previous build left temp files behind, so they are removed at the start of the test (from r104050)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112330 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:55:31 +00:00
Ingo Schommer
caa2a292bb BUGFIX: SecurityTest tests would fail on sites which had set a non-default unique identifier field for Members (from r104016)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112329 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:53:44 +00:00
Ingo Schommer
d25916b810 BUGFIX Trimming expected output of WebserverRoutingTest (newlines before the "ok" string were causing failures on PHP 5.3) (from r103912)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112324 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:51:34 +00:00
Ingo Schommer
28a7b03bef BUGFIX Disabled MemoryLimitTest for environments where memory_limit can't be freely set (e.g. PHP with suhosin patch) (from r103910)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112323 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:51:03 +00:00
Sam Minnee
d7ffd8c601 MINOR Fixed TranslatableSearchFormTest for postgresql (strict type assertions) (from r103821)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112164 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:09:17 +00:00
Sam Minnee
cde2f6ef67 MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues) (from r103819)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112163 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:08:52 +00:00
Sam Minnee
a40d190161 BUGFIX Rebuilding test database for postgresql in SearchFormTest and TranslatableSearchFormTest to avoid stale index information in the database (from r103803)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112161 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:07:10 +00:00
Sam Minnee
94158efc45 MINOR Removed mysql specific functionality from DataObjectSchemaGenerationTest and moved it to a new MySQLDatabaseTest (from r103799)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:06:50 +00:00
Sam Minnee
5fe546dbc0 MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues) (from r103798)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112159 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:06:21 +00:00
Sam Minnee
0c81b2f997 APICHANGE: changed the modulus offset to 1 to correctly order sets (from r103792)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112158 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:05:04 +00:00
Sam Minnee
0b4e4428be MINOR: Merges from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112157 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:04:32 +00:00
Sam Minnee
f5fb01d11b MINOR Fixed AggregateTest for MSSQLDatabase (wrong date formatting) (from r103640)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:01:20 +00:00
Sam Minnee
8da5de8d41 BUGFIX: Fixed ordering by aggregate columns for DataObject::get() calls with joins. (from r103620)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112155 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:00:52 +00:00
Sam Minnee
2c4b07ace7 BUGFIX: Fixed unlimitedRowCount() for grouped queries (from r103613)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:00:14 +00:00
Sam Minnee
2662896ed2 BUGFIX: ModelAsController test failed for projects which do not support nested urls. This fix stores the original configuration and enables 'nested-urls' at the beginning of the tests and reset the state in tearDown. (from r103591)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112151 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:58:29 +00:00
Sam Minnee
752869e23b BUGFIX Renamed Nested URLs are automatically redirected to their new location with 301 HTTP status code in ModelAsController/ContentController (fixes #5393, thanks cbarberis) (from r103461)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112144 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:55:34 +00:00
Sam Minnee
a2f6487fa3 BUGFIX DateField with setConfig('dmyfields') now validates TRUE for empty values (fixes #5458) (from r103450)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:52:36 +00:00
Sam Minnee
5ba7760f35 MINOR: Compiled duplicate tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112138 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:48:33 +00:00
Sam Minnee
c1f38aa66c ENHNANCEMENT: Move cuke/ to salad/ (from r103376)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:45:43 +00:00
Sam Minnee
9f61d51635 REVERT: checked in not-yet-ready code by mistake, reverting (from r103251)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112129 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:39:36 +00:00
Sam Minnee
51375f7cc6 ENHANCEMENT: added tests for checking the change password functionality, including the resulting redirection (from #5420) (from r103250)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112128 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:39:04 +00:00
Sam Minnee
5cb4090145 BUGFIX: r101093 broke casting of values from the failover object. Add lookup to the failover for casting info, and add test (from r103240)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:38:23 +00:00
Sam Minnee
eef3ff8021 BUGFIX: disallow numeric actions - numeric array indexes are incorrectly picked up as allowed actions (#5331) (from r103092)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112118 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:30:54 +00:00
Sam Minnee
268800dec6 BUGFIX #5316 Float and Double should never try to save NULL as the "null" value (from r102460)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:43:58 +00:00