mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: Prevent image search queries all images in the site initially when the page is loaded
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@106194 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
53646b3187
commit
3877eae035
@ -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 .= '</ul>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if($folder) {
|
||||
$result = '<h2>' . _t('ThumbnailStripField.NOFOLDERIMAGESFOUND', 'No images found in') . ' ' . $folder->Title . '</h2>';
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user