From ab88be37fe4ab8c52db7c8fac7b8369484052412 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 2 Oct 2007 05:17:35 +0000 Subject: [PATCH] Gallery Module Update (merged from trunk, r42474) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42939 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/AssetTableField.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/AssetTableField.php b/code/AssetTableField.php index 5870dab0..578793a3 100755 --- a/code/AssetTableField.php +++ b/code/AssetTableField.php @@ -93,13 +93,15 @@ class AssetTableField extends ComplexTableField { 'Main' ); - $detailFormFields->addFieldToTab("BottomRoot", - new Tab("Gallery Options", - new TextField( "Content", "Caption" ) - ) - ); + if(class_exists('GalleryFile')) { + $detailFormFields->addFieldToTab("BottomRoot", + new Tab("Gallery Options", + new TextField( "Content", "Caption" ) + ) + ); + } } - else { + else if (class_exists('GalleryFile')) { if( $childData->Extension == 'swf' ) { $detailFormFields->addFieldToTab("BottomRoot", new Tab("Gallery Options",