Author: david
Date: 2008-09-29 10:25:22 -0700 (Mon, 29 Sep 2008)
New Revision: 1396
Modified:
trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
Log:
Fix indenting in informationobject/actions/updateAction.class.php.
Modified:
trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
===================================================================
--- trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
2008-09-29 17:06:10 UTC (rev 1395)
+++ trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
2008-09-29 17:25:22 UTC (rev 1396)
@@ -24,8 +24,9 @@
*
* @package qubit
* @subpackage informationObject
- * @author ?
- * @version SVN: $Id
+ * @author Peter Van Garderen <[EMAIL PROTECTED]>
+ * @author David Juhasz <[EMAIL PROTECTED]>
+ * @version SVN: $Id$
*/
class InformationObjectUpdateAction extends sfAction
{
@@ -300,34 +301,35 @@
}
public function updateObjectTermRelations($informationObject)
+ {
+ if ($this->getRequestParameter('subject_id'))
{
- if ($this->getRequestParameter('subject_id'))
- {
$informationObject->setTermRelation($this->getRequestParameter('subject_id'),
QubitTaxonomy::SUBJECT_ID);
$this->foreignKeyUpdate = true;
- }
+ }
if ($this->getRequestParameter('place_id'))
- {
+ {
$informationObject->setTermRelation($this->getRequestParameter('place_id'),
$relationTypeId = 337);
$this->foreignKeyUpdate = true;
- }
}
+ }
public function updateActorEvents($informationObject)
- {
+ {
$newCreationEvent = new QubitEvent;
+
//add creator
if ($this->getRequestParameter('actor_id'))
- {
+ {
$newCreationEvent->setActorId($this->getRequestParameter('actor_id'));
$newCreationEvent->setInformationObjectId($informationObject->getId());
$newCreationEvent->setActorRoleId(QubitTerm::CREATOR_ID);
$newCreationEvent->save();
$this->foreignKeyUpdate = true;
- }
+ }
else if ($this->getRequestParameter('newActorAuthorizedName'))
- {
+ {
$actor = new QubitActor;
$actor->setAuthorizedFormOfName($this->getRequestParameter('newActorAuthorizedName'));
$actor->save();
@@ -336,36 +338,36 @@
$newCreationEvent->setActorRoleId(QubitTerm::CREATOR_ID);
$newCreationEvent->save();
$this->foreignKeyUpdate = true;
- }
+ }
//add creation event date/date range
if (($this->getRequestParameter('creationYear')) or
($this->getRequestParameter('newCreationDateNote')))
- {
+ {
$newCreationEvent->setTypeId(QubitTerm::CREATION_ID);
$newCreationEvent->setInformationObjectId($informationObject->getId());
$newCreationEvent->setStartDate($this->getRequestParameter('creationYear').'-01-01');
$newCreationEvent->setEndDate($this->getRequestParameter('endYear').'-01-01');
if ($this->getRequestParameter('newCreationDateNote'))
- {
+ {
$newCreationEvent->setDescription($this->getRequestParameter('newCreationDateNote'));
- }
+ }
else
- {
+ {
$dateString = $this->getRequestParameter('creationYear');
if ($this->getRequestParameter('endYear'))
- {
+ {
$dateString .= ' - '.$this->getRequestParameter('endYear');
- }
+ }
$newCreationEvent->setDescription($dateString);
- }
+ }
$newCreationEvent->save();
$this->foreignKeyUpdate = true;
- }
+ }
if ($this->getRequestParameter('name_id'))
- {
+ {
$newNameAccessPoint = new QubitEvent;
$newNameAccessPoint->setActorId($this->getRequestParameter('name_id'));
$newNameAccessPoint->setActorRoleId(QubitTerm::SUBJECT_ID);
@@ -373,8 +375,8 @@
$newNameAccessPoint->save();
$this->foreignKeyUpdate = true;
- }
}
+ }
/**
* Add a new digital object to $informationObject, upload a digital asset,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---