Ticket #3000 (new defect)

Opened 7 months ago

Last modified 3 months ago

Search fails when the Wiki _and_ Doxygen has results for a keyword

Reported by: mgerth@igd.fraunhofer.de Assigned to: cboos
Priority: normal Component: DoxygenPlugin
Severity: normal Keywords: doxygen search datetime
Cc: Trac Release: 0.11

Description

The problem is a "datetime.datetime <-> int comparision error" because:

1. The default date-format of the ISearchSource is datetime

2. DoxygenPlugin returns the filedate (ctime) as int.

3. Trac compares both time-types to sort them, but fails because type datetime can not be compared with type int.

Here are the patch instructions for doxygentrac.py using the trac function to_datetime:

...
from trac.util.datefmt import to_timestamp, to_datetime, utc
...
def get_search_results(self, req, keywords, filters):
...
      if os.path.isdir(path):
                index = os.path.join(path, 'search.idx')
                if os.path.exists(index):
>>>>                creation = to_datetime(os.path.getctime(index))     <<<< 
                    for result in  self._search_in_documentation(doc, keywords):
                        result['url'] =  req.href.doxygen(doc) + '/' \
                          
...
 if os.path.exists(index):
>>>>                creation = to_datetime(os.path.getctime(index))  <<<< 
                for result in self._search_in_documentation('', keywords):
             

Attachments

Change History

05/08/08 08:40:08 changed by Blackhex

  • owner changed from Blackhex to cboos.

Yes, it's relict form 0.10 branch since none is really maintaining this plugin.


Add/Change #3000 (Search fails when the Wiki _and_ Doxygen has results for a keyword)




Change Properties
Action