mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR FIX: column names quoted properly, full text search column now named
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86168 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
384389e079
commit
664aaacb21
@ -85,7 +85,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
);
|
||||
|
||||
static $indexes = array(
|
||||
"SearchFields" => Array('type'=>'fulltext', 'value'=>'Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords'),
|
||||
"SearchFields" => Array('type'=>'fulltext', 'name'=>'SearchFields', 'value'=>'Title, MenuTitle, Content, MetaTitle, MetaDescription, MetaKeywords'),
|
||||
//"TitleSearchFields" => Array('type'=>'fulltext', 'value'=>'Title'),
|
||||
//"ContentSearchFields" => Array('type'=>'fulltext', 'value'=>'Content'),
|
||||
"URLSegment" => true,
|
||||
@ -918,9 +918,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
|
||||
foreach(array('Stage', 'Live') as $stage) {
|
||||
// Get the uninherited permissions
|
||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(CanEditType = 'LoggedInUsers' OR
|
||||
(CanEditType = 'OnlyTheseUsers' AND \"SiteTree_EditorGroups\".SiteTreeID IS NOT NULL))
|
||||
AND \"SiteTree\".ID IN ($SQL_idList)",
|
||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR
|
||||
(\"CanEditType\" = 'OnlyTheseUsers' AND \"SiteTree_EditorGroups\".\"SiteTreeID\" IS NOT NULL))
|
||||
AND \"SiteTree\".\"ID\" IN ($SQL_idList)",
|
||||
"",
|
||||
"LEFT JOIN \"SiteTree_EditorGroups\"
|
||||
ON \"SiteTree_EditorGroups\".\"SiteTreeID\" = \"SiteTree\".\"ID\"
|
||||
@ -932,8 +932,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
}
|
||||
|
||||
// Get permissions that are inherited
|
||||
$potentiallyInherited = Versioned::get_by_stage("SiteTree", $stage, "CanEditType = 'Inherit'
|
||||
AND \"SiteTree\".ID IN ($SQL_idList)");
|
||||
$potentiallyInherited = Versioned::get_by_stage("SiteTree", $stage, "\"CanEditType\" = 'Inherit'
|
||||
AND \"SiteTree\".\"ID\" IN ($SQL_idList)");
|
||||
|
||||
if($potentiallyInherited) {
|
||||
// Group $potentiallyInherited by ParentID; we'll look at the permission of all those
|
||||
@ -1007,7 +1007,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$idList = implode(",", $editableIDs);
|
||||
|
||||
// You can only delete pages whose children you can delete
|
||||
$childRecords = DataObject::get("SiteTree", "ParentID IN ($idList)");
|
||||
$childRecords = DataObject::get("SiteTree", "\"ParentID\" IN ($idList)");
|
||||
if($childRecords) {
|
||||
$children = $childRecords->map("ID", "ParentID");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user