Commits

Anonymous committed 77a96d8

Add CI 2.0 spl_autoload for application/core base classes

Comments (0)

Files changed (1)

third_party/MX/Modules.php

 	public static function autoload($class) {
 		
 		/* don't autoload CI_ or MY_ prefixed classes */
-		if (strstr($class, 'CI_') OR strstr($class, 'MY_')) return;
+		if (strstr($class, 'CI_') || strstr($class, 'MY_')) return;
+
+		if(( ! CI_VERSION < 2) && is_file($location = APPPATH.'core/'.$class.EXT)) {
+			include_once $location;
+		}		
 		
 		if(is_file($location = APPPATH.'libraries/'.$class.EXT)) {
 			include_once $location;