diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-08 15:57:08 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-08 15:57:08 -0400 |
commit | 4bf4af8741ca723273ae9aff0f1d6c38511e2a07 (patch) | |
tree | d7e25b383f15837e60a1dff4fadae55ab72d57e0 /index.php | |
parent | d1b37e12b2d76c128626e15910577e300ef0f63c (diff) |
rudimental item class and tests on it
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -1,7 +1,7 @@ <?php /** -* ownCloud - News app (feed reader) +* ownCloud - News app * * @author Alessandro Cosentino * @copyright 2012 Alessandro Cosentino cosenal@gmail.com @@ -21,20 +21,23 @@ * */ +// this is temporary. +//TODO: change it once the new app system is complete require_once('../owncloud/lib/base.php'); +// load SimplePie library +require_once('3rdparty/SimplePie/SimplePieAutoloader.php'); + // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( "Location: ".OC_Helper::linkTo( '', 'index.php' )); - exit(); -} +OCP\User::checkLoggedIn(); +OCP\App::checkAppEnabled('news'); +OCP\App::setActiveNavigationEntry('news'); -$somesetting=OC_Config::getValue( "somesetting", '' ); -OC_App::setActiveNavigationEntry( 'news'); -$tmpl = new OC_Template( 'news', 'main', 'user' ); -$tmpl->assign('somesetting',$somesetting); -$tmpl->printPage(); +//OCP\Util::addscript('news','news'); +//OCP\Util::addStyle('news', 'news'); +$tmpl = new OCP\Template( 'news', 'main', 'user' ); +$tmpl->printPage(); ?> |