comparison MoinMoin/Page.py @ 3085:fdb68a8f92da

fix wrong pagename when creating new pages on Mac OS X (ported from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 00:28:53 +0100
parents 6238e1b2fd7f
children a48929a5036c
comparison
equal deleted inserted replaced
3084:a6aaae4bded0 3085:fdb68a8f92da
336 confusion in urls, links and logs. 336 confusion in urls, links and logs.
337 See MoinMoinBugs/MacHfsPlusCaseInsensitive 337 See MoinMoinBugs/MacHfsPlusCaseInsensitive
338 338
339 Correct the case of the page name. Elements created from the 339 Correct the case of the page name. Elements created from the
340 page name in reset() are not updated because it's too messy, and 340 page name in reset() are not updated because it's too messy, and
341 this fix seems to be enough for 1.3. 341 this fix seems to be enough for now.
342 342
343 Problems to fix later: 343 Problems to fix later:
344 344
345 - ["helponnavigation"] link to HelpOnNavigation but not 345 - ["helponnavigation"] link to HelpOnNavigation but not
346 considered as backlink. 346 considered as backlink.
347 347
348 @param pagedir: the storage path to the page directory 348 @param pagedir: the storage path to the page directory
349 """ 349 """
350 realPath = util.filesys.realPathCase(pagedir) 350 if self._text_filename_force is None:
351 if not realPath is None: 351 # we only do this for normal pages, but not for the MissingPage,
352 realPath = wikiutil.unquoteWikiname(realPath) 352 # because the code below is wrong in that case
353 self.page_name = realPath[-len(self.page_name):] 353 realPath = util.filesys.realPathCase(pagedir)
354 if realPath is not None:
355 realPath = wikiutil.unquoteWikiname(realPath)
356 self.page_name = realPath[-len(self.page_name):]
354 357
355 def get_rev(self, use_underlay=-1, rev=0): 358 def get_rev(self, use_underlay=-1, rev=0):
356 """ Get information about a revision. 359 """ Get information about a revision.
357 360
358 filename, number, and (existance test) of this page and revision. 361 filename, number, and (existance test) of this page and revision.