diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-31 21:28:17 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-31 22:02:19 +0100 |
commit | 323dd4c9b18c331516f024332fd5ee354e337492 (patch) | |
tree | d348a3f1c24ebbde53a63639a859a78a8165d38b /index.php | |
parent | bb092e1545285cb3b3a63cc0451355257e41db3c (diff) |
added request object, added url function that does all the security checks, improved controller object
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -11,18 +11,10 @@ * */ -require_once OC_App::getAppPath('news') . '/controllers/controller.php'; -require_once OC_App::getAppPath('news') . '/controllers/news.controller.php'; +namespace OCA\News; -OCP\User::checkLoggedIn(); -OCP\App::checkAppEnabled('news'); -OCP\App::setActiveNavigationEntry('news'); - -$controller = new OCA\News\NewsController(); +require_once \OC_App::getAppPath('news') . '/lib/url.php'; +require_once \OC_App::getAppPath('news') . '/controllers/news.controller.php'; // routes -if(isset($_GET['jstest'])){ - $controller->javascriptTests(); -} else { - $controller->index(); -}
\ No newline at end of file +url(new NewsController(), 'index');
\ No newline at end of file |