Commit 64ce2548 authored by Bartek Górny's avatar Bartek Górny

check "mine" two ways - it is different in form and web interfaces

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10710 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 124b96d7
......@@ -75,6 +75,7 @@ mine=context.REQUEST.get(\'mine\',\'\')\n
if kw.get(\'SearchableText\',\'\')==\'\' and mine==\'\':return []\n
\n
args=context.parseSearchString(kw.get(\'SearchableText\',\'\'))\n
\n
if not args.has_key(\'portal_type\') or args[\'portal_type\']==():\n
args[\'portal_type\']=context.getPortalDocumentTypeList()\n
cats=[]\n
......@@ -111,7 +112,7 @@ if wheres!=[]:\n
\n
res=context.portal_catalog(**kw)\n
\n
if mine!=\'\': # user wants only his documents\n
if mine not in (0,\'\'): # user wants only his documents\n
from AccessControl import getSecurityManager\n
sm=getSecurityManager()\n
u=sm.getUser()\n
......@@ -136,6 +137,12 @@ return res\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment