--- feedapi.module	2008-12-30 04:31:34.000000000 -0500
+++ feedapi.module.new	2009-01-15 21:13:25.000000000 -0500
@@ -96,6 +96,18 @@ function feedapi_menu() {
     'access callback' => '_feedapi_op_access',
     'access arguments' => array(1),
   );
+  $items['user/%user/feeds'] = array(
+    'type' => MENU_LOCAL_TASK,
+    'title' => variable_get('feedapi_user_ui_title', 'Feeds'), //Going to be a variable on the main setting page
+    'page callback' => 'feedapi_admin_overview',
+    'access callback' => TRUE,  //security is built into the function since this displays on the user profile page
+    'page arguments' => array(1), //pass the account
+  );
+  $items['user/%user/feeds/overview'] = array(
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'title' => 'Overview',
+    'weight' => -10,
+  );
   return $items;
 }
 
@@ -686,7 +698,7 @@ function feedapi_cron_time() {
 /**
  * Provide a UI for overviewing the existing feeds
  */
-function feedapi_admin_overview() {
+function feedapi_admin_overview($account) {
   $header = array(
     t('Title'),
     t('Last refresh'),
@@ -697,15 +709,24 @@ function feedapi_admin_overview() {
     t('Commands'),
   );
   $rows = array();
-  $result = pager_query("SELECT nid from {feedapi} ORDER BY checked DESC", 50, 0, "SELECT count(*) FROM {feedapi}");
+  //check to see if account variable was passed.
+  //if so then only bring back the nid where the nid is the author
+  if (!isset($account)) {
+    $result = pager_query("SELECT nid from {feedapi} ORDER BY checked DESC", 50, 0, "SELECT count(*) FROM {feedapi}");
+  }
+  else {
+    $sql = sprintf("SELECT feedapi.nid AS nid FROM {feedapi} INNER JOIN {node} ON {feedapi}.nid = {node}.nid WHERE ({node}.uid = %d) ORDER BY {feedapi}.checked DESC", $account->uid);
+    $sql_count = sprintf("SELECT count(*) FROM {feedapi} INNER JOIN {node} ON {feedapi}.nid = {node}.nid WHERE ({node}.uid = %d)", $account->uid);
+    $result = pager_query($sql, 50, 0, $sql_count);
+  }
   while ($nid = db_fetch_array($result)) {
     $nid = $nid['nid'];
     $node = node_load($nid);
     if (is_object($node)) {
-      $commands = array(l(t('Delete'), 'node/'. $node->nid .'/delete', array('query' => 'destination=admin/content/feed')),
-        l(t('Remove items'), 'node/'. $node->nid .'/purge', array('query' => 'destination=admin/content/feed')),
-        l(t('Refresh'), 'node/'. $node->nid .'/refresh'),
-        l(t('Edit'), 'node/'. $node->nid .'/edit'),
+      $commands = array(l(t('Delete'), 'node/'. $node->nid .'/delete', array('query' => 'destination=' . $_REQUEST[q])),
+        l(t('Remove items'), 'node/'. $node->nid .'/purge', array('query' => 'destination=' . $_REQUEST[q])),
+        l(t('Refresh'), 'node/'. $node->nid .'/refresh', array('query' => 'destination=' . $_REQUEST[q])),
+        l(t('Edit'), 'node/'. $node->nid .'/edit', array('query' => 'destination=' . $_REQUEST[q])),
       );
       // Fetch statistics for this feed
       foreach (array('download_num', 'new',  'process_time', 'update_times') as $type) {
@@ -818,6 +839,13 @@ function feedapi_admin_settings() {
     '#default_value' => variable_get('feedapi_allow_html_all', FALSE),
     '#description' => t('In this case the module does\'t filter any HTML elements from the incoming fields. This checkbox overrides the above list of allowed tags.')
   );
+  //Customize title in the user profile page
+  $form['feedapi_user_ui_title'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Title in User Menu'),
+    '#default_value' => variable_get('feedapi_user_ui_title', 'Feeds'),
+    '#description' => t('This is the tab title in the user profile'),
+  );
   if (variable_get('feedapi_allow_html_all', FALSE)) {
     $form['feedapi_allowed_html_tags']['#disabled'] = TRUE;
   }
