aboutsummaryrefslogtreecommitdiff
path: root/p/api/pshb.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-09-24 20:43:52 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-09-24 20:43:52 +0200
commit0a79d4085b18c5607438f8ebd56543508e7db3a8 (patch)
treec411c89cdaaa8709e23a800bbe118aa93d149aac /p/api/pshb.php
parent6a812b0d31df275d9b8b211a90628400ee097644 (diff)
Refactor controller for actualize feed
Diffstat (limited to 'p/api/pshb.php')
-rw-r--r--p/api/pshb.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/p/api/pshb.php b/p/api/pshb.php
index 650767114..94a0068ed 100644
--- a/p/api/pshb.php
+++ b/p/api/pshb.php
@@ -88,9 +88,6 @@ if ($ORIGINAL_INPUT == '') {
Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');
$system_conf = Minz_Configuration::get('system');
$system_conf->auth_type = 'none'; // avoid necessity to be logged in (not saved!)
-Minz_Translate::init('en');
-Minz_Request::_param('ajax', true);
-$feedController = new FreshRSS_feed_Controller();
$simplePie = customSimplePie();
$simplePie->set_raw_data($ORIGINAL_INPUT);
@@ -106,7 +103,6 @@ if ($self !== base64url_decode($canonical64)) {
//die('Self URL does not match registered canonical URL!');
$self = base64url_decode($canonical64);
}
-Minz_Request::_param('url', $self);
$nb = 0;
foreach ($users as $userFilename) {
@@ -121,7 +117,8 @@ foreach ($users as $userFilename) {
join_path(USERS_PATH, $username, 'config.php'),
join_path(USERS_PATH, '_', 'config.default.php'));
FreshRSS_Context::init();
- if ($feedController->actualizeAction($simplePie) > 0) {
+ list($updated_feeds, $feed) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie);
+ if ($updated_feeds > 0) {
$nb++;
}
} catch (Exception $e) {