Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php |
— | — | @@ -1051,7 +1051,8 @@ |
1052 | 1052 | global $smwgIQSubcategoryInclusions; |
1053 | 1053 | if ($smwgIQSubcategoryInclusions > 0) { |
1054 | 1054 | $ct = $this->getCategoryTable($description->getCategory()->getDBKey(), $db); |
1055 | | - $from .= " INNER JOIN $ct ON $ct.cat_name=" . $curtables['CATS'] . '.cl_to'; |
| 1055 | + $from = '`' . $ct . '`, ' . $from; |
| 1056 | + $where = "$ct.cat_name=" . $curtables['CATS'] . '.cl_to'; |
1056 | 1057 | } else { |
1057 | 1058 | $where .= $curtables['CATS'] . '.cl_to=' . $db->addQuotes($description->getCategory()->getDBKey()); |
1058 | 1059 | } |