From d61157353ff166f1d5b1fc950754901570f1b1f6 Mon Sep 17 00:00:00 2001
From: Michael Strelan <mstrelan@gmail.com>
Date: Mon, 30 May 2011 15:56:51 +1000
Subject: [PATCH] [#627378] views template overrides in module directory

---
 views.module |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/views.module b/views.module
index 9c5a864..1e92c92 100644
--- a/views.module
+++ b/views.module
@@ -185,7 +185,7 @@ function _views_find_module_templates($cache, $path) {
     if (isset($cache[$hook])) {
       $templates[$hook] = array(
         'template' => $template,
-        'path' => dirname($file->filename),
+        'path' => dirname($files[$match]->uri),
         'includes' => isset($cache[$hook]['includes']) ? $cache[$hook]['includes'] : NULL,
       );
     }
@@ -212,7 +212,7 @@ function _views_find_module_templates($cache, $path) {
           // Put the underscores back in for the hook name and register this pattern.
           $templates[strtr($file, '-', '_')] = array(
             'template' => $file,
-            'path' => dirname($files[$match]->filename),
+            'path' => dirname($files[$match]->uri),
             'variables' => $info['variables'],
             'base hook' => $hook,
             'includes' => isset($info['includes']) ? $info['includes'] : NULL,
-- 
1.7.4

