Index: search_by_page.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/search_by_page/search_by_page.module,v
retrieving revision 1.1.2.31
diff -u -r1.1.2.31 search_by_page.module
--- search_by_page.module	28 May 2010 23:42:10 -0000	1.1.2.31
+++ search_by_page.module	15 Jun 2010 16:47:04 -0000
@@ -467,18 +467,20 @@
   $save_user = $user;
   $save_language = $language;
   $save_get = $_GET;
+  $save_sessions = session_save_session();
 
-  // Rebuild the list of paths to index
+  // Rebuild the list of paths to index.
   _search_by_page_rebuild_all_paths();
   $users = _search_by_page_indexing_users();
 
   // Figure out which pages to index this run - the ones that haven't been
-  // indexed recently, up to limits of cron
+  // indexed recently, up to limits of cron.
 
   $limit = (int) variable_get('search_cron_limit', 100);
   $result = db_query_range('SELECT * FROM {sbp_path} p ORDER BY p.last_index_time', 0, $limit);
 
-  // Index each page
+  // Index each page, but don't save sessions for the indexing users.
+  session_save_session(FALSE);
 
   $reasons = array(
     MENU_ACCESS_DENIED => t('access denied'),
@@ -576,6 +578,7 @@
   $user = $save_user;
   user_access('', $user, TRUE);
   $language = $save_language;
+  session_save_session($save_sessions);
 }
 
 /**
