Merge pull request #200 from silverstripe/pulls/2.0/cast-dsid-as-ints

FIX Ensure document set IDs are cast to integers
This commit is contained in:
Dylan Wagstaff 2017-12-06 13:48:46 +13:00 committed by GitHub
commit b7aaadf7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,14 +190,14 @@ class DMSDocumentAddController extends LeftAndMain
return Controller::join_links(
$modelAdmin->Link('DMSDocumentSet'),
'EditForm/field/DMSDocumentSet/item',
$this->getRequest()->getVar('dsid'),
(int) $this->getRequest()->getVar('dsid'),
'edit'
);
}
return $modelAdmin->Link();
}
return $this->getPageEditLink($this->currentPageID(), $this->getRequest()->getVar('dsid'));
return $this->getPageEditLink($this->currentPageID(), (int) $this->getRequest()->getVar('dsid'));
}
/**
@ -212,7 +212,7 @@ class DMSDocumentAddController extends LeftAndMain
return Controller::join_links(
CMSPageEditController::singleton()->getEditForm($pageId)->FormAction(),
'field/Document Sets/item',
$documentSetId
(int) $documentSetId
);
}