Author: peter
Date: Thu Sep 24 10:33:43 2009
New Revision: 3495

Log:
rename to use correct OAI terminology for OAI repository functionality (i.e. 
making Qubit information available to other OAI harvesters)

Added:
   trunk/lib/form/SettingsOaiRepositoryForm.class.php   (contents, props 
changed)
      - copied, changed from r3493, 
trunk/lib/form/SettingsOaiHarvestingForm.class.php
Deleted:
   trunk/lib/form/SettingsOaiHarvestingForm.class.php
Modified:
   trunk/apps/qubit/modules/settings/actions/listAction.class.php
   trunk/apps/qubit/modules/settings/templates/listSuccess.php

Modified: trunk/apps/qubit/modules/settings/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/settings/actions/listAction.class.php      Thu Sep 
24 10:33:37 2009        (r3494)
+++ trunk/apps/qubit/modules/settings/actions/listAction.class.php      Thu Sep 
24 10:33:43 2009        (r3495)
@@ -61,7 +61,7 @@
     $this->defaultTemplateForm = new SettingsDefaultTemplateForm;
     $this->uiLabelForm = new SettingsGenericForm(array(), array(
       'settings' => QubitSetting::getByScope('ui_label'), 'scope'=>'ui_label', 
'fieldsRequired' => false));
-    $this->oaiHarvestingForm = new SettingsOaiHarvestingForm;
+    $this->oaiRepositoryForm = new SettingsOaiRepositoryForm;
 
     // Handle POST data (form submit)
     if ($request->isMethod('post'))
@@ -121,14 +121,14 @@
         }
       }
 
-      // Handle OAI Harvesting form submission
-      if (null !== $request->getParameter('oai_harvesting'))
+      // Handle OAI Repository form submission
+      if (null !== $request->getParameter('oai_repository'))
       {
-        
$this->oaiHarvestingForm->bind($request->getParameter('oai_harvesting'));
-        if ($this->oaiHarvestingForm->isValid())
+        
$this->oaiRepositoryForm->bind($request->getParameter('oai_repository'));
+        if ($this->oaiRepositoryForm->isValid())
         {
           // Do update and redirect to avoid repeat submit wackiness
-          $this->updateOaiHarvestingSettings($this->oaiHarvestingForm);
+          $this->updateOaiRepositorySettings($this->oaiRepositoryForm);
           $this->redirect('settings/list');
         }
       }
@@ -139,7 +139,7 @@
     $this->populateSiteInformationForm();
     $this->populateDefaultTemplateForm($this->defaultTemplateForm);
     $this->populateUiLabelForm($this->uiLabelForm);
-    $this->populateOaiHarvestingForm($this->oaiHarvestingForm);
+    $this->populateOaiRepositoryForm($this->oaiRepositoryForm);
 
     // Last symfony 1.0 forms holdout
     $this->i18nLanguages = QubitSetting::getByScope('i18n_languages');
@@ -382,11 +382,11 @@
   }
 
   /**
-   * Populate the OAI Harvesting form with database values (non-localized)
+   * Populate the OAI Repository form with database values (non-localized)
    */
-  protected function populateOaiHarvestingForm()
+  protected function populateOaiRepositoryForm()
   {
-    // Get OAI Harvesting settings
+    // Get OAI Repository settings
     $oaiEnabled = QubitSetting::getSettingByName('oai_enabled');
     $oaiRepositoryCode = QubitSetting::getSettingByName('oai_repository_code');
     $oaiRepositoryIdentifier = QubitOai::getRepositoryIdentifier();
@@ -394,7 +394,7 @@
     $resumptionTokenLimit = 
QubitSetting::getSettingByName('resumption_token_limit');
 
     // Set defaults for global form
-    $this->oaiHarvestingForm->setDefaults(array(
+    $this->oaiRepositoryForm->setDefaults(array(
       'oai_enabled' => (isset($oaiEnabled)) ? 
intval($oaiEnabled->getValue(array('sourceCulture'=>true))) : 1,
       'oai_repository_code' => (isset($oaiRepositoryCode)) ? 
$oaiRepositoryCode->getValue(array('sourceCulture'=>true)) : null,
       'oai_repository_identifier' => $oaiRepositoryIdentifier,
@@ -404,11 +404,11 @@
   }
 
   /**
-   * Update the OAI Harvesting settings in database (non-localized)
+   * Update the OAI Repository settings in database (non-localized)
    */
-  protected function updateOaiHarvestingSettings()
+  protected function updateOaiRepositorySettings()
   {
-    $thisForm = $this->oaiHarvestingForm;
+    $thisForm = $this->oaiRepositoryForm;
 
     // OAI enabled radio button
     if (null !== $oaiEnabledValue = $thisForm->getValue('oai_enabled'))

Modified: trunk/apps/qubit/modules/settings/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/settings/templates/listSuccess.php Thu Sep 24 
10:33:37 2009        (r3494)
+++ trunk/apps/qubit/modules/settings/templates/listSuccess.php Thu Sep 24 
10:33:43 2009        (r3495)
@@ -196,10 +196,10 @@
   </form>
 </fieldset>
 
-<!-- OAI Harvesting settings -->
-<div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('OAI 
harvesting') ?></div>
+<!-- OAI Repository settings -->
+<div class="tableHeader" style="margin-bottom: 10px;"><?php echo __('OAI 
Repository') ?></div>
 <fieldset class="collapsible collapsed">
-  <legend><?php echo __('OAI harvesting') ?></legend>
+  <legend><?php echo __('OAI Repository') ?></legend>
   <form action="<?php echo url_for('settings/list') ?>" method="POST">
   <table class="list">
   <thead>
@@ -209,7 +209,7 @@
     </tr>
   </thead>
   <tbody>
-    <?php echo $oaiHarvestingForm ?>
+    <?php echo $oaiRepositoryForm ?>
     <tr>
       <td>&nbsp;</td>
       <td>

Copied and modified: trunk/lib/form/SettingsOaiRepositoryForm.class.php (from 
r3493, trunk/lib/form/SettingsOaiHarvestingForm.class.php)
==============================================================================
--- trunk/lib/form/SettingsOaiHarvestingForm.class.php  Thu Sep 24 09:53:58 
2009        (r3493, copy source)
+++ trunk/lib/form/SettingsOaiRepositoryForm.class.php  Thu Sep 24 10:33:43 
2009        (r3495)
@@ -27,7 +27,7 @@
  * @version    svn: $Id$
  * @author     Peter Van Garderen <[email protected]>
  */
-class SettingsOaiHarvestingForm extends sfForm
+class SettingsOaiRepositoryForm extends sfForm
 {
   protected static $resumptionTokenMinLimit = 10;
   protected static $resumptionTokenMaxLimit = 1000;
@@ -54,7 +54,7 @@
 
     // Add helper text
     $this->widgetSchema->setHelps(array(
-      'oai_enabled' => __('When set to &quot;yes&quot;, this system will 
respond to OAI harvesting requests'),
+      'oai_enabled' => __('When set to &quot;yes&quot;, this system will act 
as an OAI repository and respond to OAI harvesting requests'),
       'oai_repository_code' => __('add an alpha-numeric code to uniquely 
identify this particular OAI repository within its network domain to create a 
unique, OAI-compliant identifier, e.g. oai:foo.org:repositorycode_10001'),
       'oai_repository_identifier' => ('this is an auto-generated setting that 
produces an OAI compliant repository identifier, which includes the OAI 
repository code value if it is set'),
       'sample_oai_identifier' => ('this is an example of the auto-generated, 
OAI compliant identifier which is created for each item in this particular OAI 
repository'),
@@ -86,6 +86,6 @@
     $this->widgetSchema->setFormFormatterName('list');
 
     // Set wrapper text for OAI Harvesting form settings
-    $this->widgetSchema->setNameFormat('oai_harvesting[%s]');
+    $this->widgetSchema->setNameFormat('oai_repository[%s]');
   }
-}
\ No newline at end of file
+}

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