freebsd-ports/mail/roundcube-carddav/files/patch-rcube-input-post

66 lines
3.5 KiB
Plaintext

From c14c32af9fd1ff363e9be0c237ffa1a0ccc1514d Mon Sep 17 00:00:00 2001
From: Benjamin 'blindCoder' Schieder <benjamin@anderdonau.de>
Date: Thu, 27 Apr 2017 09:19:04 +0200
Subject: [PATCH] use correct namespace for RCUBE_INPUT_POST, fixes #186
---
carddav.php | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/carddav.php b/carddav.php
index 998272e..7034ab5 100644
--- carddav.php.orig
+++ carddav.php
@@ -499,16 +499,16 @@ function cd_save($args)
} else {
$newset = array (
- 'name' => rcube_utils::get_input_value($abookid."_cd_name", RCUBE_INPUT_POST),
- 'username' => rcube_utils::get_input_value($abookid."_cd_username", RCUBE_INPUT_POST, true),
- 'url' => rcube_utils::get_input_value($abookid."_cd_url", RCUBE_INPUT_POST),
+ 'name' => rcube_utils::get_input_value($abookid."_cd_name", rcube_utils::INPUT_POST),
+ 'username' => rcube_utils::get_input_value($abookid."_cd_username", rcube_utils::INPUT_POST, true),
+ 'url' => rcube_utils::get_input_value($abookid."_cd_url", rcube_utils::INPUT_POST),
'active' => isset($_POST[$abookid.'_cd_active']) ? 1 : 0,
'use_categories' => isset($_POST[$abookid.'_cd_use_categories']) ? 1 : 0,
- 'refresh_time' => rcube_utils::get_input_value($abookid."_cd_refresh_time", RCUBE_INPUT_POST),
+ 'refresh_time' => rcube_utils::get_input_value($abookid."_cd_refresh_time", rcube_utils::INPUT_POST),
);
// only set the password if the user entered a new one
- $password = rcube_utils::get_input_value($abookid."_cd_password", RCUBE_INPUT_POST, true);
+ $password = rcube_utils::get_input_value($abookid."_cd_password", rcube_utils::INPUT_POST, true);
if(strlen($password) > 0) {
$newset['password'] = $password;
}
@@ -525,14 +525,14 @@ function cd_save($args)
}
// add a new address book?
- $new = rcube_utils::get_input_value('new_cd_name', RCUBE_INPUT_POST);
+ $new = rcube_utils::get_input_value('new_cd_name', rcube_utils::INPUT_POST);
if ( (!array_key_exists('_GLOBAL', $prefs) || !$prefs['_GLOBAL']['fixed']) && strlen($new) > 0) {
- $srv = rcube_utils::get_input_value('new_cd_url', RCUBE_INPUT_POST);
- $usr = rcube_utils::get_input_value('new_cd_username', RCUBE_INPUT_POST, true);
- $pass = rcube_utils::get_input_value('new_cd_password', RCUBE_INPUT_POST, true);
+ $srv = rcube_utils::get_input_value('new_cd_url', rcube_utils::INPUT_POST);
+ $usr = rcube_utils::get_input_value('new_cd_username', rcube_utils::INPUT_POST, true);
+ $pass = rcube_utils::get_input_value('new_cd_password', rcube_utils::INPUT_POST, true);
$pass = self::$helper->encrypt_password($pass);
- $abname = rcube_utils::get_input_value('new_cd_name', RCUBE_INPUT_POST);
- $use_categories = intval(rcube_utils::get_input_value('new_cd_use_categories', RCUBE_INPUT_POST, true), 0);
+ $abname = rcube_utils::get_input_value('new_cd_name', rcube_utils::INPUT_POST);
+ $use_categories = intval(rcube_utils::get_input_value('new_cd_use_categories', rcube_utils::INPUT_POST, true), 0);
$discovery = new carddav_discovery();
$srvs = $discovery->find_addressbooks($srv, $usr, $pass);
@@ -550,7 +550,7 @@ function cd_save($args)
'password' => $pass,
'use_categories' => $use_categories,
'url' => $srv['href'],
- 'refresh_time' => rcube_utils::get_input_value('new_cd_refresh_time', RCUBE_INPUT_POST)
+ 'refresh_time' => rcube_utils::get_input_value('new_cd_refresh_time', rcube_utils::INPUT_POST)
));
}
} else {