From 6c5366d366bb37b3c40b35dbc687a7e692de5eda Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 16 Oct 2015 13:27:47 +1100 Subject: [PATCH] Fix previous commit by only searching for Model_* --- system/classes/Kohana/Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/classes/Kohana/Core.php b/system/classes/Kohana/Core.php index 791c114..eea33ad 100644 --- a/system/classes/Kohana/Core.php +++ b/system/classes/Kohana/Core.php @@ -515,7 +515,7 @@ class Kohana_Core { } // Enable finding a default Model - if ($path = Kohana::find_file($directory,'Model/DEFAULT')) { + if (preg_match('/^Model_/',$class) AND $path = Kohana::find_file($directory,'Model/DEFAULT')) { // Load the class file require $path;