BUGFIX: If a CTF without a show action is made readonly, don't add the show action back. (from r88960)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89204 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 22:39:07 +00:00
parent 5ec83b9bd0
commit 96e449225e

View File

@ -530,7 +530,10 @@ JS
function performReadonlyTransformation() {
$clone = clone $this;
$clone->setShowPagination(false);
$clone->setPermissions(array('show'));
// Only include the show action if it was in the original CTF.
$clone->setPermissions(in_array('show', $this->permissions) ? array('show') : array());
$clone->addExtraClass( 'readonly' );
$clone->setReadonly(true);
return $clone;