You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

16 years ago
16 years ago
  1. <?php
  2. /**
  3. * ownCloud - ajax frontend
  4. *
  5. * @author Robin Appelman
  6. * @copyright 2010 Robin Appelman icewind1991@gmail.com
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. require_once('../inc/lib_base.php');
  23. $arguments=$_POST;
  24. if(!isset($_POST['action']) and isset($_GET['action'])){
  25. $arguments=$_GET;
  26. }
  27. foreach($arguments as &$argument){
  28. $argument=stripslashes($argument);
  29. }
  30. ob_clean();
  31. switch($arguments['action']){
  32. case 'delete':
  33. OC_FILES::delete($arguments['dir'],$arguments['file']);
  34. break;
  35. case 'rename':
  36. OC_FILES::move($arguments['dir'],$arguments['file'],$arguments['dir'],$arguments['newname']);
  37. break;
  38. case 'new':
  39. OC_FILES::newfile($arguments['dir'],$arguments['name'],$arguments['type']);
  40. break;
  41. case 'move':
  42. OC_FILES::move($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']);
  43. break;
  44. case 'get':
  45. OC_FILES::get($arguments['dir'],$arguments['file']);
  46. break;
  47. }
  48. ?>