Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- untitled
+++ (clipboard)
@@ -12,12 +12,11 @@
     // have one extension chopped off, but there might be more than one,
     // such as with .tpl.php
     $template = substr($template, 0, strpos($template, '.'));
-
     // Transform - in filenames to _ to match function naming scheme
     // for the purposes of searching.
-    $search_template = strtr($template, '-', '_');
-    if (isset($cache[$search_template])) {
-      $templates[$template] = array(
+    $hook = strtr($template, '-', '_');
+    if (isset($cache[$hook])) {
+      $templates[$hook] = array(
         'file' => $template,
         'path' => dirname($file->filename),
       );