mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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(
|
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'),
|
//"TitleSearchFields" => Array('type'=>'fulltext', 'value'=>'Title'),
|
||||||
//"ContentSearchFields" => Array('type'=>'fulltext', 'value'=>'Content'),
|
//"ContentSearchFields" => Array('type'=>'fulltext', 'value'=>'Content'),
|
||||||
"URLSegment" => true,
|
"URLSegment" => true,
|
||||||
@ -918,9 +918,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
|
|
||||||
foreach(array('Stage', 'Live') as $stage) {
|
foreach(array('Stage', 'Live') as $stage) {
|
||||||
// Get the uninherited permissions
|
// Get the uninherited permissions
|
||||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(CanEditType = 'LoggedInUsers' OR
|
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR
|
||||||
(CanEditType = 'OnlyTheseUsers' AND \"SiteTree_EditorGroups\".SiteTreeID IS NOT NULL))
|
(\"CanEditType\" = 'OnlyTheseUsers' AND \"SiteTree_EditorGroups\".\"SiteTreeID\" IS NOT NULL))
|
||||||
AND \"SiteTree\".ID IN ($SQL_idList)",
|
AND \"SiteTree\".\"ID\" IN ($SQL_idList)",
|
||||||
"",
|
"",
|
||||||
"LEFT JOIN \"SiteTree_EditorGroups\"
|
"LEFT JOIN \"SiteTree_EditorGroups\"
|
||||||
ON \"SiteTree_EditorGroups\".\"SiteTreeID\" = \"SiteTree\".\"ID\"
|
ON \"SiteTree_EditorGroups\".\"SiteTreeID\" = \"SiteTree\".\"ID\"
|
||||||
@ -932,8 +932,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get permissions that are inherited
|
// Get permissions that are inherited
|
||||||
$potentiallyInherited = Versioned::get_by_stage("SiteTree", $stage, "CanEditType = 'Inherit'
|
$potentiallyInherited = Versioned::get_by_stage("SiteTree", $stage, "\"CanEditType\" = 'Inherit'
|
||||||
AND \"SiteTree\".ID IN ($SQL_idList)");
|
AND \"SiteTree\".\"ID\" IN ($SQL_idList)");
|
||||||
|
|
||||||
if($potentiallyInherited) {
|
if($potentiallyInherited) {
|
||||||
// Group $potentiallyInherited by ParentID; we'll look at the permission of all those
|
// 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);
|
$idList = implode(",", $editableIDs);
|
||||||
|
|
||||||
// You can only delete pages whose children you can delete
|
// 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) {
|
if($childRecords) {
|
||||||
$children = $childRecords->map("ID", "ParentID");
|
$children = $childRecords->map("ID", "ParentID");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user