summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-31 21:28:17 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-31 22:02:19 +0100
commit323dd4c9b18c331516f024332fd5ee354e337492 (patch)
treed348a3f1c24ebbde53a63639a859a78a8165d38b /index.php
parentbb092e1545285cb3b3a63cc0451355257e41db3c (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.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/index.php b/index.php
index 1fadfc812..45acad4c6 100644
--- a/index.php
+++ b/index.php
@@ -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