From 15405e8b8a257b37abf95ed0fd005e8afe71ded6 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Thu, 23 Jun 2011 15:40:45 +0000 Subject: [PATCH] [gh-155] Merging from testing into staging git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@766 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/unl.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module index 50f51114..f63a70d9 100644 --- a/sites/all/modules/unl/unl.module +++ b/sites/all/modules/unl/unl.module @@ -481,14 +481,15 @@ function unl_cron() { } Database::addConnectionInfo('wdn_registry', 'default', $wdn_registry_info); - db_set_active('wdn_registry'); try { + db_set_active('wdn_registry'); $data = db_select('site_request', 'r') ->fields('r') ->where('`url` IS NULL') ->execute() ->fetchAll(); + db_set_active(); } catch (Exception $e) { db_set_active(); @@ -524,15 +525,16 @@ function unl_cron() { 'department' => $full_department, ); + db_set_active('wdn_registry'); if (variable_get('unl_wdn_registry_production')) { db_update('site_request') ->fields(array('url' => url($path))) ->condition('id', $site->id) ->execute(); } + db_set_active(); } - db_set_active(); foreach ($sites_to_create as $site_to_create) { try { -- GitLab