Bläddra i källkod

Fix API bug with EasyRSS (#1800)

Regression in FreshRSS 1.10.0
https://github.com/FreshRSS/FreshRSS/issues/1799
Alexandre Alapetite 8 år sedan
förälder
incheckning
cb1c788c8a
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      p/api/greader.php

+ 3 - 3
p/api/greader.php

@@ -445,6 +445,9 @@ function unreadCount() {	//http://blog.martindoms.com/2009/10/16/using-the-googl
 }
 
 function entriesToArray($entries) {
+	$feedDAO = FreshRSS_Factory::createFeedDao();
+	$arrayFeedCategoryNames = $feedDAO->arrayFeedCategoryNames();
+
 	$items = array();
 	foreach ($entries as $entry) {
 		$f_id = $entry->feed();
@@ -494,9 +497,6 @@ function streamContents($path, $include_target, $start_time, $count, $order, $ex
 //http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed
 	header('Content-Type: application/json; charset=UTF-8');
 
-	$feedDAO = FreshRSS_Factory::createFeedDao();
-	$arrayFeedCategoryNames = $feedDAO->arrayFeedCategoryNames();
-
 	switch ($path) {
 		case 'reading-list':
 			$type = 'A';