diff options
author | Gregor Tätzner <gregor@freenet.de> | 2012-08-04 18:54:54 +0200 |
---|---|---|
committer | Gregor Tätzner <gregor@freenet.de> | 2012-08-04 18:54:54 +0200 |
commit | 82cfb232c2728eb7acbb0adbd12a84b6b46e4322 (patch) | |
tree | 7471e7dec607026e19972ffb358892fc2286a185 /ajax/deletefolder.php | |
parent | 91d194a5df74ba79e40fb1be8f87d79a506d2c85 (diff) |
Show or hide items in rightcontent when creating or deleting feeds
Diffstat (limited to 'ajax/deletefolder.php')
-rw-r--r-- | ajax/deletefolder.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ajax/deletefolder.php b/ajax/deletefolder.php index 7c38557f6..65eec5bdf 100644 --- a/ajax/deletefolder.php +++ b/ajax/deletefolder.php @@ -18,6 +18,8 @@ OCP\JSON::callCheck(); $userid = OCP\USER::getUser(); $folderid = trim($_POST['folderid']); +$shownfeedid = trim($_POST['shownfeedid']); +$part_items = false; $foldermapper = new OC_News_FolderMapper(); @@ -27,4 +29,13 @@ if(!$foldermapper->deleteById($folderid)) { exit(); } -OCP\JSON::success(array('data' => array( 'folderid' => $folderid ))); +// lets check if the currently shown feed is among the deleted feeds +if ($shownfeedid != null) { + $feedmapper = new OC_News_FeedMapper(); + if (!$feedmapper->findById($shownfeedid)) { + $tmpl = new OCP\Template("news", "part.items.deleted"); + $part_items = $tmpl->fetchPage(); + } +} + +OCP\JSON::success(array('data' => array( 'folderid' => $folderid, 'part_items' => $part_items ))); |