You are not logged in Log in Join
You are here: Home » Members » chrisw » Squishdot » Patch for Squishdot.py » View File

Log in
Name

Password

 

Patch for Squishdot.py

File details
Size
1 K
File type
text/plain

File contents

--- Squishdot.py.old	Fri Jun  9 11:23:28 2000
+++ Squishdot.py	Fri Jun  9 11:40:21 2000
@@ -1043,6 +1043,20 @@
                 'title':   {'type':'string', 'optional':0, 'indexed':1},     
                 'subject':   {'type':'string', 'optional':0, 'indexed':1},     
                }     
+    def resolve_url(self, path, REQUEST):
+        """
+        Hack/Patch for SiteAccess
+        """
+        pparts = filter(None, split(path, '/'))
+        try:
+            obj = self
+            while pparts:
+                id = pparts.pop(0)
+                if id != self.id:
+                    obj = obj[id]
+            return obj
+        except:
+            return
      
 # Searchable interface helper classes
 
@@ -1086,7 +1100,6 @@
     def __len__(self):     
         return len(self._schema)     
 
-     
 class Posting(Persistent, Implicit):     
     """Squishdot Posting"""