changeset 1698:35ebda626b4b

getPageBasePath: add default value for use_underlay and improve docstring
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 19 Dec 2006 09:37:28 +0100
parents 7c58e8af1a97
children 66f2ea899da7
files MoinMoin/Page.py
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Thu Dec 07 21:35:43 2006 +0100
+++ b/MoinMoin/Page.py	Tue Dec 19 09:37:28 2006 +0100
@@ -313,15 +313,15 @@
             return self.current_rev()
         return self.rev
 
-    def getPageBasePath(self, use_underlay):
+    def getPageBasePath(self, use_underlay=-1):
         """
         Get full path to a page-specific storage area. `args` can
         contain additional path components that are added to the base path.
 
-        @param use_underlay: force using a specific pagedir, default '-1'
-                                '-1' = automatically choose page dir
-                                '1' = use underlay page dir
-                                '0' = use standard page dir
+        @param use_underlay: force using a specific pagedir, default -1
+                                -1 = automatically choose page dir
+                                1 = use underlay page dir
+                                0 = use standard page dir
         @rtype: string
         @return: int underlay,
                  str the full path to the storage area
@@ -1598,15 +1598,16 @@
         page_name = u''
         Page.__init__(self, request, page_name)
 
-    def getPageBasePath(self, use_underlay):
+    def getPageBasePath(self, use_underlay=0):
         """
         Get full path to a page-specific storage area. `args` can
         contain additional path components that are added to the base path.
 
-        @param use_underlay: force using a specific pagedir, default '-1'
-                                '-1' = automatically choose page dir
-                                '1' = use underlay page dir
-                                '0' = use standard page dir
+        @param use_underlay: force using a specific pagedir, default 0:
+                                1 = use underlay page dir
+                                0 = use standard page dir
+                                Note: we do NOT have special support for -1
+                                      here, that will just behave as 0!
         @rtype: string
         @return: int underlay,
                  str the full path to the storage area