| 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 |
|
|---|
| 25 | header('Content-Type: text/xml; charset=UTF-8'); |
|---|
| 26 | header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT'); |
|---|
| 27 | header('Cache-Control: no-cache, must-revalidate'); |
|---|
| 28 | require_once('header.inc.php'); |
|---|
| 29 | |
|---|
| 30 | $bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService'); |
|---|
| 31 | $bookmark = intval($_GET['id']); |
|---|
| 32 | if (!$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> |
|---|