Edgewall Software

Changes between Initial Version and Version 1 of TracDev/ApiChanges/0.10


Ignore:
Timestamp:
Aug 29, 2006, 2:49:20 PM (18 years ago)
Author:
Christian Boos
Comment:

Start to document some 0.9 → 0.10 API changes

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiChanges/0.10

    v1 v1  
     1= TracDev/ApiChanges/0.10 =
     2
     3This page is aimed to help plugin developers to port their 0.9 plugin to Trac 0.10.
     4
     5== General Changes ==
     6
     7The most important single change in 0.10 was the switch to using `unicode` everywhere internally.
     8
     9See TracDev/UnicodeGuidelines.
     10
     11== Interface Changes ==
     12
     13=== `ISearchSource` ^[source:trunk/trac/Search.py@head#L30 (0.10)] [source:branches/0.9-stable/trac/Search.py@head#L29 (0.9)]^ === #ISearchSource
     14
     15The `get_search_results(self, req, terms, filters)` now takes a list of `terms` instead of the full `query`, as it used to do for its second argument.
     16
     17Example: [trachacks:DoxygenPlugin]
     18{{{
     19#!diff
     20--- doxygentrac/doxygentrac.py      Tue Aug 29 14:03:33 2006 +0200
     21+++ doxygentrac/doxygentrac.py      Tue Aug 29 14:04:10 2006 +0200
     22@@ -212,13 +212,9 @@
     23 
     24             yield('doxygen', title)
     25 
     26-    def get_search_results(self, req, query, filters):
     27+    def get_search_results(self, req, keywords, filters):
     28         if not 'doxygen' in filters:
     29             return
     30-        if query[0] == query[-1] == "'" or query[0] == query[-1] == '"':
     31-            keywords = [query[1:-1]]
     32-        else:
     33-            keywords = query.split(' ')
     34 
     35         base_path = self.config.get('doxygen', 'path')
     36}}}
     37
     38
     39----
     40
     41See also: ["TracDev/ReleaseNotes/0.10"]