Author: fortim
Date: Mon Sep 28 07:00:19 2009
New Revision: 3564
Log:
Updated ListIdentifiers to filter out draft records
Modified:
trunk/apps/qubit/modules/oai/actions/listIdentifiersComponent.class.php
trunk/apps/qubit/modules/oai/templates/_listIdentifiers.xml.php
Modified:
trunk/apps/qubit/modules/oai/actions/listIdentifiersComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/oai/actions/listIdentifiersComponent.class.php
Mon Sep 28 05:12:46 2009 (r3563)
+++ trunk/apps/qubit/modules/oai/actions/listIdentifiersComponent.class.php
Mon Sep 28 07:00:19 2009 (r3564)
@@ -70,7 +70,15 @@
//Get the records according to the limit dates and collection
$this->records = QubitInformationObject::getUpdatedRecords($this->from,
$this->until, $collection);
- $this->recordsCount = count($this->records);
+ $this->publishedRecords = array();
+ foreach ($this->records as $record)
+ {
+ if ($record->getPublicationStatus()->statusId ==
QubitTerm::PUBLICATION_STATUS_PUBLISHED_ID)
+ {
+ $this->publishedRecords[] = $record;
+ }
+ }
+ $this->recordsCount = count($this->publishedRecords);
$this->path = $request->getUriPrefix().$request->getPathInfo();
$this->attributesKeys = array_keys($this->attributes);
Modified: trunk/apps/qubit/modules/oai/templates/_listIdentifiers.xml.php
==============================================================================
--- trunk/apps/qubit/modules/oai/templates/_listIdentifiers.xml.php Mon Sep
28 05:12:46 2009 (r3563)
+++ trunk/apps/qubit/modules/oai/templates/_listIdentifiers.xml.php Mon Sep
28 07:00:19 2009 (r3564)
@@ -2,7 +2,7 @@
<error code="noRecordsMatch">The combination of the values of the from,
until, set and metadataPrefix arguments results in an empty list.</error>
<?php else:?>
<ListIdentifiers>
-<?php foreach($records as $record):?>
+<?php foreach($publishedRecords as $record):?>
<header>
<identifier><?php echo $record->getOaiIdentifier() ?></identifier>
<datestamp><?php echo
QubitOai::getDate($record->getUpdatedAt())?></datestamp>
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---