FIXED: Issue where viewing an archived version of a page caused invalid SQL to be generated. This would only occur with subclasses of Page.

This commit is contained in:
Damian Mooyman 2012-08-10 12:45:37 +12:00
parent 023721aaca
commit 22c5f3129c

View File

@ -154,7 +154,7 @@ class Versioned extends DataExtension {
$query->selectField(sprintf('"%s_versions"."%s"', $baseTable, 'RecordID'), "ID");
if($table != $baseTable) {
$query->addFrom(array($table => " AND \"{$table}_versions\".\"Version\" = \"{$baseTable}_versions\".\"Version\""));
$query->addWhere("\"{$table}_versions\".\"Version\" = \"{$baseTable}_versions\".\"Version\"");
}
}