Explorar o código

Google Reader API: work-around for News+ bug

https://github.com/noinnion/newsplus/issues/84#issuecomment-57834632
https://github.com/FreshRSS/FreshRSS/issues/443
Alexandre Alapetite %!s(int64=11) %!d(string=hai) anos
pai
achega
65b41af94d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      p/api/greader.php

+ 3 - 0
p/api/greader.php

@@ -467,6 +467,9 @@ function streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude
 	$entryDAO = FreshRSS_Factory::createEntryDao();
 	$ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, '', new FreshRSS_Search(''), $start_time);
 
+	if (empty($ids)) {	//For News+ bug https://github.com/noinnion/newsplus/issues/84#issuecomment-57834632
+		$ids[] = 0;
+	}
 	$itemRefs = array();
 	foreach ($ids as $id) {
 		$itemRefs[] = array(