From 7dfb1fba5001299300736e6b5d95d9400575e3e7 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 18 Sep 2008 14:59:02 -0400
Subject: [PATCH] Set the right number of arguments for setcookie()

---
 program/steps/addressbook/edit.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index 9cda22b..61c660d 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -90,8 +90,9 @@
   if (!strlen($EDIT_FORM))
     {
     $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $RCMAIL->task));
-    $hiddenfields->add(array('name' => '_action', 'value' => 'save', 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));
+    $hiddenfields->add(array('name' => '_action', 'value' => 'save'));
     $hiddenfields->add(array('name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC)));
+    $hiddenfields->add(array('name' => '_framed', 'value' => (empty($_REQUEST['_framed']) ? 0 : 1)));
     
     if (($result = $CONTACTS->get_result()) && ($record = $result->first()))
       $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID']));
@@ -113,7 +114,7 @@
 
 
 
-if (!$CONTACTS->get_result() && template_exists('addcontact'))
+if (!$CONTACTS->get_result() && $OUTPUT->template_exists('addcontact'))
   $OUTPUT->send('addcontact');
 
 // this will be executed if no template for addcontact exists

--
Gitblit v1.9.1