Compare commits

...

5 Commits

Author SHA1 Message Date
Nick v H
63128ae2fd Merge branch 'master' into 'master'
Enclose XML response to only contain the XML tags (trimming any possible...

See merge request davical-project/davical!82
2025-01-26 14:22:46 +00:00
Andrew Ruthven
734d5c1f99 The public access endpoint is public.php 2025-01-22 14:48:24 +13:00
Andrew Ruthven
11315dee47 Fix deprecation warning for explicit nullable type. 2024-12-30 20:17:22 +13:00
Andrew Ruthven
a9ffb1e67c We need rst2pdf installed for testing
Looks like this has been removed as a dependency from a package.
2024-12-30 20:17:18 +13:00
Nick v H
5920fe1efe Enclose XML response to only contain the XML tags (trimming any possible trailing characters after the last XML tag) 2021-09-20 19:04:42 +00:00
5 changed files with 9 additions and 5 deletions

View File

@ -11,7 +11,7 @@ build:
script:
- apt-get -y update
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz php-cli phpunit
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz php-cli phpunit rst2pdf
- mv debian/changelog debian/changelog.old
- >
cat
@ -82,7 +82,7 @@ build_bullseye_latestphp:
script:
- apt-get -y update
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz rst2pdf
- mv debian/changelog debian/changelog.old
- >
cat

View File

@ -1,3 +1,6 @@
2025-01-22 Andrew Ruthven <andrew@etc.gen.nz>
* Using a Ticket ID requires public.php
2024-04-15 Andrew Ruthven <andrew@etc.gen.nz>
* Add caching of user credential success/failure

View File

@ -173,7 +173,7 @@ class DAVResource
* field of the resource is populated with the given data, so it does not need
* to be queried again later
*/
function __construct( $parameters = null, DAVResource $prefetched_collection = null ) {
function __construct( $parameters = null, ?DAVResource $prefetched_collection = null ) {
$this->exists = null;
$this->bound_from = null;
$this->dav_name = null;

View File

@ -119,12 +119,13 @@ class CalDAVClient {
*/
function ParseResponse( $response ) {
$pos = strpos($response, '<?xml');
$epos = strrpos($response, '>');
if ($pos === false) {
$this->httpResponse = trim($response);
}
else {
$this->httpResponse = trim(substr($response, 0, $pos));
$this->xmlResponse = trim(substr($response, $pos));
$this->xmlResponse = trim(substr($response, $pos, $epos-$pos+1));
}
}

View File

@ -463,7 +463,7 @@ EOTEMPLATE;
if ($can_write_collection) {
$browser->AddColumn( 'ticket_id', translate('Ticket ID'), '', '' );
}
$browser->AddColumn( 'target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "'".$c->base_url.'/caldav.php'."' ||COALESCE(d.dav_name,c.dav_name)" );
$browser->AddColumn( 'target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "'".$c->base_url.'/public.php'."' ||COALESCE(d.dav_name,c.dav_name)" );
$browser->AddColumn( 'expiry', translate('Expires'), '', '', 'TO_CHAR(expires,\'YYYYMMDD"T"HH:MI:SS\')');
$browser->AddColumn( 'privs', translate('Privileges'), '', '', "privileges_list(privileges)" );
if ($can_write_collection) {