r13323 - in MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk: docs src/archetypes/referencebrowserwidget

"Tom Gross" <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: tom_gross
Date: Mon Dec  6 15:42:41 2010
New Revision: 13323

Modified:
   MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/docs/HISTORY.txt
   MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/src/archetypes/referencebrowserwidget/utils.py
Log:
documentation
small optimization: we don't need to call `checkPath`-method twice



Modified: MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/docs/HISTORY.txt
==============================================================================
--- MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/docs/HISTORY.txt	(original)
+++ MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/docs/HISTORY.txt	Mon Dec  6 15:42:41 2010
@@ -14,6 +14,9 @@
   templates. Fixes http://dev.plone.org/plone/ticket/11297
   [tom_gross]
 
+* Cleaned breadcrumb code Fixes https://dev.plone.org/plone/ticket/11289
+  [tom_gross]
+
 2.0 - 06.09.2010
 ----------------
 

Modified: MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/src/archetypes/referencebrowserwidget/utils.py
==============================================================================
--- MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/src/archetypes/referencebrowserwidget/utils.py	(original)
+++ MoreFieldsAndWidgets/archetypes.referencebrowserwidget/trunk/src/archetypes/referencebrowserwidget/utils.py	Mon Dec  6 15:42:41 2010
@@ -98,13 +98,15 @@
                 dopath = psplit[1].strip()
                 if checkPath(dopath) == dopath:
                     return filterPortalFactory(dopath)
-                else: return checkPath(dopath)
+                else:
+                    return checkPath(dopath)
 
         return filterPortalFactory(None)
 
     # If we have an absolute URL, return it relative to the portal root
-    if checkPath(directory) != directory:
-        return checkPath(directory)
+    checked = checkPath(directory)
+    if checked != directory:
+        return checked
 
     # Else, if we have a relative URL, get it relative to the context.
     return filterPortalFactory(directory)

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.