From d0458b824a18c4e5c18a3c00ed39e96e695cda82 Mon Sep 17 00:00:00 2001
From: Mikael Nordfeldth <mmn@hethane.se>
Date: Tue, 7 Jul 2015 19:59:43 +0200
Subject: [PATCH] File_redirection minor coding layout fix

---
 classes/File_redirection.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/classes/File_redirection.php b/classes/File_redirection.php
index e0d68b7330..75a3b577ae 100644
--- a/classes/File_redirection.php
+++ b/classes/File_redirection.php
@@ -176,7 +176,7 @@ class File_redirection extends Managed_DataObject
             try {
                 $b = File_redirection::getByUrl($in_url);
                 // this is a redirect to $b->file_id
-                $a = File::getKV('id', $b->file_id);
+                $a = File::getByID($b->file_id);
                 return $a->url;
             } catch (NoResultException $e) {
                 // Oh well, let's keep going
@@ -186,10 +186,10 @@ class File_redirection extends Managed_DataObject
         if ($discover) {
             $ret = File_redirection::lookupWhere($in_url);
             return $ret;
-        } else {
-            // No manual dereferencing; leave the unknown URL as is.
-            return $in_url;
         }
+
+        // No manual dereferencing; leave the unknown URL as is.
+        return $in_url;
     }
 
     /**
-- 
2.39.5