FIX Ensure document set IDs are cast to integers

This commit is contained in:
Robbie Averill 2017-12-06 13:37:13 +13:00 committed by GitHub
parent 45092dfb16
commit 854d1f9150
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( return Controller::join_links(
$modelAdmin->Link('DMSDocumentSet'), $modelAdmin->Link('DMSDocumentSet'),
'EditForm/field/DMSDocumentSet/item', 'EditForm/field/DMSDocumentSet/item',
$this->getRequest()->getVar('dsid'), (int) $this->getRequest()->getVar('dsid'),
'edit' 'edit'
); );
} }
return $modelAdmin->Link(); 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( return Controller::join_links(
CMSPageEditController::singleton()->getEditForm($pageId)->FormAction(), CMSPageEditController::singleton()->getEditForm($pageId)->FormAction(),
'field/Document Sets/item', 'field/Document Sets/item',
$documentSetId (int) $documentSetId
); );
} }