Skip to content

Commit

Permalink
fixes #34 - applies Sam's query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moveforward committed Oct 3, 2013
1 parent fc07486 commit 7b11e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/extensions/FileSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function augmentSQL(SQLQuery &$query) {
$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 :-)
Expand Down

0 comments on commit 7b11e97

Please sign in to comment.