X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FRSSCloud%2FLoggingAggregator.php;h=26fde9c3e2e90983835aa428ecbde70fd64b7fe6;hb=c97048d01bea468e0cf8865b60c3c250b4515c39;hp=c81a987f762cfae63e25434db072c1e66cbb05d2;hpb=48af79dbb4cf1b4f915bf0d3d05e9fe3770664df;p=quix0rs-gnu-social.git diff --git a/plugins/RSSCloud/LoggingAggregator.php b/plugins/RSSCloud/LoggingAggregator.php index c81a987f76..26fde9c3e2 100644 --- a/plugins/RSSCloud/LoggingAggregator.php +++ b/plugins/RSSCloud/LoggingAggregator.php @@ -47,7 +47,6 @@ if (!defined('STATUSNET')) { **/ class LoggingAggregatorAction extends Action { - var $challenge = null; var $url = null; @@ -58,7 +57,6 @@ class LoggingAggregatorAction extends Action * * @return boolean false if user doesn't exist */ - function prepare($args) { parent::prepare($args); @@ -79,22 +77,20 @@ class LoggingAggregatorAction extends Action * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->url)) { - $this->showError('Hey, you have to provide a url parameter.'); + $this->showError(_m('A URL parameter is required.')); return; } if (!empty($this->challenge)) { // must be a GET - if ($_SERVER['REQUEST_METHOD'] != 'GET') { - $this->showError('This resource requires an HTTP GET.'); + $this->showError(_m('This resource requires an HTTP GET.')); return; } @@ -104,19 +100,19 @@ class LoggingAggregatorAction extends Action } else { // must be a POST - if ($_SERVER['REQUEST_METHOD'] != 'POST') { - $this->showError('This resource requires an HTTP POST.'); + $this->showError(_m('This resource requires an HTTP POST.')); return; } header('Content-Type: text/xml'); - echo '' . "\n"; + Echo "\n"; } $this->ip = $_SERVER['REMOTE_ADDR']; - common_log(LOG_INFO, 'RSSCloud Logging Aggregator - ' . $this->ip . ' claims the feed at ' . + common_log(LOG_INFO, 'RSSCloud Logging Aggregator - ' . + $this->ip . ' claims the feed at ' . $this->url . ' has been updated.'); } @@ -127,7 +123,6 @@ class LoggingAggregatorAction extends Action * * @return void */ - function showError($msg) { header('HTTP/1.1 400 Bad Request'); @@ -135,5 +130,4 @@ class LoggingAggregatorAction extends Action echo "\n"; echo "\n"; } - -} \ No newline at end of file +}