summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/index.php b/index.php
index 957089cfc..1fadfc812 100644
--- a/index.php
+++ b/index.php
@@ -11,10 +11,18 @@
*
*/
-namespace OCA\News;
+require_once OC_App::getAppPath('news') . '/controllers/controller.php';
+require_once OC_App::getAppPath('news') . '/controllers/news.controller.php';
-require_once \OC_App::getAppPath('news') . '/lib/serve.php';
-require_once \OC_App::getAppPath('news') . '/controllers/news.controller.php';
+OCP\User::checkLoggedIn();
+OCP\App::checkAppEnabled('news');
+OCP\App::setActiveNavigationEntry('news');
+
+$controller = new OCA\News\NewsController();
// routes
-serve(new NewsController(), 'index', false);
+if(isset($_GET['jstest'])){
+ $controller->javascriptTests();
+} else {
+ $controller->index();
+} \ No newline at end of file