Author: jablko
Date: Wed Sep 23 17:40:41 2009
New Revision: 3487

Log:
Update OAI identify response to use QubitObject::UPDATED_AT vs. 
QubitInformationObject::UPDATED_AT after revision 3379, fixes issue 978

Modified:
   trunk/apps/qubit/modules/oai/actions/identifyComponent.class.php
   trunk/lib/model/QubitInformationObject.php

Modified: trunk/apps/qubit/modules/oai/actions/identifyComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/oai/actions/identifyComponent.class.php    Wed Sep 
23 17:19:52 2009        (r3486)
+++ trunk/apps/qubit/modules/oai/actions/identifyComponent.class.php    Wed Sep 
23 17:40:41 2009        (r3487)
@@ -34,7 +34,9 @@
     $this->title = sfconfig::get('app_siteTitle');
     $this->description = sfconfig::get('app_siteDescription');
     $this->protocolVersion = '2.0';
-    $this->earliestDatestamp = QubitInformationObject::getMinUpdatedAt();
+
+    list ($this->earliestDatestamp) = Propel::getConnection()->query('SELECT 
MIN('.QubitObject::UPDATED_AT.') FROM '.QubitObject::TABLE_NAME)->fetch();
+
     $this->granularity = 'YYYY-MM-DDThh:mm:ssZ';
     $this->deletedRecord = 'no';
     $this->compression = 'gzip';

Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php  Wed Sep 23 17:19:52 2009        
(r3486)
+++ trunk/lib/model/QubitInformationObject.php  Wed Sep 23 17:40:41 2009        
(r3487)
@@ -383,22 +383,6 @@
     return QubitInformationObject::get($criteria);
   }
 
-  /**
-   * Get minimum updated_date in the information objects.
-   * @return date the minimum updated_date
-   */
-  public static function getMinUpdatedAt()
-  {
-    $connection = Propel::getConnection();
-    $query = 'SELECT MIN('.QubitInformationObject::UPDATED_AT.') AS MIN FROM 
'.QubitInformationObject::TABLE_NAME;
-
-    $statement = $connection->prepare($query);
-    $statement->execute();
-    $resultset = $statement->fetch();
-    $min = $resultset['MIN'];
-    return $min;
-  }
-
   public function setMaterialType($materialType)
   {
     // add the materialType to term list (assuming it's a new subject)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to