Commit Graph

727 Commits

Author SHA1 Message Date
Ingo Schommer
78ac0fe3d6 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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107867 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:38 +13:00
Ingo Schommer
e8cc316c1a BUGFIX Fixed DateField->validate() with keyed, but empty array values
MINOR Fixed DateField/TimeField validation message translation (wrong sprintf() nesting)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:38 +13:00
Ingo Schommer
b23c650c8a BUGFIX Case insensitive extension checks in File::validate() (fixes #5781, thanks simon_w)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107539 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Ingo Schommer
b20f1fd59d BUGFIX Remove dummy entry created by Versioned if record is first written to Live stage (fixes #5596, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107537 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Ingo Schommer
7ac4a9ec4d 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)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107532 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Saophalkun Ponlu
b8f27de42e ENHANCEMENT: html2raw now properly replace strong tag with asterix #5494
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107443 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Ingo Schommer
5c41df21d4 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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Saophalkun Ponlu
f9ea2613e6 ENHANCEMENT: allow adding a new a field to ArrayData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107434 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
4833ecbfd0 ENHANCEMENT: Added documentation and changed static names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107429 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
a91dffdbbe BUGFIX: Added quotes for postgres
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107428 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
30b4699734 ENHANCEMENT: Added static to set regeneration of default pages (ticket #5633)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107426 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Will Rossiter
7e30018e8d BUGFIX: Only highlight strings more than 2 characters long. #4949
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Sean Harvey
a10bb202af ENHANCEMENT Use array_combine() instead of custom logic for ArrayLib::valuekey() (thanks paradigmincarnate!)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Sean Harvey
3be26a4cec 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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107326 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Ingo Schommer
d55e38b6ab MINOR Checking that Folder::findOrMake() can create an assets/assets/ folder
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Ingo Schommer
c82f0335f0 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)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107273 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
52efe7f3f9 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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
8d82c3c7b7 MINOR Making FileTest->setUp()/tearDown() more resilient against in-test file/folder renames
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107271 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
62dd270fba MINOR More identifiable file naming in FileTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107270 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Ingo Schommer
3781ecc784 MINOR Made File::get_file_extension() more readable, and added unit test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107267 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Will Rossiter
12aedc0e30 ENHANCEMENT: in referencing a file in combine_files() it should fall back to standard requirement tags if combining has been disabled eg dev mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107091 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Ingo Schommer
42ee289493 MINOR Added FileTest->testValidateExtension() (related to #5693)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106805 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:32 +13:00
Ingo Schommer
862c5a8602 MINOR Fixed hardcoded error message in PasswordValidator (fixes #5734)
MINOR Added PasswordValidatorTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106687 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:32 +13:00
Will Rossiter
c38dc3b1b4 APICHANGE: moved Group::addToGroupByName to $member->addToGroupByCode.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106217 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:31 +13:00
Will Rossiter
93040d6781 BUGFIX: updated tests for Text
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:31 +13:00
Will Rossiter
41ec792cb4 ENHANCEMENT: added prefix and suffix support to ContextSummary
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106200 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:31 +13:00
Sam Minnee
c3670e8981 MINOR: Better checking of safe_mode in MemoryLimitTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106187 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:31 +13:00
Sam Minnee
899e41efd5 MINOR: Don't run memory limit tests in safe mode,
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:30 +13:00
Sam Minnee
bb8ad14651 MINOR: Added test for Database::hasTable().
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106119 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:30 +13:00
Sam Minnee
5fbc19f5be BUGFIX: Don't let deleteFromStage() kill the ID of the original record.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:30 +13:00
Mateusz Uzdowski
ead4ac2571 BUGFIX: fixed phpunit directive
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105907 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Carlos Barberis
3bbcb31364 ENHANCEMENT: Added method for $this->request->latestParam() backwards compatibility with Director::urlParam()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Mateusz Uzdowski
ca9f32f9ec BUGFIX: invalid use of @covers annotation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105889 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Will Rossiter
31a7bbc6a3 BUGFIX: updated select options classes to work with the dataobjectset returned by selectoptions rather than the array previously
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Will Rossiter
eecac2f069 APICHANGE: refactored methods in session to use coding conventions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105756 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Ingo Schommer
64b165c6ce MINOR More solid markup testing in TableListFieldTest through xpath
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:28 +13:00
Ingo Schommer
274bea2041 MINOR Fixed TableListFieldTest->testSelectOptionsRendering()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105297 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:28 +13:00
Saophalkun Ponlu
deb208f15d ENHANCEMENT: Preserve sort options in pagination links in TableListField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Ingo Schommer
ba2aabd702 ENHANCEMENT Allowing batch checkbox selection of TableListField rows with TableListField->Markable and TableListField->addSelectOptions()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Sean Harvey
6ca91670f3 MINOR Fixed fixture location for DbDatetimeTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105198 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Sean Harvey
b470c565e7 MINOR Added DbDatetimeTest cases to sapphire (these were previously in the sqlite3 module, but they actually test core Database functionality)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105196 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Mark Stephens
9f0c83ef88 MINOR: Save and restore lang state in test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104835 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:24 +13:00
Mark Stephens
8e1f2b645c ENHANCEMENT: added plugins to i18n to support modules that provide custom translations.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104827 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:24 +13:00
Ingo Schommer
b9d3b1b04d MINOR Fixed SiteTreeTest and SiteTreePermissionsTest to work alongside subsites module (SiteTreeSubsites changes the canEdit() behaviour)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104798 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:24 +13:00
Ingo Schommer
e9adf1d764 MINOR Fixed SiteConfigTest to work alongsite subsites module (SiteTreeSubsites changes the canEdit() behaviour)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104796 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:24 +13:00
Ingo Schommer
017943b067 MINOR Added DirectorTest->testURLParam() and DirectorTest->testURLParams()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104711 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:23 +13:00
Sam Minnee
d8b6b59ebd BUGFIX: Fixed Controller::join_links() handling of fragment identifiers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00
Sam Minnee
4fd6d3ad39 BUGFIX: When finding an old page in the 404 handler, favour existing subpages over historical ones.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00
Sam Minnee
2bc1af1752 BUGFIX: Fix legacy URL redirection for pre-nestedurls URLs, after it has been enabled.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104463 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00
Geoff Munn
f405d71645 Multi-use redemption page created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00