]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3336 functions that used elgg_view_exists() were not falling back to the defau...
authorCash Costello <cash.costello@gmail.com>
Sun, 10 Jul 2011 11:42:52 +0000 (07:42 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 10 Jul 2011 11:42:52 +0000 (07:42 -0400)
engine/lib/views.php

index dde298c2b63a5fc9b1486dddcd2b55cb20ea4e49..04f4b7c2a2d38c2095ab617c529c4a9ead03ae00 100644 (file)
@@ -309,6 +309,11 @@ function elgg_view_exists($view, $viewtype = '', $recurse = true) {
                }
        }
 
+       // Now check if the default view exists if the view is registered as a fallback
+       if ($viewtype != 'default' && elgg_does_viewtype_fallback($viewtype)) {
+               return elgg_view_exists($view, 'default');
+       }
+
        return false;
 }