Author: jablko
Date: Tue Aug 11 17:28:59 2009
New Revision: 3014
Log:
Drop more no longer used sections of code
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
trunk/apps/qubit/modules/informationobject/actions/editDcAction.class.php
trunk/apps/qubit/modules/informationobject/actions/editRadAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Aug 11 17:03:51 2009 (r3013)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Tue Aug 11 17:28:59 2009 (r3014)
@@ -180,12 +180,6 @@
$request->setAttribute('informationObject', $this->informationObject);
- $this->warnings = array();
-
- // Add javascript libraries to allow selecting multiple access points
- $this->getResponse()->addJavaScript('/vendor/jquery');
-
$this->getResponse()->addJavaScript('/sfDrupalPlugin/vendor/drupal/misc/drupal');
-
// Determine if user has edit priviliges
$this->editTaxonomyCredentials = false;
if (SecurityPriviliges::editCredentials($this->getUser(), 'term'))
@@ -198,12 +192,6 @@
$this->newEvent = new QubitEvent;
$this->creators = $this->informationObject->getCreators();
- //Properties
- $this->languageCodes = $this->informationObject->getProperties($name =
'information_object_language');
- $this->scriptCodes = $this->informationObject->getProperties($name =
'information_object_script');
- $this->descriptionLanguageCodes =
$this->informationObject->getProperties($name =
'language_of_information_object_description');
- $this->descriptionScriptCodes =
$this->informationObject->getProperties($name =
'script_of_information_object_description');
-
//Notes
$this->notes = $this->informationObject->getNotes();
$this->noteTypes =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::NOTE_TYPE_ID);
@@ -226,61 +214,15 @@
}
}
- // Material Type
- $this->newMaterialType = new QubitObjectTermRelation;
- $this->materialTypes = $this->informationObject->getMaterialTypes();
-
- // Count related digital objects for warning message when deleting info
object
- // Note: This should only be 0 or 1 digital objects.
- $this->digitalObjectCount = 0;
- if (null !== $digitalObject = $this->informationObject->getDigitalObject())
- {
- $this->digitalObjectCount = 1;
- }
-
- require_once
sfConfig::get('sf_symfony_lib_dir').'/plugins/sfCompat10Plugin/lib/request/sfRequestCompat10.class.php';
- $this->dispatcher->connect('request.method_not_found',
array('sfRequestCompat10', 'call'));
-
- // Check for file upload errors
- $uploadFiles = $this->getRequest()->getFileName('upload_file');
- $fileErrors = $this->getRequest()->getFileError('upload_file');
- if (count($uploadFiles))
- {
- foreach ($uploadFiles as $usageId => $filename)
- {
- if (strlen($filename) && $fileErrors[$usageId])
- {
- $uploadWarnings[] = 'The file "'.$filename.'" exceeded the maximum
upload size of '.ini_get('upload_max_filesize').'.';
- }
- }
-
- if (isset($uploadWarnings))
- {
- $this->warnings['upload_file'] = $uploadWarnings;
- }
- }
-
- if ($request->hasParameter('error'))
- {
- $this->error = $request->getParameter('error');
- }
-
if ($request->isMethod('post'))
{
$this->form->bind($request->getPostParameters());
if ($this->form->isValid())
{
- $this->hasWarning = false;
- $this->foreignKeyUpdate = false;
-
$this->processForm();
- // Redirect to show template on successful update
- if (!$this->hasWarning)
- {
- $this->redirect(array('module' => 'informationobject', 'action' =>
'show', 'id' => $this->informationObject->getId()));
- }
+ $this->redirect(array('module' => 'informationobject', 'action' =>
'show', 'id' => $this->informationObject->getId()));
}
}
}
@@ -321,8 +263,6 @@
}
// set the informationObject's attributes
- $this->informationObject->setId($this->getRequestParameter('id'));
- $this->updateInformationObjectAttributes();
$this->updateCollectionType();
$this->updateHierarchy();
@@ -334,9 +274,6 @@
// save informationObject after setting all of its attributes...
$this->informationObject->save();
- // save related object after saving information object to get id
- //$this->updateRecursiveRelations();
-
// delete related objects marked for deletion
$this->deleteNotes();
$this->deleteEvents();
@@ -414,7 +351,6 @@
if (intval($name_id))
{
$this->informationObject->addNameAccessPoint($name_id,
QubitTerm::SUBJECT_ID);
- $this->foreignKeyUpdate = true;
}
}
}
@@ -444,7 +380,6 @@
if (intval($place_id))
{
$this->informationObject->addTermRelation($place_id);
- $this->foreignKeyUpdate = true;
}
}
}
@@ -460,7 +395,6 @@
if (intval($material_type_id))
{
$this->informationObject->addTermRelation($material_type_id);
- $this->foreignKeyUpdate = true;
}
}
}
Modified:
trunk/apps/qubit/modules/informationobject/actions/editDcAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editDcAction.class.php
Tue Aug 11 17:03:51 2009 (r3013)
+++ trunk/apps/qubit/modules/informationobject/actions/editDcAction.class.php
Tue Aug 11 17:28:59 2009 (r3014)
@@ -87,7 +87,6 @@
// add Dublin Core specific commands
$this->dcEventTypes = QubitTerm::getDcEventTypeList();
- $this->dcRelation =
$this->informationObject->getPropertyByName('information_object_relation',
array('scope'=>'dc'));
}
protected function processField($field)
Modified:
trunk/apps/qubit/modules/informationobject/actions/editRadAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editRadAction.class.php
Tue Aug 11 17:03:51 2009 (r3013)
+++ trunk/apps/qubit/modules/informationobject/actions/editRadAction.class.php
Tue Aug 11 17:28:59 2009 (r3014)
@@ -148,31 +148,6 @@
$this->radTitleNotes =
$this->informationObject->getNotesByTaxonomy($options = array('taxonomyId' =>
QubitTaxonomy::RAD_TITLE_NOTE_ID));
$this->radTitleNoteTypes =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::RAD_TITLE_NOTE_ID);
$this->radNoteTypes =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::RAD_NOTE_ID);
-
- // Rad 1.1 properties
- $this->radOtherTitleInformation =
$this->informationObject->getPropertyByName('other_title_information',
array('scope'=>'rad'));
- $this->radTitleStatementOfResponsibility =
$this->informationObject->getPropertyByName('title_statement_of_responsibility',
array('scope'=>'rad'));
-
- // RAD 1.2 properties
- $this->radEditionStatementOfResponsibility =
$this->informationObject->getPropertyByName('edition_statement_of_responsibility',
array('scope'=>'rad'));
-
- // RAD 1.3 properties
- $this->radStatementOfScaleCartographic =
$this->informationObject->getPropertyByName('statement_of_scale_cartographic',
array('scope'=>'rad'));
- $this->radStatementOfProjection =
$this->informationObject->getPropertyByName('statement_of_projection',
array('scope'=>'rad'));
- $this->radStatementOfCoordinates =
$this->informationObject->getPropertyByName('statement_of_coordinates',
array('scope'=>'rad'));
- $this->radStatementOfScaleArchitectural =
$this->informationObject->getPropertyByName('statement_of_scale_architectural',
array('scope'=>'rad'));
- $this->radIssuingJursidictionAndDenomination =
$this->informationObject->getPropertyByName('issuing_jursidiction_and_denomination',
array('scope'=>'rad'));
-
- // RAD 1.6 properties
- $this->radTitleProperOfPublishersSeries =
$this->informationObject->getPropertyByName('title_proper_of_publishers_series',
array('scope'=>'rad'));
- $this->radParallelTitlesOfPublishersSeries =
$this->informationObject->getPropertyByName('parallel_titles_of_publishers_series',
array('scope'=>'rad'));
- $this->radOtherTitleInformationOfPublishersSeries =
$this->informationObject->getPropertyByName('other_title_information_of_publishers_series',
array('scope'=>'rad'));
- $this->radStatementOfResponsibilityRelatingToPublishersSeries =
$this->informationObject->getPropertyByName('statement_of_responsibility_relating_to_publishers_series',
array('scope'=>'rad'));
- $this->radNumberingWithinPublishersSeries =
$this->informationObject->getPropertyByName('numbering_within_publishers_series',
array('scope'=>'rad'));
- $this->radNoteOnPublishersSeries =
$this->informationObject->getPropertyByName('note_on_publishers_series',
array('scope'=>'rad'));
-
- // RAD 1.9 properties
- $this->radStandardNumber =
$this->informationObject->getPropertyByName('standard_number',
array('scope'=>'rad'));
}
protected function processField($field)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---