Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG: Replaced extendedSQL with DataList as per ticket 8183

  • Loading branch information...
commit 81cd0e6e042f65656969c8a36cf64eb421b016c3 1 parent 317977a
kmayo-ss kmayo-ss authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/model/SiteTreeFolderExtension.php
4 code/model/SiteTreeFolderExtension.php
View
@@ -19,14 +19,14 @@ public function getUnusedFilesListFilter() {
}
foreach($classes as $className) {
- $query = singleton($className)->extendedSQL();
+ $query = new DataQuery($className);
$ids = $query->execute()->column();
if(!count($ids)) continue;
foreach(singleton($className)->has_one() as $relName => $joinClass) {
if($joinClass == 'Image' || $joinClass == 'File') {
$fieldName = $relName .'ID';
- $query = singleton($className)->extendedSQL("$fieldName > 0");
+ $query = DataList::create($className)->where("$fieldName > 0");
$query->distinct = true;
$query->select(array($fieldName));
$usedFiles = array_merge($usedFiles, $query->execute()->column());
Please sign in to comment.
Something went wrong with that request. Please try again.