BUGFIX: Ameneded r84151 so that the application order of extensions is the same as it was previously.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84155 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-08-11 05:27:30 +00:00
parent d5cf940d69
commit 60fde4ad54

View File

@ -418,7 +418,9 @@ abstract class Object {
// merge with existing static vars // merge with existing static vars
$extensions = self::uninherited_static($class, 'extensions'); $extensions = self::uninherited_static($class, 'extensions');
$extensions[] = $extension; // We use unshift rather than push so that module extensions are added before built-in ones.
// in particular, this ensures that the Versioned rewriting is done last.
array_unshift($extensions, $extension);
self::set_static($class, 'extensions', $extensions); self::set_static($class, 'extensions', $extensions);
// load statics now for DataObject classes // load statics now for DataObject classes