diff options
author | zotlabs <mike@macgirvin.com> | 2019-04-24 16:21:13 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-04-24 16:21:13 -0700 |
commit | 831b9d443330cb806871ab06aaa977adafbe661e (patch) | |
tree | 4c067a3b701ea56f10070c386b26a30f93666eb0 /include | |
parent | e56c0a6251e8361ba65702151473a0560506db77 (diff) | |
parent | e937e8fff96a935b14a479c062f6b0d00b90b99d (diff) | |
download | volse-hubzilla-831b9d443330cb806871ab06aaa977adafbe661e.tar.gz volse-hubzilla-831b9d443330cb806871ab06aaa977adafbe661e.tar.bz2 volse-hubzilla-831b9d443330cb806871ab06aaa977adafbe661e.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-rwxr-xr-x | include/dba/dba_pdo.php | 18 | ||||
-rw-r--r-- | include/event.php | 4 |
2 files changed, 10 insertions, 12 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php index a70e4a1d7..0279342ec 100755 --- a/include/dba/dba_pdo.php +++ b/include/dba/dba_pdo.php @@ -161,23 +161,17 @@ class dba_pdo extends dba_driver { } function unescapebin($str) { - if($this->driver_dbtype === 'pgsql' && (! is_null($str))) { - $x = ''; - while(! feof($str)) { - $x .= fread($str,8192); + if($this->driver_dbtype === 'pgsql') { + if(gettype($str) === 'resource') { + $str = stream_get_contents($str); } - if(substr($x,0,2) === '\\x') { - $x = hex2bin(substr($x,2)); + if(substr($str,0,2) === '\\x') { + $str = hex2bin(substr($str,2)); } - return $x; - - } - else { - return $str; } + return $str; } - function getdriver() { return 'pdo'; } diff --git a/include/event.php b/include/event.php index 77118c329..cfca00a3c 100644 --- a/include/event.php +++ b/include/event.php @@ -1284,6 +1284,10 @@ function cdav_principal($uri) { } function cdav_perms($needle, $haystack, $check_rw = false) { + + if($needle == 'channel_calendar') + return true; + foreach ($haystack as $item) { if($check_rw) { if(is_array($item['id'])) { |