2012-04-28 18:27:29 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2012-05-08 23:57:08 +04:00
|
|
|
* ownCloud - News app
|
2012-04-28 18:27:29 +04:00
|
|
|
*
|
|
|
|
* @author Alessandro Cosentino
|
2012-06-13 22:39:07 +04:00
|
|
|
* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com>
|
2012-04-28 18:27:29 +04:00
|
|
|
*
|
2012-06-13 22:39:07 +04:00
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file
|
2012-04-28 18:27:29 +04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Check if we are a user
|
2012-05-08 23:57:08 +04:00
|
|
|
OCP\User::checkLoggedIn();
|
2012-04-28 18:27:29 +04:00
|
|
|
|
2012-05-08 23:57:08 +04:00
|
|
|
OCP\App::checkAppEnabled('news');
|
|
|
|
OCP\App::setActiveNavigationEntry('news');
|
2012-04-28 18:27:29 +04:00
|
|
|
|
2012-06-27 03:20:22 +04:00
|
|
|
OCP\Util::addscript('news','news');
|
2012-07-03 07:39:19 +04:00
|
|
|
OCP\Util::addStyle('news','news');
|
2012-04-28 18:27:29 +04:00
|
|
|
|
2012-06-13 22:39:07 +04:00
|
|
|
$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser());
|
2012-06-08 00:19:25 +04:00
|
|
|
|
2012-06-13 22:39:07 +04:00
|
|
|
$allfeeds = $foldermapper->root();
|
2012-06-08 00:19:25 +04:00
|
|
|
|
2012-07-03 07:39:19 +04:00
|
|
|
$feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null;
|
|
|
|
|
2012-05-08 23:57:08 +04:00
|
|
|
$tmpl = new OCP\Template( 'news', 'main', 'user' );
|
2012-06-08 00:19:25 +04:00
|
|
|
$tmpl->assign('allfeeds', $allfeeds);
|
2012-07-03 07:39:19 +04:00
|
|
|
$tmpl->assign('feedid', $feedid);
|
2012-05-08 23:57:08 +04:00
|
|
|
$tmpl->printPage();
|
2012-04-28 18:27:29 +04:00
|
|
|
|
|
|
|
?>
|