fixes #34 - applies Sam's query fix

This commit is contained in:
Paul Bennett 2013-10-03 15:25:01 +13:00
parent fc07486f9b
commit 7b11e979fa

View File

@ -61,7 +61,7 @@ class FileSubsites extends DataExtension {
$from = $query->getFrom();
$where = $query->getWhere();
if(!isset($from['SiteTree_ImageTracking']) && !($where && preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $where[0]))) {
if(!isset($from['SiteTree_ImageTracking']) && !($where && preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', implode(' ', $where))) {
$subsiteID = (int) Subsite::currentSubsiteID();
// The foreach is an ugly way of getting the first key :-)