Author: mcantelon
Date: Thu Jan 12 11:33:47 2012
New Revision: 10657
Log:
Changed logic to allow rights creation for stuff copyrighted with no specific
copyright holder.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Thu Jan 12 11:17:20 2012
(r10656)
+++ trunk/lib/task/csvImportTask.class.php Thu Jan 12 11:33:47 2012
(r10657)
@@ -383,6 +383,7 @@
{
case 'under copyright':
print "Adding rights for ". $self->object->title ."...\n";
+ $rightsHolderId = FALSE;
if ($self->rowStatusVars['copyrightHolder'])
{
// add rightsholder
@@ -391,16 +392,17 @@
$actor->authorizedFormOfName =
$self->rowStatusVars['copyrightHolder'];
$actor->save();
- $self->createRightAndRelation(array(
- 'rightsHolderId' => $actor->id,
- 'restriction' => 1,
- 'basisId' => 170,
- 'actId' => 305,
- 'copyrightStatusId' => 306
- ));
- } else {
- $this->logError('Copyright holder not specified.');
+ $rightsHolderId = $actor->id;
+
}
+ $rightAndRelation = array(
+ 'restriction' => 1,
+ 'basisId' => 170,
+ 'actId' => 305,
+ 'copyrightStatusId' => 306
+ );
+ if ($rightsHolderId) $rightAndRelation['rightsHolderId'] =
$rightsHolderId;
+ $self->createRightAndRelation($rightAndRelation);
break;
case 'unknown':
--
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.