# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: feedapi.module
--- feedapi.module Base (BASE)
+++ feedapi.module Locally Modified (Based On LOCAL)
@@ -668,7 +668,17 @@
       '#options' => $period,
       '#default_value' => FEEDAPI_NEVER_DELETE_OLD,
     );
+    for($i=0;$i<100;$i++){
+      $options[] = $i;
   }
+    $form['max_items'] = array(
+      '#type' => 'select',
+      '#title' => t('Maximum number of items'),
+      "#description" => t('Choose the maximum number of items to return for this feed. Set at 0 to return all items.'),
+      '#options' => $options,
+      '#default_value' => 0,
+    );
+  }
   return $form;
 }
 
@@ -1045,6 +1055,11 @@
     }
   }
 
+  // truncate to max items
+  if($feed->settings[max_items]){
+    $feed->items = array_slice($feed->items, 0, $feed->settings[max_items]);
+  }
+
   if (isset($feed->items)) {
     for ($i = 0; $i < count($feed->items); $i++) {
       $feed->items[$i]->title = _feedapi_process_text($feed->items[$i]->title, array());
