Project

General

Profile

« Previous | Next » 

Revision 1689

Added by darkviper over 12 years ago

fixed Errorhandling for old class.database

View differences:

WbAutoloader.php
32 32
 */
33 33
	static public function CoreAutoloader($sClassName)
34 34
	{
35
		$sClassName = preg_replace(self::$_aSearchpatterns, self::$_aReplacements, $sClassName);
36
		$sFileName = dirname(dirname(__FILE__)).'/'.str_replace('_', '/', $sClassName).'.php';
37
		if(is_file($sFileName = dirname(dirname(__FILE__)).'/'.str_replace('_', '/', $sClassName).'.php')) {
38
			include($sFileName);
35
		if($sClassName == 'database'){
36
			$sFileName = dirname(__FILE__).'/class.database.php';
37
			if(is_file($sFileName)) { include($sFileName); }
38
		}else {
39
			$sClassName = preg_replace(self::$_aSearchpatterns, self::$_aReplacements, $sClassName);
40
			$sFileName = dirname(dirname(__FILE__)).'/'.str_replace('_', '/', $sClassName).'.php';
41
			if(is_file($sFileName = dirname(dirname(__FILE__)).'/'.str_replace('_', '/', $sClassName).'.php')) {
42
				include($sFileName);
43
			}
39 44
		}
40 45
	}
41 46
} // end class Autoloader

Also available in: Unified diff