web/request.py
branchstable
changeset 4864 e77d3e95872d
parent 4719 aaed3f813ef8
child 4868 e34cbd85d14d
equal deleted inserted replaced
4863:f6cf0fcd40ae 4864:e77d3e95872d
   285         if searchstate == 'normal':
   285         if searchstate == 'normal':
   286             breadcrumbs = self.get_session_data('breadcrumbs', None)
   286             breadcrumbs = self.get_session_data('breadcrumbs', None)
   287             if breadcrumbs is None:
   287             if breadcrumbs is None:
   288                 breadcrumbs = SizeConstrainedList(10)
   288                 breadcrumbs = SizeConstrainedList(10)
   289                 self.set_session_data('breadcrumbs', breadcrumbs)
   289                 self.set_session_data('breadcrumbs', breadcrumbs)
   290             breadcrumbs.append(self.url())
   290                 breadcrumbs.append(self.url())
       
   291             else:
       
   292                 url = self.url()
       
   293                 if breadcrumbs[-1] != url:
       
   294                     breadcrumbs.append(url)
   291 
   295 
   292     def last_visited_page(self):
   296     def last_visited_page(self):
   293         breadcrumbs = self.get_session_data('breadcrumbs', None)
   297         breadcrumbs = self.get_session_data('breadcrumbs', None)
   294         if breadcrumbs:
   298         if breadcrumbs:
   295             return breadcrumbs.pop()
   299             return breadcrumbs.pop()