MINOR Merged in Versioned::get_all_versions() fix from r76223

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@92161 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-11-19 01:57:33 +00:00 committed by Sam Minnee
parent 727f930e31
commit 24cead4d33

View File

@ -707,7 +707,7 @@ class Versioned extends DataObjectDecorator {
if(!$className) {
Debug::show($query->sql());
Debug::show($record);
user_error("Versioned::get_version: Couldn't get $class.$id, version $version", E_USER_ERROR);
user_error("Versioned::get_version: Couldn't get $class.$id", E_USER_ERROR);
}
Versioned::$reading_stage = $oldStage;
@ -771,7 +771,7 @@ class Versioned extends DataObjectDecorator {
$baseTable = ClassInfo::baseDataClass($class);
$query = singleton($class)->buildVersionSQL("`{$baseTable}`.RecordID = $id AND `{$baseTable}`.Version = $version");
$record = $query->execute()->record();
$className = $record[ClassName];
$className = $record['ClassName'];
if(!$className) {
Debug::show($query->sql());
Debug::show($record);