From 36238d7d97c8720fc7b029490aae13eec78f6029 Mon Sep 17 00:00:00 2001 From: Christian Selig Date: Fri, 30 Aug 2013 18:51:52 +0000 Subject: [PATCH] Removed duplicated islandora_make_tuque function. --- islandora.module | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/islandora.module b/islandora.module index 727b06b0..b7c9857a 100644 --- a/islandora.module +++ b/islandora.module @@ -994,6 +994,8 @@ function islandora_default_islandora_printer_object($object, $alter) { * A IslandoraTuque instance */ function islandora_get_tuque_connection($new_user = NULL, $url = NULL) { + module_load_include('inc', 'islandora', 'includes/utilities'); + $tuque = &drupal_static(__FUNCTION__); global $user; @@ -1037,30 +1039,6 @@ function islandora_get_tuque_connection($new_user = NULL, $url = NULL) { return $tuque; } -/** - * Creates a singleton of tuque. - * - * @param object $user - * The user to create tuque with. - * @param string $url - * The URL to create tuque with. - * - * @return IslandoraTuque - * The singleton tuque object. - */ -function islandora_make_tuque($user, $url) { - if (IslandoraTuque::exists()) { - try { - return new IslandoraTuque($user, $url); - } - catch (Exception $e) { - drupal_set_message(t('Unable to connect to the repository %e', array('%e' => $e)), 'error'); - } - } - - return NULL; -} - /** * Loads the object from the given ID if possible. *