diff --git a/com_lendr/site/controllers/default.php b/com_lendr/site/controllers/default.php index 1fcac04..7df6873 100644 --- a/com_lendr/site/controllers/default.php +++ b/com_lendr/site/controllers/default.php @@ -8,7 +8,7 @@ public function execute() $app = $this->getApplication(); // Get the document object. - $document = $app->getDocument(); + $document = JFactory::getDocument(); $viewName = $app->input->getWord('view', 'dashboard'); $viewFormat = $document->getType(); diff --git a/com_lendr/site/controllers/edit.php b/com_lendr/site/controllers/edit.php index 064ad81..0140d09 100644 --- a/com_lendr/site/controllers/edit.php +++ b/com_lendr/site/controllers/edit.php @@ -10,10 +10,8 @@ function execute() $viewName = $app->input->get('view'); $app->input->set('layout','edit'); $app->input->set('view', $viewName); - - $view = LendrHelperView::getView($viewName,'edit','html'); - + //display view - echo $view->render(); + return parent::execute(); } } \ No newline at end of file diff --git a/com_lendr/site/lendr.php b/com_lendr/site/lendr.php index 180bc53..25b8386 100644 --- a/com_lendr/site/lendr.php +++ b/com_lendr/site/lendr.php @@ -7,6 +7,9 @@ //load tables JTable::addIncludePath(JPATH_COMPONENT.'/tables'); + +//load classes +JLoader::registerPrefix('LendrController', JPATH_COMPONENT.'/controllers'); //Load plugins JPluginHelper::importPlugin('lendr'); @@ -15,12 +18,10 @@ $app = JFactory::getApplication(); // Require specific controller if requested -if($controller = $app->input->get('controller','default')) { - require_once (JPATH_COMPONENT.'/controllers/'.$controller.'.php'); -} +$controller = $app->input->get('controller','default'); // Create the controller -$classname = 'LendrController'.$controller; +$classname = 'LendrController'.ucwords($controller); $controller = new $classname(); // Perform the Request task diff --git a/com_lendr/site/router.php b/com_lendr/site/router.php index 0778a7d..668889e 100644 --- a/com_lendr/site/router.php +++ b/com_lendr/site/router.php @@ -3,10 +3,11 @@ function LendrBuildRoute(&$query) { - + $segments = array(); + return $segments; } function LendrParseRoute($segments) { - + } \ No newline at end of file