]> git.wh0rd.org - tt-rss.git/commitdiff
add a sanity check for CURL when using pubsubhubbub
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 1 Apr 2011 05:42:15 +0000 (09:42 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 1 Apr 2011 05:42:15 +0000 (09:42 +0400)
config.php-dist
sanity_check.php

index 87429d1367257663940886ae95c64d79315f5143..e9ea0a67aa43e61a56ee8298bb83e6ddc227c2e8 100644 (file)
        // 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).
index 4cb74259d997e51d5771544267ec1d0022f0ea9a..80796b0d4dca14c19e693403a88efd4b2c289821 100644 (file)
                $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 "<b>Fatal Error</b>: $err_msg\n";
                exit;