mail/roundcube-carddav: fix unparenthesized deprecation warn in php74
Reported by: David Gessel <gessel@blackrosetech.com> Obtained from: https://github.com/mstilkerich/rcmcarddav/commit/b66791
This commit is contained in:
parent
b27fb28f77
commit
966e11b026
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=557426
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= carddav
|
||||
PORTVERSION= 3.0.3
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= https://github.com/blind-coder/rcmcarddav/releases/download/v${PORTVERSION}/
|
||||
PKGNAMEPREFIX= roundcube-
|
||||
|
20
mail/roundcube-carddav/files/patch-carddav.php
Normal file
20
mail/roundcube-carddav/files/patch-carddav.php
Normal file
@ -0,0 +1,20 @@
|
||||
--- carddav.php.orig 2020-12-10 08:52:54 UTC
|
||||
+++ carddav.php
|
||||
@@ -349,8 +349,15 @@ class carddav extends rcube_plugin
|
||||
|
||||
if (self::no_override('username', $abook, $prefs)) {
|
||||
// %V parses username for macosx, replaces periods and @ by _, work around bugs in contacts.app
|
||||
- $content_username = $abook['username'] === '%V' ? str_replace('@','_', str_replace('.','_',$_SESSION['username'])) : $abook['username'] === '%u' ? $_SESSION['username'] : $abook['username'] === '%l' ? $rcmail->user->get_username('local') : $abook['username'];
|
||||
-
|
||||
+ if ($abook['username'] === '%V') {
|
||||
+ $content_username = str_replace('@','_', str_replace('.','_',$_SESSION['username']));
|
||||
+ } elseif ($abook['username'] === '%u') {
|
||||
+ $content_username = $_SESSION['username'];
|
||||
+ } elseif ($abook['username'] === '%l') {
|
||||
+ $content_username = $rcmail->user->get_username('local');
|
||||
+ } else {
|
||||
+ $content_username = $abook['username'];
|
||||
+ }
|
||||
} else {
|
||||
// input box for username
|
||||
$input = new html_inputfield(array('name' => $abookid.'_cd_username', 'type' => 'text', 'autocomplete' => 'off', 'value' => $abook['username']));
|
Loading…
Reference in New Issue
Block a user