Browse Source

Fix error in CollectionClass.

Was able to instantiate without a PID, which would mean that the
'collectionObject' object helper would not get created...  Blargh.
pull/101/head
Adam Vessey 13 years ago
parent
commit
01c5a4736f
  1. 8
      CollectionClass.inc
  2. 2
      ObjectHelper.inc

8
CollectionClass.inc

@ -28,11 +28,9 @@ class CollectionClass {
* @return CollectionClass * @return CollectionClass
*/ */
function __construct($pid = NULL) { function __construct($pid = NULL) {
if (!empty($pid)) { module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $this->collectionObject = new ObjectHelper();
$this->collectionObject = new ObjectHelper($pid); $this->pid = $pid;
$this->pid = $pid;
}
} }
public static function getCollectionQuery($pid) { public static function getCollectionQuery($pid) {

2
ObjectHelper.inc

@ -32,8 +32,6 @@ class ObjectHelper {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$connectionHelper = new ConnectionHelper(); $connectionHelper = new ConnectionHelper();
//$this->fedoraUser = $connectionHelper->getUser();
//$this->fedoraPass = $connectionHelper->getPassword();
} }
private static function getBinaryLength($bin) { private static function getBinaryLength($bin) {

Loading…
Cancel
Save