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.

This commit is contained in:
Bharat Mediratta
2009-07-21 12:18:49 -07:00
parent 90ba320655
commit 8f1bca7459

View File

@@ -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) {