mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Update code/BlogHolder.php
fix to the ownerID issue with BlogHolder.php was previously storing the ID of the downdown select having been renumbered from 0, now stores the actual Member->ID of the blog owner.
This commit is contained in:
parent
4c30a80963
commit
553b5686d7
@ -41,8 +41,13 @@ class BlogHolder extends BlogTree implements PermissionProvider {
|
||||
$fields = parent::getCMSFields();
|
||||
SiteTree::enableCMSFieldsExtensions();
|
||||
|
||||
//sets the ID and Name Map for Blog Ownership
|
||||
$owners = new DropdownField('OwnerID', 'Blog owner', $blogOwners->map('ID', 'Name')->toArray());
|
||||
$owners->setEmptyString('(None)');
|
||||
$owners->setHasEmptyDefault(true);
|
||||
|
||||
$fields->addFieldToTab('Root.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks'), "Content");
|
||||
$fields->addFieldToTab('Root.Main', new DropdownField('OwnerID', 'Blog owner', array_merge(array('' => "(None)"), $blogOwners->map('ID', 'Name')->toArray())), "Content");
|
||||
$fields->addFieldToTab('Root.Main', $owners, "Content");
|
||||
$fields->addFieldToTab('Root.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field'), "Content");
|
||||
$fields->addFieldToTab("Root.Main", new CheckboxField("ShowFullEntry", "Show Full Entry"), "Content");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user