diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php index 97141e7e..4bf98e48 100755 --- a/code/ThumbnailStripField.php +++ b/code/ThumbnailStripField.php @@ -84,6 +84,9 @@ class ThumbnailStripField extends FormField { $whereSQL = "\"ParentID\" = 0"; } else { $whereSQL = ''; + + // Prevent image search queries all images in the site initially when the page is loaded + if(empty($searchText)) $whereSQL = "\"ParentID\" = 0"; } if($searchText) { @@ -122,7 +125,8 @@ class ThumbnailStripField extends FormField { } } $result .= ''; - } else { + } + else { if($folder) { $result = '

' . _t('ThumbnailStripField.NOFOLDERIMAGESFOUND', 'No images found in') . ' ' . $folder->Title . '

'; } else {