diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-10-04 17:24:28 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-10-04 17:24:28 +0200 |
commit | f19a236c8e8c06f2a30212970714d66b68218e15 (patch) | |
tree | 2e90398aa999e7feea16b237b21975136137d478 /core/ajax | |
parent | 12bb1970280914309ffca8ca796fcac80663c4cf (diff) | |
download | nextcloud-server-f19a236c8e8c06f2a30212970714d66b68218e15.tar.gz nextcloud-server-f19a236c8e8c06f2a30212970714d66b68218e15.zip |
Remove obsolete files.
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/vcategories/add.php | 42 | ||||
-rw-r--r-- | core/ajax/vcategories/addToFavorites.php | 38 | ||||
-rw-r--r-- | core/ajax/vcategories/delete.php | 40 | ||||
-rw-r--r-- | core/ajax/vcategories/edit.php | 34 | ||||
-rw-r--r-- | core/ajax/vcategories/favorites.php | 30 | ||||
-rw-r--r-- | core/ajax/vcategories/removeFromFavorites.php | 38 |
6 files changed, 0 insertions, 222 deletions
diff --git a/core/ajax/vcategories/add.php b/core/ajax/vcategories/add.php deleted file mode 100644 index 16a1461be08..00000000000 --- a/core/ajax/vcategories/add.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); -} - -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$l = OC_L10N::get('core'); - -$category = isset($_POST['category']) ? strip_tags($_POST['category']) : null; -$type = isset($_POST['type']) ? $_POST['type'] : null; - -if(is_null($type)) { - bailOut($l->t('Category type not provided.')); -} - -if(is_null($category)) { - bailOut($l->t('No category to add?')); -} - -debug(print_r($category, true)); - -$categories = new OC_VCategories($type); -if($categories->hasCategory($category)) { - bailOut($l->t('This category already exists: %s', array($category))); -} else { - $categories->add($category, true); -} - -OC_JSON::success(array('data' => array('categories'=>$categories->categories()))); diff --git a/core/ajax/vcategories/addToFavorites.php b/core/ajax/vcategories/addToFavorites.php deleted file mode 100644 index 52f62d5fc6b..00000000000 --- a/core/ajax/vcategories/addToFavorites.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/addToFavorites.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/addToFavorites.php: '.$msg, OC_Log::DEBUG); -} - -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$l = OC_L10N::get('core'); - -$id = isset($_POST['id']) ? strip_tags($_POST['id']) : null; -$type = isset($_POST['type']) ? $_POST['type'] : null; - -if(is_null($type)) { - bailOut($l->t('Object type not provided.')); -} - -if(is_null($id)) { - bailOut($l->t('%s ID not provided.', $type)); -} - -$categories = new OC_VCategories($type); -if(!$categories->addToFavorites($id, $type)) { - bailOut($l->t('Error adding %s to favorites.', $id)); -} - -OC_JSON::success(); diff --git a/core/ajax/vcategories/delete.php b/core/ajax/vcategories/delete.php deleted file mode 100644 index dfec3785743..00000000000 --- a/core/ajax/vcategories/delete.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); -} - -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$l = OC_L10N::get('core'); - -$type = isset($_POST['type']) ? $_POST['type'] : null; -$categories = isset($_POST['categories']) ? $_POST['categories'] : null; - -if(is_null($type)) { - bailOut($l->t('Object type not provided.')); -} - -debug('The application using category type "' - . $type - . '" uses the default file for deletion. OC_VObjects will not be updated.'); - -if(is_null($categories)) { - bailOut($l->t('No categories selected for deletion.')); -} - -$vcategories = new OC_VCategories($type); -$vcategories->delete($categories); -OC_JSON::success(array('data' => array('categories'=>$vcategories->categories()))); diff --git a/core/ajax/vcategories/edit.php b/core/ajax/vcategories/edit.php deleted file mode 100644 index 0387b17576c..00000000000 --- a/core/ajax/vcategories/edit.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); -} - -OC_JSON::checkLoggedIn(); - -$l = OC_L10N::get('core'); - -$type = isset($_GET['type']) ? $_GET['type'] : null; - -if(is_null($type)) { - bailOut($l->t('Category type not provided.')); -} - -$tmpl = new OCP\Template("core", "edit_categories_dialog"); - -$vcategories = new OC_VCategories($type); -$categories = $vcategories->categories(); -debug(print_r($categories, true)); -$tmpl->assign('categories', $categories); -$tmpl->printpage(); diff --git a/core/ajax/vcategories/favorites.php b/core/ajax/vcategories/favorites.php deleted file mode 100644 index db4244d601a..00000000000 --- a/core/ajax/vcategories/favorites.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/addToFavorites.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/addToFavorites.php: '.$msg, OC_Log::DEBUG); -} - -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$type = isset($_GET['type']) ? $_GET['type'] : null; - -if(is_null($type)) { - $l = OC_L10N::get('core'); - bailOut($l->t('Object type not provided.')); -} - -$categories = new OC_VCategories($type); -$ids = $categories->getFavorites($type); - -OC_JSON::success(array('ids' => $ids)); diff --git a/core/ajax/vcategories/removeFromFavorites.php b/core/ajax/vcategories/removeFromFavorites.php deleted file mode 100644 index 78a528caa86..00000000000 --- a/core/ajax/vcategories/removeFromFavorites.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ -function bailOut($msg) { - OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core', 'ajax/vcategories/removeFromFavorites.php: '.$msg, OC_Log::DEBUG); - exit(); -} -function debug($msg) { - OC_Log::write('core', 'ajax/vcategories/removeFromFavorites.php: '.$msg, OC_Log::DEBUG); -} - -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$l = OC_L10N::get('core'); - -$id = isset($_POST['id']) ? strip_tags($_POST['id']) : null; -$type = isset($_POST['type']) ? $_POST['type'] : null; - -if(is_null($type)) { - bailOut($l->t('Object type not provided.')); -} - -if(is_null($id)) { - bailOut($l->t('%s ID not provided.', array($type))); -} - -$categories = new OC_VCategories($type); -if(!$categories->removeFromFavorites($id, $type)) { - bailOut($l->t('Error removing %s from favorites.', array($id))); -} - -OC_JSON::success(); |