news/index.php

45 строки
893 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-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-07-09 01:15:12 +04:00
$l = OC_L10N::get('news');
2012-06-13 22:39:07 +04:00
$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser());
2012-07-09 01:15:12 +04:00
$allfeeds = $foldermapper->populate($l->t('Everything'), 0);
2012-07-05 00:54:26 +04:00
if ($allfeeds) {
$feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null;
if ($feedid == null) {
2012-07-09 01:15:12 +04:00
2012-07-05 00:54:26 +04:00
}
}
2012-07-05 00:54:26 +04:00
else {
$feedid = 0;
}
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
?>