diff options
Diffstat (limited to 'ajax/deletefolder.php')
-rw-r--r-- | ajax/deletefolder.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/ajax/deletefolder.php b/ajax/deletefolder.php deleted file mode 100644 index ddde1c992..000000000 --- a/ajax/deletefolder.php +++ /dev/null @@ -1,33 +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(); - -$folderid = trim($_POST['folderid']); -$part_items = false; - -$foldermapper = new OCA\News\FolderMapper($userid); - -if(!$foldermapper->deleteById($folderid)) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error removing folder.')))); - OCP\Util::writeLog('news','ajax/deletefolder.php: Error removing folder: '.$_POST['folderid'], OCP\Util::ERROR); - exit(); -} - - -OCP\JSON::success(array('data' => array( 'folderid' => $folderid ))); |