updated autoload to conform to new directory structure

This commit is contained in:
tmont 2008-10-20 04:44:55 +00:00
parent 751d986f29
commit dab37a08c0

View File

@ -23,14 +23,23 @@
$path = dirname(__FILE__); $path = dirname(__FILE__);
$file = ''; $file = '';
switch ($className) { switch ($className) {
//controllers
case 'PanaceaControllerFactory': case 'PanaceaControllerFactory':
case 'PanaceaWikiController': case 'PanaceaWikiController':
case 'WikiViewFactory':
case 'PanaceaDefaultController': case 'PanaceaDefaultController':
case 'PanaceaViewFactory': $file = "$path/lib/controllers/$className.php";
break;
//handlers
case 'PanaceaPostHandlerFactory': case 'PanaceaPostHandlerFactory':
case 'WikiPagePostHandler': case 'WikiPagePostHandler':
$file = "$path/lib/$className.php"; $file = "$path/lib/controllers/handlers/$className.php";
break;
//views
case 'WikiViewFactory':
case 'PanaceaViewFactory':
$file = "$path/lib/views/$className.php";
break; break;
case 'WikiPageView': case 'WikiPageView':
@ -51,7 +60,7 @@
case 'PanaceaMenuView': case 'PanaceaMenuView':
case 'PanaceaFooterView': case 'PanaceaFooterView':
case 'PanaceaWelcomeView': case 'PanaceaWelcomeView':
$file = "$path/lib/views/$className.php"; $file = "$path/lib/views/system/$className.php";
break; break;
} }