mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
BUGFIX: Fixed issue caused by HTMLEditorField selecting the column FieldName
BUGFIX: Fixed issue caused by ManyManyList remove all removing the File table from the FROM statement when removing all records from SiteTree_ImageTracking for a given page
This commit is contained in:
parent
2ef72b374c
commit
0cec9a6f33
@ -45,7 +45,8 @@ class FileSubsites extends DataExtension {
|
||||
*/
|
||||
function augmentSQL(SQLQuery &$query) {
|
||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
||||
if(!$query->where || !preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0])) {
|
||||
//@TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and ManyManyList::removeAll() changing the from table after this function is called there isn't much of a choice
|
||||
if(!array_key_exists('SiteTree_ImageTracking', $query->from) && (!$query->where || !preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0]))) {
|
||||
/*if($context = DataObject::context_obj()) $subsiteID = (int) $context->SubsiteID;
|
||||
else */$subsiteID = (int) Subsite::currentSubsiteID();
|
||||
|
||||
|
@ -41,7 +41,10 @@ class SiteTreeSubsites extends DataExtension {
|
||||
),
|
||||
'belongs_many_many' => array(
|
||||
'BackCrossSubsiteLinkTracking' => 'SiteTree'
|
||||
)
|
||||
),
|
||||
'many_many_extraFields' => array(
|
||||
"CrossSubsiteLinkTracking" => array("FieldName" => "Varchar")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user