From 01c5a4736f1d12795512b92956f4d4de77bcf36c Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Fri, 27 Apr 2012 14:51:12 -0300 Subject: [PATCH] Fix error in CollectionClass. Was able to instantiate without a PID, which would mean that the 'collectionObject' object helper would not get created... Blargh. --- CollectionClass.inc | 8 +++----- ObjectHelper.inc | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index 5882a460..2ac6facc 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -28,11 +28,9 @@ class CollectionClass { * @return CollectionClass */ function __construct($pid = NULL) { - if (!empty($pid)) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); - $this->collectionObject = new ObjectHelper($pid); - $this->pid = $pid; - } + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + $this->collectionObject = new ObjectHelper(); + $this->pid = $pid; } public static function getCollectionQuery($pid) { diff --git a/ObjectHelper.inc b/ObjectHelper.inc index f2d47e0e..01a2b0a5 100644 --- a/ObjectHelper.inc +++ b/ObjectHelper.inc @@ -32,8 +32,6 @@ class ObjectHelper { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $connectionHelper = new ConnectionHelper(); - //$this->fedoraUser = $connectionHelper->getUser(); - //$this->fedoraPass = $connectionHelper->getPassword(); } private static function getBinaryLength($bin) {