mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
ENHANCEMENT: Prevent image search queries all images in the site initially when the page is loaded (from r106194)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112577 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e3e8c716a3
commit
6f41e77e51
@ -87,6 +87,9 @@ class ThumbnailStripField extends FormField {
|
|||||||
$whereSQL = "\"ParentID\" = 0";
|
$whereSQL = "\"ParentID\" = 0";
|
||||||
} else {
|
} else {
|
||||||
$whereSQL = '';
|
$whereSQL = '';
|
||||||
|
|
||||||
|
// Prevent image search queries all images in the site initially when the page is loaded
|
||||||
|
if(empty($searchText)) $whereSQL = "\"ParentID\" = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($searchText) {
|
if($searchText) {
|
||||||
@ -125,7 +128,8 @@ class ThumbnailStripField extends FormField {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result .= '</ul>';
|
$result .= '</ul>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if($folder) {
|
if($folder) {
|
||||||
$result = '<h2>' . _t('ThumbnailStripField.NOFOLDERIMAGESFOUND', 'No images found in') . ' ' . $folder->Title . '</h2>';
|
$result = '<h2>' . _t('ThumbnailStripField.NOFOLDERIMAGESFOUND', 'No images found in') . ' ' . $folder->Title . '</h2>';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user