From e2bcd11bb1f5427af08f97fe04afc63d73efce7e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Apr 2011 09:42:15 +0400 Subject: add a sanity check for CURL when using pubsubhubbub --- config.php-dist | 8 ++++---- sanity_check.php | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config.php-dist b/config.php-dist index 87429d136..e9ea0a67a 100644 --- a/config.php-dist +++ b/config.php-dist @@ -188,14 +188,14 @@ // Your OAuth instance authentication information for Twitter, visit // http://twitter.com/oauth_clients to register your instance. - define('ISCONFIGURED', false); - // Please set this to true if you have read everything above and - // finished setting configuration options. - define('PUBSUBHUBBUB_HUB', ''); // URL to a PubSubHubbub-compatible hub server. If defined, Published // articles generated feeds would automatically become PUSH-enabled. + define('ISCONFIGURED', false); + // Please set this to true if you have read everything above and + // finished setting configuration options. + define('CONFIG_VERSION', 22); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/sanity_check.php b/sanity_check.php index 4cb74259d..80796b0d4 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -143,6 +143,10 @@ $err_msg = "php.ini: Safe mode is not supported. If you wish to continue, remove this test from sanity_check.php and proceeed at your own risk. Please note that your bug reports will not be accepted or reviewed."; } + if (PUBSUBHUBBUB_HUB && !function_exists("curl_init")) { + $err_msg = "PUBSUBHUBBUB_HUB is defined, but CURL functions are not found. CURL is required for PubSubHubbub support."; + } + if ($err_msg) { print "Fatal Error: $err_msg\n"; exit; -- cgit v1.2.3