Commit Graph

2246 Commits

Author SHA1 Message Date
Sam Minnee
b4977f8500 Added default for HTTP_USER_AGENT
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65471 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 22:40:08 +00:00
Sam Minnee
4f6170c265 BUGFIX: Better initial-site-setup boundary condition checking needed after the manifest builder update
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 22:11:25 +00:00
Ingo Schommer
c6be7af88f ENHANCEMENT Better CLI output for browsing dev/tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 15:34:29 +00:00
Ingo Schommer
c7ff6016b8 BUGFIX Setting Director::set_site_mode('site') in RootURLController in newly added init() method, which fixes Translatable::choose_site_lang(). The original bug was a wrong selected language in the <meta> tags through SiteTree->MetaTags()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65462 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 14:20:19 +00:00
Ingo Schommer
e91de0c1f8 MINOR Removed duplicate dev/simpletest, already present in thirdparty/simpletest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65458 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-08 00:21:31 +00:00
Ingo Schommer
954bf465a1 ENHANCEMENT Allowing to pass strings instead of arrays into FunctionalTest->assert*() methods, and convert them internally to arrays
MINOR PHPDoc for FunctionalTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65457 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-08 00:03:50 +00:00
Ingo Schommer
192078d3d2 BUGFIX Using uncached DataObject::get_one() calls in ModelAsController to avoid stale data with subsequent Director::test() calls which alter the page relations inbetween
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65456 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-08 00:02:35 +00:00
Ingo Schommer
137b76e271 API CHANGE Deprecated DataObjectDecorator->augmentBeforeWrite(), use DataObjectDecorator->onBeforeWrite()
API CHANGE Deprecated DataObjectDecorator->augmentPopulateDefaults(), use DataObjectDecorator->populateDefaults()
API CHANGE Deprecated DataObjectDecorator->augmentDefaultRecords(), use DataObjectDecorator->requireDefaultRecords()
API CHANGE Deprecated DataObjectDecorator->alternateCan(), use DataObjectDecorator->can()
API CHANGE Deprecated DataObjectDecorator->alternateCanAddChildren(), use DataObjectDecorator->canAddChildren()
API CHANGE Deprecated DataObjectDecorator->alternateCanView(), use DataObjectDecorator->canView()
API CHANGE Deprecated DataObjectDecorator->alternateCanDelete(), use DataObjectDecorator->canDelete()
API CHANGE Deprecated DataObjectDecorator->alternateCanEdit(), use DataObjectDecorator->canEdit()
API CHANGE Deprecated DataObjectDecorator->alternateCanCreate(), use DataObjectDecorator->canCreate()
ENHANCEMENT Added DataObject->onAfterDelete() and DataObjectDecorator->onAfterDelete()
ENHANCEMENT Added stub methods to DataObjectDecorator for documentation purposes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:18:35 +00:00
Ingo Schommer
cfde8adaee API CHANGE Removed Folder->userCan*() and File->userCan*()permissions and added more consistent behaviour with Folder->can*() and File->can*()
ENHANCEMENT Allowing decoration of can*() methods in File and Folder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65452 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:17:42 +00:00
Ingo Schommer
c30b5812d1 API CHANGE Don't include NULL returns in decorated methods called through Object->extend(), meaning empty method bodies in decorators won't confuse permission checks through $myObj->extend('canView') etc.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65451 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:09:39 +00:00
Sam Minnee
429f81ed14 Bugfixes to Requirements alterations
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 02:24:31 +00:00
Sam Minnee
cbbedab5a2 MINOR: Changed die() to user_error() so that correct error level is returned
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65437 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 02:07:18 +00:00
Sam Minnee
e6c4d32dbc ARCHITECTURE #3034 wakeless: Make Requirements mockable by pushing the meat of the functionality to Requirements_Backend
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65436 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 02:06:28 +00:00
Sam Minnee
bfc7c7717b Removed redundant code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65397 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 21:01:12 +00:00
Sam Minnee
5a0db59850 BUGFIX: Fixed broken dev/build compilation of manifest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65394 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 20:57:07 +00:00
Normann Lou
2b0add5c72 APICHANGE: make DataObject::getField() visible to the public
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65388 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 06:32:05 +00:00
Sam Minnee
c1d6e82248 API CHANGE: Removed manifest's dependency on database, by removing hastable information [17:47:04]
dquote> API CHANGE: Deprecate ClassInfo::ready() in favour of Security::database_is_ready()
dquote> API CHANGE: Create DataObject::has_own_table() to determine whether a DataObject has a table without looking at it.
dquote> API CHANGE: Exclude /tests/ directories from the manifest entirely except when tests are being run.
dquote> API CHANGE: Added ?usetestmanifest=1 flag to access the test manifest outside of test execution.
dquote> API CHANGE: Simplified Core.php manifest include to just call ManifestBuilder::include_manifest() - manifest takes care of its own cache file

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 04:51:25 +00:00
Ingo Schommer
728e691a1a BUGFIX Added SSViwer support for i18n namespaces in templates with <% _t('MyNamespace.MyEntity', ... %>, to work around magically added namespaces from the parsed template file. Those auto-namespaces were logically not working in includes, as the parsing context is always the including template. Legacy support for auto-namespaces is still present due to its high usage.
ENHANCEMENT Added unit tests for i18n template parsing

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65361 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 02:50:14 +00:00
Ingo Schommer
fdeaececb1 BUGFIX Respecting $dontEscape in FormAction
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65335 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 23:21:50 +00:00
Ingo Schommer
c172e823ea BUGFIX Using empty title in TreeDropdownField->Field() if the related DataObject cannot be found
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65293 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 15:58:46 +00:00
Ingo Schommer
ccd149f689 BUGFIX Reverted text replacement performance improvement in SQLQuery - it was replacing more ocurrences via str_replace() than the previous implementation based on arrays, which broke queries augmented by Translatable (originally committed in r60468 and r54044)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65291 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 14:23:17 +00:00
Sam Minnee
486ae69f09 #2135 - Disallow XSS bug in development RestfulService use
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65287 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 05:04:32 +00:00
Sam Minnee
f3419bf046 BUGFIX #2243: Fixed ViewableData::Odd
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 04:31:53 +00:00
Sam Minnee
33219fcad2 BUGFIX #2954 - Fixed support for negative numbers in decimal fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 04:10:48 +00:00
Sean Harvey
d145c50cc2 ENHANCEMENT Folder name can now be used for uploading files. Ticket #3026 - Thanks simon_w!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 03:56:22 +00:00
Sam Minnee
020a92eda8 BUGFIX #2992: Fixed T_PAAMAYIM_NEKUDOTAYIM error in RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65250 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 01:59:27 +00:00
Will Rossiter
bb20921fef BUGFIX: fixed canPublish() so it actually got the member if none was passed and fixed notice with $results not existing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65242 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 01:05:57 +00:00
Sam Minnee
5f177b9f08 BUGFIX #2056: Removed all references to deprecated Member::isAdmin()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65232 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:31:33 +00:00
Sam Minnee
72d90ab270 Set default edit rights on pages to be only administrators
API CHANGE: Use return value of alternateCanPublish()
BUGFIX: Fixed the Link() value for homepage
BUGFIX: Allow DBField::__construct() without a name
API CAHNGE: Allow augmentPopulateDefaults on data object decorators

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:17:14 +00:00
Ingo Schommer
61a856503e BUGFIX Calling parent constructor in ComplexTableField_ItemRequest, was confusing RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 13:52:03 +00:00
Sean Harvey
dc8876223e MINOR Code formatting on HtmlEditorField functions
MINOR phpDoc of HtmlEditorField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 04:12:54 +00:00
Sam Minnee
fab14c4b18 MINOR: Improve robustness of some of the widget definition
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65190 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 02:21:09 +00:00
Ingo Schommer
572f6728fb ENHANCEMENT Added UpgradeSiteTreePermissionSchemaTask as a manual migration of SiteTree schema upgrades in 2.3 (see #2847)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 15:27:25 +00:00
Ingo Schommer
ca6d92341e API CHANGE Changed SiteTree->Viewers to SiteTree->CanViewType, Changed SiteTree->Editors to SiteTree->CanEditType (see #2847)
API CHANGE Changed SiteTree->ViewersGroup has_one relationship to SiteTree->ViewerGroups has_many relationship (see #2847)
API CHANGE Changed SiteTree->EditorsGroup has_one relationship to SiteTree->EditorGroups has_many relationship (see #2847)
ENHANCEMENT Added 'Inherit' flag to SiteTree->CanViewType and SiteTree->CanEditType (see #2419)
ENHANCEMENT Added unit tests for SiteTree permissions
BUGFIX Checking recursively for permissions on children with SiteTree->canDelete()
BUGFIX Disallow SiteTree->canEdit() if SiteTree->canView() is not granted
Note: Use dev/tasks/UpgradeSiteTreePermissionSchemaTask/run to migrate legacy data to the new schema as outlined above

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 14:52:35 +00:00
Ingo Schommer
ab3ef0196d MINOR Moved tasks from sapphire/cli to new folder sapphire/tasks
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65149 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 13:59:53 +00:00
Ingo Schommer
c4f3bc962f ENHANCEMENT Only logging out users on Security::permissionFailure() is called in non-ajax context. For ajax requests, we now return a 403 HTTP Status in a HTTPResponse Object, with a ":NOTLOGGEDIN" body for backwards compatibility. If a logout+redirection is required after an ajax-request, this should be handled by the clientside.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 13:50:06 +00:00
Ingo Schommer
c998006b2c MINOR Fixed PHP Notices in Member.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65146 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 13:48:04 +00:00
Ingo Schommer
c539687eb2 MINOR Fixed PHP Notices in TreeMultiSelectField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 13:47:40 +00:00
Sean Harvey
6ef535d6ce BUGFIX TableField delete row inconsistency with TableListField which caused table fields to not fade the row out
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65141 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 05:00:43 +00:00
Sam Minnee
1817fc6051 Simplified CliTestReporter output so that buildbot can read it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 04:51:27 +00:00
Sean Harvey
b93a8257f4 BUGFIX Fixed call to Member function that didn't exist
MINOR Check if OldPassword data exists before running checkPassword()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65135 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 03:41:14 +00:00
Sean Harvey
99589e626f BUGFIX Fix potential PHP notice opening a ComplexTableField popup
MINOR Code formatting in ComplexTableField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 02:33:08 +00:00
Ingo Schommer
e57b7651ef ENHANCEMENT Unit tests for Member->inGroup() and Member->inGroups()
ENHANCEMENT Added a "strict-mode" for Member->inGroup() and Member->inGroups() to determine true membership to a group (without inheritance)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65125 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 01:57:16 +00:00
Ingo Schommer
5556e1f5ae MINOR Formatting in Group.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 01:55:59 +00:00
Sam Minnee
c573d51d4c BUGFIX: Fixed bug with ID-less generation of YamlFixture entries that trigger $this->write() in setters
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 01:28:18 +00:00
Ingo Schommer
8fb4ea1eaa BUGFIX Fixed SearchContextTest to comply to new scaffolded searchfield in Text DBFIeld
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65094 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 21:24:56 +00:00
Ingo Schommer
65d5cf088f ENHANCEMENT Scaffolding TextField instead of TextareaField in Text DBField due to size
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65092 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 21:07:09 +00:00
Ingo Schommer
6361a10834 MINOR Updated master language tables
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65074 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:05:21 +00:00
Ingo Schommer
3edc358ead ENHANCEMENT Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:04:10 +00:00
Ingo Schommer
eb4c950655 BUGFIX Reverted auto-detection of i18n statics like $db in DataObject through provideI18nEntities() - was getting too complicated with decorated properties. Overload DataObject->fieldLabels() or DataObjectDecorator->updateFieldLabels() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65071 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:01:49 +00:00