From c75e7aee29eb6c396a2bcd9bc98449965254f02c Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 4 Feb 2024 01:39:57 +1300 Subject: [PATCH] If curl is missing, complain, loudly As requested on #175, --- inc/external-fetch.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/external-fetch.php b/inc/external-fetch.php index 87160e58..c1096136 100644 --- a/inc/external-fetch.php +++ b/inc/external-fetch.php @@ -14,7 +14,7 @@ function create_external ( $path,$is_calendar,$is_addressbook ) { global $request; if ( ! function_exists ( "curl_init" ) ) { - dbg_error_log("external", "external resource cannot be fetched without curl, please install curl"); + dbg_error_log("ERROR", "external: external resource cannot be fetched without curl, please install PHP curl"); $request->DoResponse( 503, translate('PHP curl support is required for external binds') ); return ; } @@ -42,7 +42,7 @@ function create_external ( $path,$is_calendar,$is_addressbook ) function fetch_external ( $bind_id, $min_age, $ua_string ) { if ( ! function_exists ( "curl_init" ) ) { - dbg_error_log("external", "external resource cannot be fetched without curl, please install curl"); + dbg_error_log("ERROR", "external: external resource cannot be fetched without curl, please install PHP curl"); $request->DoResponse( 503, translate('PHP curl support is required for external binds') ); return ; } @@ -114,7 +114,7 @@ function update_external ( $request ) if ( $c->external_refresh < 1 ) return ; if ( ! function_exists ( "curl_init" ) ) { - dbg_error_log("external", "external resource cannot be fetched without curl, please install curl"); + dbg_error_log("ERROR", "external: external resource cannot be fetched without curl, please install curl"); return ; } $sql = 'SELECT bind_id, external_url as url from dav_binding LEFT JOIN collection ON (collection.collection_id=bound_source_id) WHERE dav_binding.dav_name = :dav_name AND ( collection.modified + interval :interval < NOW() OR collection.modified is NULL )';