mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 14:18:46 +02:00
BUGFIX: Access tab - include 'inherit' in the option lists on top level pages if that is the current value. Otherwise you try and save a null which MySQL can cope with but stricter databases can't.
BUGFIX: Fixed posgresql syntax for tree-sort publishing. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66794 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1ad0bfb165
commit
d76638249e
@ -1206,14 +1206,14 @@ class SiteTree extends DataObject {
|
||||
);
|
||||
|
||||
$viewersOptionsSource = array();
|
||||
if($this->Parent()->ID) $viewersOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||
if($this->Parent()->ID || $this->CanViewType == 'Inherit') $viewersOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||
$viewersOptionsSource["Anyone"] = _t('SiteTree.ACCESSANYONE', "Anyone");
|
||||
$viewersOptionsSource["LoggedInUsers"] = _t('SiteTree.ACCESSLOGGEDIN', "Logged-in users");
|
||||
$viewersOptionsSource["OnlyTheseUsers"] = _t('SiteTree.ACCESSONLYTHESE', "Only these people (choose from list)");
|
||||
$viewersOptionsField->setSource($viewersOptionsSource);
|
||||
|
||||
$editorsOptionsSource = array();
|
||||
if($this->Parent()->ID) $editorsOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||
if($this->Parent()->ID || $this->CanEditType == 'Inherit') $editorsOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||
$editorsOptionsSource["LoggedInUsers"] = _t('SiteTree.EDITANYONE', "Anyone who can log-in to the CMS");
|
||||
$editorsOptionsSource["OnlyTheseUsers"] = _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)");
|
||||
$editorsOptionsField->setSource($editorsOptionsSource);
|
||||
@ -1329,8 +1329,8 @@ class SiteTree extends DataObject {
|
||||
} else {
|
||||
// More ANSI-compliant syntax
|
||||
DB::query("UPDATE \"SiteTree_Live\"
|
||||
FROM \"SiteTree\"
|
||||
SET \"Sort\" = \"SiteTree\".\"Sort\"
|
||||
FROM \"SiteTree\"
|
||||
WHERE \"SiteTree_Live\".\"ID\" = \"SiteTree\".\"ID\"
|
||||
AND \"SiteTree_Live\".\"ParentID\" = " . sprintf('%d', $this->ParentID) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user