From 8f1bca7459af7eeebb30bf116ae03c25d30836f3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 21 Jul 2009 12:18:49 -0700 Subject: Remove the fallback code. It should trigger extremely rarely and seems highly inefficient to me, so let's see if we can live without it. --- modules/gallery/controllers/file_proxy.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index c5b34033..799260b5 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -66,20 +66,6 @@ class File_Proxy_Controller extends Controller { // We didn't turn it up. This may mean that the path cache is out of date, so look it up // the hard way. // - // Find all items that match the level and name, then iterate over those to find a match. - // In most cases we'll get it in one. Note that for the level calculation, we just count the - // size of $paths. - $paths = explode("/", $path); - $count = count($paths); - foreach (ORM::factory("item") - ->where("name", $paths[$count - 1]) - ->where("level", $count + 1) - ->find_all() as $match) { - if ($match->relative_path() == $path) { - $item = $match; - break; - } - } } if (!$item->loaded) { -- cgit v1.2.3