[Moin-devel] CVS: MoinMoin/parser wiki.py,1.65,1.66
J?rgen Hermann
jhermann at users.sourceforge.net
Tue Jan 22 14:21:04 EST 2002
Update of /cvsroot/moin/MoinMoin/parser
In directory usw-pr-cvs1:/tmp/cvs-serv8787/MoinMoin/parser
Modified Files:
wiki.py
Log Message:
Address attachments of other pages
Index: wiki.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/parser/wiki.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** wiki.py 2002/01/16 23:46:46 1.65
--- wiki.py 2002/01/22 22:20:57 1.66
***************
*** 161,164 ****
--- 161,171 ----
text = text or url
+ pagename = self.formatter.page.page_name
+ parts = string.split(url, '/')
+ if len(parts) > 1:
+ # get attachment from other page
+ pagename = string.join(parts[:-1], '/')
+ url = parts[-1]
+
import urllib
from MoinMoin.action import AttachFile
***************
*** 167,174 ****
if not kw.get('pretty_url', 0) and wikiutil.isPicture(url):
return self.formatter.image(border=0, alt=url,
! src=AttachFile.getAttachUrl(self.formatter.page.page_name, url))
return self.formatter.url(
! AttachFile.getAttachUrl(self.formatter.page.page_name, url),
text, pretty_url=kw.get('pretty_url', 0))
--- 174,181 ----
if not kw.get('pretty_url', 0) and wikiutil.isPicture(url):
return self.formatter.image(border=0, alt=url,
! src=AttachFile.getAttachUrl(pagename, url))
return self.formatter.url(
! AttachFile.getAttachUrl(pagename, url),
text, pretty_url=kw.get('pretty_url', 0))
More information about the Moin-devel
mailing list