Author: jablko
Date: Thu Oct 28 15:48:19 2010
New Revision: 8638
Log:
Inherit repository and creators from closest ancestor, fixes issue 1734
Modified:
trunk/apps/qubit/modules/informationobject/actions/creatorComponent.class.php
trunk/apps/qubit/modules/informationobject/actions/creatorDetailComponent.class.php
trunk/lib/helper/QubitHelper.php
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/indexAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/creatorComponent.class.php
==============================================================================
---
trunk/apps/qubit/modules/informationobject/actions/creatorComponent.class.php
Thu Oct 28 15:47:57 2010 (r8637)
+++
trunk/apps/qubit/modules/informationobject/actions/creatorComponent.class.php
Thu Oct 28 15:48:19 2010 (r8638)
@@ -21,7 +21,7 @@
{
public function execute($request)
{
- foreach ($this->resource->ancestors->andSelf() as $this->ancestor)
+ foreach ($this->resource->ancestors->andSelf()->orderBy('rgt') as
$this->ancestor)
{
if (0 < count($this->ancestor->getCreators()))
{
Modified:
trunk/apps/qubit/modules/informationobject/actions/creatorDetailComponent.class.php
==============================================================================
---
trunk/apps/qubit/modules/informationobject/actions/creatorDetailComponent.class.php
Thu Oct 28 15:47:57 2010 (r8637)
+++
trunk/apps/qubit/modules/informationobject/actions/creatorDetailComponent.class.php
Thu Oct 28 15:48:19 2010 (r8638)
@@ -21,7 +21,7 @@
{
public function execute($request)
{
- foreach ($this->resource->ancestors->andSelf() as $this->ancestor)
+ foreach ($this->resource->ancestors->andSelf()->orderBy('rgt') as
$this->ancestor)
{
if (0 < count($this->ancestor->getCreators()))
{
Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php Thu Oct 28 15:47:57 2010 (r8637)
+++ trunk/lib/helper/QubitHelper.php Thu Oct 28 15:48:19 2010 (r8638)
@@ -90,7 +90,7 @@
return render_show($label, link_to(render_title($resource->repository),
array($resource->repository, 'module' => 'repository')));
}
- foreach ($resource->ancestors as $item)
+ foreach ($resource->ancestors->orderBy('rgt') as $item)
{
if (isset($item->repository))
{
Modified:
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/indexAction.class.php
==============================================================================
---
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/indexAction.class.php
Thu Oct 28 15:47:57 2010 (r8637)
+++
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/indexAction.class.php
Thu Oct 28 15:48:19 2010 (r8638)
@@ -57,7 +57,7 @@
'required' => true), array(
'required' => $this->context->i18n->__('This archival description, or
one of its higher levels, %1%requires%2% at least one %3%creator%4%.',
array('%1%' => '<a href="http://ica-atom.org/doc/RS-1#I.12">', '%2%' => '</a>',
'%3%' => '<a href="http://ica-atom.org/doc/RS-1#3.2.1">', '%4%' => '</a>'))));
- foreach ($this->resource->ancestors->andSelf() as $item)
+ foreach ($this->resource->ancestors->andSelf()->orderBy('rgt') as $item)
{
$values['creators'] = $item->getCreators();
if (0 < count($values['creators']))
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.