~pvigo/+junk/owncloud-14.04

« back to all changes in this revision

Viewing changes to usr/share/owncloud/apps/calendar/ajax/event/delete.php

  • Committer: Pablo Vigo
  • Date: 2014-12-15 13:36:46 UTC
  • Revision ID: pvigo@xtec.cat-20141215133646-7d6it90e1dbsijc2
2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/**
3
 
 * Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
4
 
 * This file is licensed under the Affero General Public License version 3 or
5
 
 * later.
6
 
 * See the COPYING-README file.
7
 
 */
8
 
 
9
 
 
10
 
OCP\JSON::checkLoggedIn();
11
 
OCP\JSON::checkAppEnabled('calendar');
12
 
OCP\JSON::callCheck();
13
 
 
14
 
$id = $_POST['id'];
15
 
 
16
 
try {
17
 
        OC_Calendar_Object::delete($id);
18
 
} catch(Exception $e) {
19
 
        OCP\JSON::error(array('message'=>$e->getMessage()));
20
 
        exit;
21
 
}
22
 
 
23
 
OCP\JSON::success();
 
 
b'\\ No newline at end of file'