Merged revisions 45654 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.1.0-rc3oriwave2

........
  r45654 | sminnee | 2007-11-26 17:00:26 +1300 (Mon, 26 Nov 2007) | 2 lines
  
  Redirect to legislation section when there are only legislation pages
  Allow selection of folder when inserting files / images
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49788 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-02-19 00:36:26 +00:00
parent 2a5314685a
commit 84d1d57df5
3 changed files with 4 additions and 4 deletions

View File

@ -403,7 +403,7 @@ class Object {
* *
* @return DataObjectDecorator The instance of the extension * @return DataObjectDecorator The instance of the extension
*/ */
public function getExtension($name) { public function extInstance($name) {
return $this->extension_instances[$name]; return $this->extension_instances[$name];
} }

View File

@ -335,7 +335,7 @@ class Hierarchy extends DataObjectDecorator {
continue; continue;
} }
$idList[] = $child->ID; $idList[] = $child->ID;
$child->getExtension('Hierarchy')->loadDescendantIDListInto($idList); $child->extInstance('Hierarchy')->loadDescendantIDListInto($idList);
} }
} }
} }

View File

@ -159,7 +159,7 @@ class Versioned extends DataObjectDecorator {
if($this->owner->parentClass() == "DataObject") { if($this->owner->parentClass() == "DataObject") {
$rootTable = true; $rootTable = true;
} }
if ($suffix && ($ext = $this->owner->getExtension($allSuffixes[$suffix]))) { if ($suffix && ($ext = $this->owner->extInstance($allSuffixes[$suffix]))) {
if (!$ext->isVersionedTable($table)) continue; if (!$ext->isVersionedTable($table)) continue;
$fields = $ext->fieldsInExtraTables($suffix); $fields = $ext->fieldsInExtraTables($suffix);
$indexes = $fields['indexes']; $indexes = $fields['indexes'];
@ -345,7 +345,7 @@ class Versioned extends DataObjectDecorator {
function extendWithSuffix($table) { function extendWithSuffix($table) {
foreach (Versioned::$versionableExtensions as $versionableExtension => $suffixes) { foreach (Versioned::$versionableExtensions as $versionableExtension => $suffixes) {
if ($this->owner->hasExtension($versionableExtension)) { if ($this->owner->hasExtension($versionableExtension)) {
$table = $this->owner->getExtension($versionableExtension)->extendWithSuffix($table); $table = $this->owner->extInstance($versionableExtension)->extendWithSuffix($table);
} }
} }
return $table; return $table;