till
2008-03-24 0b17277eaeebdee278230d7cd2550a1a9e2fcf9f
commit | author | age
4e17e6 1 <?php
T 2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/steps/settings/delete_identity.inc                            |
6  |                                                                       |
7  | This file is part of the RoundCube Webmail client                     |
f11541 8  | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
30233b 9  | Licensed under the GNU GPL                                            |
4e17e6 10  |                                                                       |
T 11  | PURPOSE:                                                              |
12  |   Delete the submitted identities (IIDs) from the database            |
13  |                                                                       |
14  +-----------------------------------------------------------------------+
15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16  +-----------------------------------------------------------------------+
17
18  $Id$
19
20 */
21
b3ce79 22 if (($ids = get_input_value('_iid', RCUBE_INPUT_GET)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $ids))
f11541 23 {
4e17e6 24
fba1f5 25   if ($USER->delete_identity($ids))
e3a0af 26   {
f11541 27     $OUTPUT->show_message('deletedsuccessfully', 'confirmation');
e3a0af 28   }
T 29   else 
30   {
31     $OUTPUT->show_message('nodeletelastidentity', 'error');
32   }
4e17e6 33   // send response
f11541 34   if ($OUTPUT->ajax_call)
T 35     $OUTPUT->send();
36 }
4e17e6 37
T 38
f11541 39 if ($OUTPUT->ajax_call)
4e17e6 40   exit;
T 41
42
43 // go to identities page
f11541 44 rcmail_overwrite_action('identities');
4e17e6 45
ee883a 46 ?>