If curl is missing, complain, loudly

As requested on #175,
This commit is contained in:
Andrew Ruthven 2024-02-04 01:39:57 +13:00
parent 0a4471ab06
commit c75e7aee29

View File

@ -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 )';