Commit Graph

2210 Commits

Author SHA1 Message Date
Sean Harvey
1d121b7f90 ENHANCEMENT Allow setting date timestamp for Date::setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 04:57:17 +00:00
Sean Harvey
43c96813bf BUGFIX Fixed styling of checkbox - CSS rule wasn't specific enough
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71748 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-12 02:54:32 +00:00
Sean Harvey
7a6861fec2 MINOR Tweaked checkbox field styling
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71714 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 21:56:58 +00:00
Ingo Schommer
6d708765fe BUGFIX Fixed redirection to external URLs through Security/login with BackURL parameter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71708 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 21:08:28 +00:00
Ingo Schommer
74ab33f23b ENHANCEMENT Added Director::is_absolute_url()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71707 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 21:07:58 +00:00
Sean Harvey
569447d2ba BUGFIX Added E_USER_ERROR error to ComponentSet::getExtraData() if a NULL component name is passed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 00:18:00 +00:00
Sean Harvey
1cb6b5c8ee BUGFIX Added E_USER_ERROR error to ComponentSet::getExtraData() if a non-numeric child ID is passed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71639 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-11 00:14:42 +00:00
Sean Harvey
df36ae07e8 ENHANCEMENT Allow getting extra field data for a many-to-many relation by calling getExtraData() on a ComponentSet and passing the component name, and child ID
ENHANCEMENT Hooked up setting field values for many_many_extraFields into ComplexTableField. See r71613 for the original many-to-many auto setting addition
BUGFIX When editing an existing record, many-to-many auto setting wasn't being done because saveComplexTableField() is called on ComplexTableField_ItemRequest
 


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



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



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 06:04:36 +00:00
Sean Harvey
bf07ed2d87 MINOR Code formatting for Date::past_date() and phpDoc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 05:56:07 +00:00
Geoff Munn
5312773e18 'URLSegment' on line 484 and 494 now escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-10 00:49:16 +00:00
Sean Harvey
4e0bf2c671 BUGFIX Fixed Upload::isValidSize() error if a file was uploaded without an extension
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-09 23:02:46 +00:00
Ingo Schommer
023e733b16 BUGFIX Fixed wrong condition in Requirements::includeInHTML() which failed to process requirements if only customCSS() was used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-08 19:06:15 +00:00
Sean Harvey
88720f07c5 MINOR Added basic tests for Percentage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-05 02:33:00 +00:00
Sean Harvey
da18862083 MINOR Code formatting fix in SearchContext
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71410 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-05 01:48:19 +00:00
Sean Harvey
52909a915c BUGFIX Fixed support for SearchFilter on many to many relations that don't have a component class DB table, but have a component base class table
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-04 23:19:22 +00:00
Ingo Schommer
2d83cc412b BUGFIX Fixed htmlEntity searches in SearchForm - merge error from r71172
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71341 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-04 01:36:39 +00:00
Ingo Schommer
5513f569b6 BUGFIX Including Hierarchy->children in flushCache() and renamed to _cache_children. This caused problems in TranslatableTest when re-using the same SiteTree->Children() method with different languages on the same object (even with calling flushCache() inbetween the calls)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71340 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-04 01:36:12 +00:00
Ingo Schommer
bd2b9efede API CHANGE Member->canView() checks for ADMIN or CMS_ACCESS_SecurityAdmin access if not viewing the currently logged-in member. If permissions are enforced in custom interfaces (e.g. social networking frontends), this will impact the output. To loosen permissions, override or decorate Member->canView()
ENHANCEMENT Added Group->canDelete() AND Member->canView()
ENHANCEMENT Making Member->can*() and Group->can*() methods decoratable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 23:33:28 +00:00
Sean Harvey
f6add2dc75 BUGFIX Fixed potential PHP notice in TableField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71326 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 23:20:58 +00:00
Sean Harvey
b34713dffc BUGFIX Fix to Convert::xml2raw() for '
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71325 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 23:17:01 +00:00
Ingo Schommer
4822c68947 BUGFIX Don't require ADMIN permissions to view an administrators group - rather set it to readonly through interfaces like SecurityAdmin
ENHANCEMENT Modified Group->canEdit() to check for CMS_ACCESS_SecurityAdmin permissions codes (see r70697)
BUGFIX Using canView() instead of canEdit() in Group->AllChildrenIncludingDeleted()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 22:44:11 +00:00
Sean Harvey
0a0ce99f5c BUGFIX Switched the arrows for desc/asc to the correct way as per SortDirection = desc check in TableListField.ss
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71309 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 21:27:56 +00:00
Sean Harvey
d471bd4785 BUGFIX Ensure that TestRunner properly unsets the alternate database name (for temp databases) once the tests have finished
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71307 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 21:17:23 +00:00
Sean Harvey
162a11350e MINOR Added code example for using DataObject::$many_many_extraFields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 21:07:32 +00:00
Sean Harvey
cd541ecd3d BUGFIX Added default english strings for TableListField.ss i18n entities
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71303 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 20:42:39 +00:00
Sean Harvey
b3ffe8d4e2 MINOR Code formatting tidy up in Percentage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71301 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 20:29:21 +00:00
Sean Harvey
12e0205bdd MINOR Fixed wrong case of Debug class name for consistency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71298 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 05:14:04 +00:00
Sean Harvey
a38b3268c6 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71282 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 04:00:02 +00:00
Sean Harvey
2f81c822bb BUGFIX: Fix translatable being enabled when it shouldn't be
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71258 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-03 02:49:34 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Andrew O'Neil
2eb73817c2 Blocked translatable changes in 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71167 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:05:35 +00:00
Ingo Schommer
e7e8a1209b BUGFIX #3376 RestfulServiceTest fails with "authorization required" - seems to happen if result cache is not invalidated properly, hence made sure to call ?flush=1 on each URL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70665 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-23 02:08:01 +00:00
Andrew O'Neil
c86971c93f #2328 - Show backtrace for uncaught exceptions (ajshort)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70444 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-20 21:30:12 +00:00
Ingo Schommer
2956cc482f FEATURE Supporting search for special characters like umlauts in SearchForm. These characters are encoded to HTML entities by TinyMCE for SiteTree->Content, hence we need a special case in the search logic (incl. unit tests)
ENHANCEMENT Added MySQL FULLTEXT index for $Content property on SiteTree, Needs separate indexing to be searchable by SearchForm - $Content is the only field which has special characters encoded as HTML entities (through TinyMCE)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-19 02:49:42 +00:00
Ingo Schommer
4c4926d2b9 FEATURE Enabled specifying a language through a hidden field in SearchForm which limits the search to pages in this language (incl. unit tests)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-19 02:18:41 +00:00
Ingo Schommer
7057b56b2c ENHANCEMENT Making ErrorPage static HTML files translatable (#2233)
ENHANCEMENT Added ErrorPage::$static_filepath to flexibly set location of static error pages (defaults to /assets)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70326 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-19 01:25:23 +00:00
Ingo Schommer
56cb10e1c5 BUGFIX Altering parent getCMSFields() results in RedirectorPage instead of starting with an empty FieldSet, as this discards any tabs and fields which are not explicitly mentioned in the implementation like the ability to create a translation.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70325 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-19 00:33:43 +00:00
Ingo Schommer
095084fb22 BUGFIX Using array_diff_key() instead of array_diff() in LanguageDropdownField to avoid language with existing translations showing up in the "available translations" dropdown for page CMS fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70321 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 23:07:51 +00:00
Ingo Schommer
54811abbd2 MINOR More Translatable unit tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 22:48:45 +00:00
Ingo Schommer
84a7b17cb4 ENHANCEMENT Disabled Translatab-e>augmentWrite() - was only needed for the blacklist fields implementation which is inactive for the moment
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70319 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 22:47:02 +00:00
Ingo Schommer
33066bffda BUGFIX Reverted special cases for Translatable in Versioned->canBeVersioned() (originally committed in r42119) - was checking for existence of underscores in table names as an indication of the "_lang" suffix, which is no longer needed. It was also a flawed assumption which tripped over classes like TranslatableTest_TestPage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 22:46:16 +00:00
Ingo Schommer
e39f4f747a ENHANCEMENT Added welsh to i18n::$common_languages (#2640)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70317 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 21:30:10 +00:00
Ingo Schommer
bcac495926 ENHANCEMENT Recursively creating translations for parent pages to ensure that a translated page is still accessible by traversing the tree, e.g. in "cms translation mode" (in Translatable->onBeforeWrite())
ENHANCEMENT Simplified AllChildrenIncludingDeleted() to not require a special augmentAllChildrenIncludingDeleted() implementation: We don't combine untranslated/translated children any longer (which was used in CMS tree view), but rather just show translated records
ENHANCEMENT Ensuring uniqueness of URL segments by appending "-<langcode>" to new translations (in Translatable->onBeforeWrite())
ENHANCEMENT Added Translatable->alternateGetByUrl() as a hook into SiteTree::get_by_url()
ENHANCEMENT Adding link back to original page in CMS editform for translations
BUGFIX Excluding HiddenField instances from Translatable->updateCMSFields()
BUGFIX Don't require a record to be written (through exists()) when checking Translatable->isTranslation() or Translatable->hasTranslation()
MINOR Don't use createMethod() shortcut for Translatable->AllChildrenIncludingDeleted()
MINOR Added Translatable unit tests

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-16 04:14:34 +00:00
Ingo Schommer
7ccd1bbc24 ENHANCEMENT Looking for URLSegments in languages outside of default language in ModelAsController by implementing a new extension point in SiteTree::get_by_url(): DataObjectDecorator->alternativeMatches()
ENHANCEMENT Allowing non-default language URLs to be accessed without explicitly specifying the language in GET request

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-16 04:07:17 +00:00
Ingo Schommer
c67ef43f6c MINOR initializing local variables properly in Hierarchy
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70304 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-16 04:04:13 +00:00
Ingo Schommer
d5339af47c BUGFIX Falling back to Translatable::current_lang() if no $context object is given, in augmentAllChildrenIncludingDeleted() and AllChildrenIncludingDeleted()
MINOR phpdoc for Translatable
MINOR Added more Translatable unit tests

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70214 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-15 05:56:25 +00:00
Ingo Schommer
42fd02234d ENHANCEMENT Added Hierarchy->flushCache() to clear in-memory caches for allChildrenIncludingDeleted() and allChildren()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70213 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-15 05:54:10 +00:00
Ingo Schommer
613d13e15d MINOR More Translatable unit tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-14 04:10:54 +00:00