From 22a407927764cfa91e57a36331270eccdae8a5c7 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 7 Nov 2008 03:04:28 +0000 Subject: [PATCH] MINOR Tidied up ThumbnailStripField->getflash() formatting git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65445 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ThumbnailStripField.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php index b823ba29..3984398b 100755 --- a/code/ThumbnailStripField.php +++ b/code/ThumbnailStripField.php @@ -43,7 +43,6 @@ class ThumbnailStripField extends FormField { $folder = DataObject::get_by_id('Folder', (int) $_GET['folderID']); if(!$folder) return _t('ThumbnailStripField.NOTAFOLDER', 'This is not a folder'); - $folderList = $folder->getDescendantIDList("Folder"); array_unshift($folderList, $folder->ID); @@ -84,13 +83,11 @@ class ThumbnailStripField extends FormField { } function getflash() { - - $folder = DataObject::get_by_id("Folder", $_GET['folderID']); + $folder = DataObject::get_by_id("Folder", (int) $_GET['folderID']); - if( !$folder ) - return _t('ThumbnailStripField.NOTAFOLDER'); + if(!$folder) return _t('ThumbnailStripField.NOTAFOLDER', 'This is not a folder'); - $folderList = $folder->getDescendantIDList("Folder"); + $folderList = $folder->getDescendantIDList('Folder'); array_unshift($folderList, $folder->ID); $width = Image::$strip_thumbnail_width - 10; @@ -101,15 +98,6 @@ class ThumbnailStripField extends FormField { if($flashObjects) { $result .= '