Commit Graph

449 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Ingo Schommer
30f8c74283 API CHANGE Removed DataObjectSet->consolidate(), use DataObjectSet->toNestedArray()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:57:25 +00:00
Ingo Schommer
52ed342fc2 MINOR formatting
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:55:33 +00:00
Ingo Schommer
eb38e4d9c8 API CHANGE Removed DataObjectSet->consolidateString()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65066 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:55:12 +00:00
Ingo Schommer
09564b0132 API CHANGE Renamed DataObjectDecorator->loadExtraDBFields() to loadExtraStatics()
API CHANGE Renamed DataObjectDecorator->extraDBFields() to extraStatics()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:36:57 +00:00
Ingo Schommer
b5b11842f9 BUGFIX Checking for array existence before iterating through DataObjectDecorator->provideI18nEntities()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65063 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:27:33 +00:00
Ingo Schommer
f06ae18409 API CHANGE Moved DataObject::get_by_url() to SiteTree::get_by_url()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65060 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:24:23 +00:00
Ingo Schommer
d19dd96793 API CHANGE Marked DataObject->filledOut() deprecated
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65059 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:17:39 +00:00
Ingo Schommer
d102a902b9 BUGFIX Collecting i18n entities for decorators separately from the decorated classes, as decorated properties like $db have to be stored in the module of the decorated, not in the module of the decorated class.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 23:16:45 +00:00
Ingo Schommer
fd7bc64107 ENHANCEMENT Removed DataObjectDecorator->updateSummaryFieldsExcludeExtra() - was a straight copy of updateSummaryFields()...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65056 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 23:00:50 +00:00
Ingo Schommer
4ecb895b0a ENHANCEMENT Added i18nEntityProvider interface (see comments in #1625) incl. unit tests
MINOR documentation for i18nTextCollector

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65022 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 13:26:08 +00:00
Ingo Schommer
7239db8c1b ENHANCEMENT Allowing translation of some static properties on DataObject and subclasses through DataObject->fieldLabels(). Part of the provideI18nEntities() work which was started in r64881 (see #1625)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65020 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 13:23:38 +00:00
Sean Harvey
e9f65ed8e1 BUGFIX Fixed wrong case of class names for ImageIFrameField causing errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64976 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-31 02:09:04 +00:00
Sam Minnee
cd699e3d89 API CHANGE #2857 - Renamed RequestHandlingData to RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64953 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-30 22:03:21 +00:00
Sam Minnee
672ca89c0b API CHANGE #2698 ajshort: URL handler only passes control to subclasses of RequestHandlingData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-30 21:51:59 +00:00
Ingo Schommer
84db28eb10 FEATURE Collect i18n Entities from dynamic PHP code - useful to translate statics. Added DataObject->provideI18nEntities() and i18nTextCollector->collectFromEntityProviders(). See #1625
FEATURE Making DataObject attributes translatable through i18n class, e.g. $db and all relation statics. Use DataObject->fieldLabels() to access translated attributes.
ENHANCEMENT Ignoring entity-names with $ signs (most likely dynamic properties) in i18nTextCollector->collectFromCode()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-29 21:07:17 +00:00
Normann Lou
27a868ebf2 APICHANGE: add updateFieldLabels() to DataObjectDecorator, so as that a dataobject could update fieldLables by its decorator.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64805 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-28 03:03:16 +00:00
Normann Lou
bff5942338 BUGFIX: Fix YamlFixture issues when specifying IDs
BUGFIX: Fix DataObject::write() with a specified ID and forceInsert to be true

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64798 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-28 01:23:41 +00:00
Normann Lou
3966f9a794 APICHANGE: A Text db field, by default, should be rendered as a TextareaField in its scaffoldForm
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64792 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-28 00:32:51 +00:00
Sean Harvey
a6e6a4387d BUGFIX Renamed "Save & Publish" to "Save and Publish" since this value is used in the value attribute of input elements, properly parsed, this would produce & instead of &
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-19 01:28:30 +00:00
Sean Harvey
7048077184 API CHANGE Removed HtmlOneLineField. This field has been deprecated for some time now, and it does not work.
API CHANGE Changed HTMLVarchar->scaffoldFormField() to use HtmlEditorField instead of HtmlOneLineField, which does not work.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-19 00:18:55 +00:00
Sean Harvey
ee5b0e2447 MINOR ErrorPage removal of ShowInMenus explicitly being set - this is done using static $defaults on the class itself.
MINOR ErrorPage phpDoc updates - removal of non-existant token @usedby, replaced with @see
MINOR Code formatting changes to be more consistent

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64502 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-18 22:31:04 +00:00
Ingo Schommer
795fdb2169 BUGFIX Removed duplicate setValue() method on Time (was supposed to be deleted instead of renamed from setVal() to setValue())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 23:19:39 +00:00
Ingo Schommer
768fc5a588 BUGFIX Adjusted HeaderField and LabelField implementation to new constructor arguments (see r64421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64422 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 13:26:50 +00:00
Ingo Schommer
bc28a64e18 MINOR Changed visibility of SiteTree->getClassDropdown()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64418 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 13:00:02 +00:00
Ingo Schommer
edd087f80b API CHANGE Removed SiteTree->makelinksunique() and SiteTree->makelinksuniquequick() - use new SiteTreeMaintenanceTask
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64416 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 12:18:16 +00:00
Ingo Schommer
d80a6899e1 MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64415 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 12:05:08 +00:00
Ingo Schommer
639dee8926 MINOR Removed unused DatabaseAdmin->makeURL()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 12:02:57 +00:00
Ingo Schommer
b46250b9dc MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64413 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 12:02:41 +00:00
Ingo Schommer
049ab468e3 MINOR Misc deprecation notes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 11:03:01 +00:00
Sean Harvey
1b09577c31 ENHANCEMENT Versioned::get_one_by_stage() and Versioned::get_by_stage() were missing parameters from their get_one() and get() counterparts in DataObject. Those parameters have been added. See ticket #2965 for the origin of this patch.
MINOR phpDoc for Versioned::get_by_stage() to be consistent with Versioned::get_one_by_stage()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64397 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 10:14:47 +00:00
Ingo Schommer
9b1db223ce API CHANGE Removed deprecated Datetime class, use SSDatetime instead (was conflicting with PHP 5.2 integrated classes)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64394 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:59:40 +00:00
Ingo Schommer
2d44f59816 API CHANGE Removed ViewableData->setVal(), use ViewableData->setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:44:32 +00:00
Ingo Schommer
189501b775 MINOR Misc deprecation notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64382 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:44:08 +00:00
Ingo Schommer
0199294864 API CHANGE Removed DataObjectSet->append(), use DataObjectSet->push() or DataObjectSet->merge()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64378 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:40:55 +00:00
Ingo Schommer
f225180511 API CHANGE Removed Image_Saver
API CHANGE Removed Image->transferlegacycontent()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64376 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:38:05 +00:00
Ingo Schommer
62861b091b API CHANGE Removed DataObject->getLastWriteFields(), use DataObject->getChangedFields()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64375 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:37:10 +00:00