From 3fca814d815a925a0ea598f4b262410e5f9a505e Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Tue, 21 Sep 2010 16:03:58 +0000
Subject: [PATCH] Fixing migration due to a drupal function being removed.

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@180 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/unl_migration.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sites/all/modules/unl/unl_migration.php b/sites/all/modules/unl/unl_migration.php
index 14eacf95..61798278 100644
--- a/sites/all/modules/unl/unl_migration.php
+++ b/sites/all/modules/unl/unl_migration.php
@@ -344,7 +344,7 @@ class Unl_Migration_Tool
             }
             @drupal_mkdir('public://' . dirname($path), NULL, TRUE);
             $file = file_save_data($data['content'], 'public://' . $path, FILE_EXISTS_REPLACE);
-            $this->_hrefTransformFiles[$path] = file_directory_path() . '/' . $path;
+            $this->_hrefTransformFiles[$path] = file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath() . '/' . $path;
             return;
         }
         $html = $data['content'];
@@ -568,7 +568,7 @@ class Unl_Migration_Tool
         
         $content = substr($data, $meta['header_size']);
         
-        if ($meta['http_code'] == 301) {
+        if (in_array($meta['http_code'], array(301, 302))) {
             $location = $headers['Location'];
             $path = substr($location, strlen($this->_baseUrl));
             $this->_addSitePath($path);
-- 
GitLab