Version 1.0 ()
------------------------------------------------------------------------
+ * Add new plugin hook "backend_http_request" which passes PEAR
+ HTTP_Request options to plugins for modification. $addData contains
+ the source of where a request is being made (garvinhicking)
+
* Make WordPress importer not fail on the missing "user_level" column
for WordPress 2.0 (garvinhicking)
echo '(' . $target . ') ' . ERROR_FILE_EXISTS_ALREADY;
} else {
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
- $req = &new HTTP_Request($serendipity['POST']['imageurl']);
+ $options = array();
+ serendipity_plugin_api::hook_event('backend_http_request', $options, 'image');
+ $req = &new HTTP_Request($serendipity['POST']['imageurl'], $options);
// Try to get the URL
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
$uri = $target['scheme'] . '://' . $target['host'] . ':' . $target['port'] . $target['path'] . $target['query'];
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
- $req = &new HTTP_Request($uri, array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'POST'));
+ $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'POST');
+ serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_send');
+ $req = &new HTTP_Request($uri, $options);
$req->addRawPostData($data, true);
$res = $req->sendRequest();
$parsed_loc = $u['scheme'] . '://' . $u['host'] . $port . $u['path'];
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
- $req = &new HTTP_Request($parsed_loc, array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'GET'));
+ $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'GET');
+ serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_detect');
+ $req = &new HTTP_Request($parsed_loc, $options);
$res = $req->sendRequest();
if (PEAR::isError($res)) {
echo '<br />';
} else {
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
- $req = &new HTTP_Request($url);
+ $options = array();
+ serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus');
+ $req = &new HTTP_Request($url, $options);
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
printf(PLUGIN_EVENT_SPARTACUS_FETCHERROR, $url);
# 15 second timeout may not be long enough for weblogs.com
$message->createPayload();
- $req = new HTTP_Request("http://".$service['host'].$service['path']);
+ $options = array();
+ serendipity_plugin_api::hook_event('backend_http_request', $options, 'weblogping');
+ $req = new HTTP_Request("http://".$service['host'].$service['path'], $options);
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addHeader("Content-Type", "text/xml");
if (strtoupper(LANG_CHARSET) != 'UTF-8') {