Ignore:
Timestamp:
11/24/05 14:59:34 (7 years ago)
Author:
moschny
Message:
  • Simplifications.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trac/trunk/wiki-macros/TracNav.py

    r3058 r3059  
    183183    preview = hdf.getValue('args.preview', "") 
    184184    curpage = hdf.getValue('wiki.page_name', "") 
    185     name = args 
    186     if not name: 
    187         name = 'TOC' 
     185    name = args or 'TOC' 
    188186 
    189187    toc = parse_toc(get_toc(hdf, env, curpage, name), env) 
     
    242240    html += '%s<ul>\n' % indentation(col) 
    243241    col += 1 
    244     html += display(env, curpage, toc, 0, col) 
     242    html += display(curpage, toc, 0, col) 
    245243    col -= 1 
    246244    html += '%s</ul>\n' % indentation(col) 
     
    249247    return html 
    250248 
    251 def display(env, curpage, toc, depth, col): 
     249def display(curpage, toc, depth, col): 
    252250    html = '' 
    253251    for name, title, sub in toc: 
     
    272270            html += '%s</li>\n' % indentation(col) 
    273271            if len(sub) > 0: 
    274                 html += display(env, curpage, sub, depth + 1, col) 
     272                html += display(curpage, sub, depth + 1, col) 
    275273    return html 
    276274 
Note: See TracChangeset for help on using the changeset viewer.