source: trunk/bookmarks/ajaxDelete.php @ 103

Revision 103, 1.4 KB checked in by admin, 4 years ago (diff)

Merged 1.003 into Trunk

Line 
1<?php
2/*
3       
4        This file is part of omCollab.
5       
6        Copyright (c) 2008 omCollab (Openmethodology Project)
7        http://www.openmethodology.org
8        http://mike2.openmethodology.org/wiki/OmCollab
9       
10        And parts copyright of Scuttle project
11        (http://sourceforge.net/projects/scuttle/, http://scuttle.org/)
12       
13        omCollab is free software: you can redistribute it and/or modify
14        it under the terms of the GNU General Public License as published by
15        the Free Software Foundation, either version 3 of the License, or
16        (at your option) any later version.
17       
18        omCollab is distributed in the hope that it will be useful,
19        but WITHOUT ANY WARRANTY; without even the implied warranty of
20        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21        GNU General Public License for more details.
22
23*/
24
25header('Content-Type: text/xml; charset=UTF-8');
26header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT');
27header('Cache-Control: no-cache, must-revalidate');
28require_once('header.inc.php');
29
30$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
31$bookmark = intval($_GET['id']);
32if (!$bookmarkservice->editAllowed($bookmark)) {
33    $result = T_('You are not allowed to delete this bookmark');
34} elseif ($bookmarkservice->deleteBookmark($bookmark)) {
35    $result = 'true';
36} else {
37    $result = T_('Failed to delete bookmark');
38}
39?>
40<response>
41  <method>deleteConfirmed</method>
42  <result><?php echo $result; ?></result>
43</response>
Note: See TracBrowser for help on using the repository browser.