news/index.php

35 строки
768 B
PHP
Исходник Обычный вид История

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
OCP\Util::addscript('news','news');
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-13 22:39:07 +04:00
$allfeeds = $foldermapper->root();
$feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null;
2012-05-08 23:57:08 +04:00
$tmpl = new OCP\Template( 'news', 'main', 'user' );
$tmpl->assign('allfeeds', $allfeeds);
$tmpl->assign('feedid', $feedid);
2012-05-08 23:57:08 +04:00
$tmpl->printPage();
2012-04-28 18:27:29 +04:00
?>