From b25dfd0913f2ca5666124740c30156fa0a6abaef Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 23 Jun 2010 05:55:08 -0400
Subject: [PATCH] - removed PHP closing tag

---
 program/steps/addressbook/delete.inc |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc
index 6ab9cc3..ba0ac0f 100644
--- a/program/steps/addressbook/delete.inc
+++ b/program/steps/addressbook/delete.inc
@@ -5,7 +5,7 @@
  | program/steps/addressbook/delete.inc                                  |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -19,13 +19,12 @@
 
 */
 
-if (($cid = get_input_value('_cid', RCUBE_INPUT_POST)) &&
-    (preg_match('/^[0-9]+(,[0-9]+)*$/', $cid) ||
-     preg_match('/^[a-zA-Z0-9=]+(,[a-zA-Z0-9=]+)*$/', $cid))
-   )
-  {
+if ($OUTPUT->ajax_call &&
+    ($cid = get_input_value('_cid', RCUBE_INPUT_POST)) &&
+    preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)
+) {
   $plugin = $RCMAIL->plugins->exec_hook('delete_contact', array('id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));
-  
+
   $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : false;
   if (!$deleted)
     {
@@ -50,4 +49,4 @@
   }
 
 exit;
-?>
+

--
Gitblit v1.9.1