Page(pagename).send_atom()
def handle_edit(pagename, form):
- pg = Page(form['q'].value)
+ pg = Page(pagename)
if 'save' in form:
if form['file'].value:
pg.save(form['file'].file.read(), form['changelog'].value)
except IOError, err:
if err.errno == errno.ENOENT:
if default is None:
- default = '//[[?a=edit&q=%s|Describe %s]]//' % (self.page_name, self.page_name)
+ default = '//[[%s?a=edit|Describe %s]]//' % (self.page_name, self.page_name)
return default
if err.errno == errno.EISDIR:
return self.format_dir()
editable = name and self.can_write() and is_privileged()
if editable:
print(' <link rel="alternate" type="application/x-wiki" title="Edit this page" href="%s" />' \
- % relative_url('?a=edit&q=' + name, privileged=True))
+ % relative_url(name + '?a=edit', privileged=True))
history = config_get('history_url')
if history is not None:
# BODY
if editable:
- print('<body ondblclick="location.href=\'' + relative_url('?a=edit&q=' + name, privileged=True) + '\'">')
+ print('<body ondblclick="location.href=\'' + relative_url(name + '?a=edit', privileged=True) + '\'">')
else:
print('<body>')
print(' | ' + link_tag(name + '?a=raw', 'Raw Text', cssclass='navlink'))
if config_get('privileged_url') is not None:
if self.can_write():
- print(' | ' + link_tag('?a=edit&q=' + name, 'Edit', cssclass='navlink', privileged=True))
+ print(' | ' + link_tag(name + '?a=edit', 'Edit', cssclass='navlink', privileged=True))
else:
- print(' | ' + link_tag(name, 'Login', cssclass='navlink', privileged=True))
+ print(' | ' + link_tag(name, 'Login', cssclass='login', privileged=True))
user = remote_user()
if user != 'AnonymousCoward':
- print(' | <span class="login"><i><b>' + link_tag('User/' + user, user) + '</b></i></span>')
+ print(' | ' + link_tag('user/' + user, user, cssclass='login'))
print('<hr /></div></nav>')