diff options
Diffstat (limited to 'ajax/deletefeed.php')
-rw-r--r-- | ajax/deletefeed.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ajax/deletefeed.php b/ajax/deletefeed.php deleted file mode 100644 index c45931d42..000000000 --- a/ajax/deletefeed.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); -session_write_close(); - -$userid = OCP\USER::getUser(); - -$feedid = $_POST['feedid']; - -$feedmapper = new OCA\News\FeedMapper($userid); -$success = $feedmapper->deleteById($feedid); - -$l = OC_L10N::get('news'); - -if(!$success) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error removing feed.')))); - OCP\Util::writeLog('news','ajax/deletefeed.php: Error removing feed: '.$_POST['feedid'], OCP\Util::ERROR); - exit(); -} - -$tmpl = new OCP\Template("news", "part.items.deleted"); -$part_items = $tmpl->fetchPage(); - -OCP\JSON::success(array('data' => array( 'feedid' => $feedid, 'part_items' => $part_items ))); |