1
0

PHP 5.3 compatibility, upgrade Smarty to 2.6.26

This commit is contained in:
Garvin Hicking
2009-07-14 11:40:16 +00:00
parent a1388d2f15
commit 677df54625
18 changed files with 117 additions and 74 deletions

View File

@ -533,7 +533,7 @@ var $filter_defaults;
} else {
$this->log($this->logfile, $eventData['id'], 'AKISMET_SERVER', 'Using Akismet server at ' . $server, $addData);
}
$req = &new HTTP_Request(
$req = new HTTP_Request(
'http://' . $server . '/1.1/verify-key',
$opt
);
@ -558,7 +558,7 @@ var $filter_defaults;
break;
}
$req = &new HTTP_Request(
$req = new HTTP_Request(
'http://' . $api_key . '.' . $server . '/1.1/comment-check',
$opt
);
@ -602,7 +602,7 @@ var $filter_defaults;
} else {
$data = '';
$req = &new HTTP_Request('http://spam.blogg.de/blacklist.txt');
$req = new HTTP_Request('http://spam.blogg.de/blacklist.txt');
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
if (file_exists($target) && filesize($target) > 0) {
@ -978,7 +978,7 @@ var $filter_defaults;
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
if (function_exists('serendipity_request_start')) serendipity_request_start();
$req = &new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5, 'readTimeout' => array(5,0)));
$req = new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5, 'readTimeout' => array(5,0)));
$is_valid = false;
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
$is_valid = false;

View File

@ -397,7 +397,7 @@ class serendipity_event_spartacus extends serendipity_event
serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus');
serendipity_request_start();
$req = &new HTTP_Request($url, $options);
$req = new HTTP_Request($url, $options);
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
$resolved_url = $url . ' (IP ' . $url_ip . ')';
@ -441,7 +441,7 @@ class serendipity_event_spartacus extends serendipity_event
$health_options = $options;
serendipity_plugin_api::hook_event('backend_http_request', $health_options, 'spartacus_health');
$health_req = &new HTTP_Request($health_url, $health_options);
$health_req = new HTTP_Request($health_url, $health_options);
$health_result = $health_req->sendRequest();
if (PEAR::isError($health_result)) {
$fp = @fsockopen('www.google.com', 80, $errno, $errstr);

View File

@ -48,7 +48,7 @@ class s9y_remoterss_XMLTree {
function GetXMLTree($file) {
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
serendipity_request_start();
$req = &new HTTP_Request($file);
$req = new HTTP_Request($file);
if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
$data = file_get_contents($file);
@ -424,7 +424,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin {
return true;
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
serendipity_request_start();
$req = &new HTTP_Request($uri);
$req = new HTTP_Request($uri);
if (PEAR::isError($req->sendRequest()) || !preg_match('@^[23]..@', $req->getResponseCode())) {
serendipity_request_end();
@ -494,7 +494,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin {
// Touching the feedcache file will prevent loops of death when the RSS target is the same URI than our blog.
@touch($feedcache);
require_once S9Y_PEAR_PATH . 'Onyx/RSS.php';
$c = &new Onyx_RSS($charset);
$c = new Onyx_RSS($charset);
$this->debug('Running Onyx Parser');
$c->parse($rssuri);
$this->encoding = $c->rss['encoding'];