projects
/
Portfolio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df7e1f0
)
Retour des uids des portfolios.
author
Benoît Pin
<benoit.pin@gmail.com>
Wed, 27 Oct 2010 22:19:02 +0000
(
00:19
+0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Wed, 27 Oct 2010 22:19:02 +0000
(
00:19
+0200)
skins/lrservice.py
patch
|
blob
|
history
diff --git
a/skins/lrservice.py
b/skins/lrservice.py
index
d41d355
..
fdebcad
100644
(file)
--- a/
skins/lrservice.py
+++ b/
skins/lrservice.py
@@
-12,7
+12,7
@@
fg = context.REQUEST.form.get
method = fg('method')
if method == 'normaliseAndCreatePath' :
method = fg('method')
if method == 'normaliseAndCreatePath' :
- normalizedPath
=
[]
+ normalizedPath
, uids = [],
[]
o = portal
path = fg('path', '').split(' ') # séparateur : 0x09 (tabulation)
for part in path :
o = portal
path = fg('path', '').split(' ') # séparateur : 0x09 (tabulation)
for part in path :
@@
-24,8
+24,10
@@
if method == 'normaliseAndCreatePath' :
id = o.invokeFactory('Portfolio', validId, title=part)
o = o[id]
normalizedPath.append(id)
id = o.invokeFactory('Portfolio', validId, title=part)
o = o[id]
normalizedPath.append(id)
+ uid = uidtool.register(o)
+ uids.append(uid)
- return '
/'.join(normalizedPath
)
+ return '
%s\n%s' % ('/'.join(normalizedPath), ' '.join([str(uid) for uid in uids])
)
elif method == 'uploadPhoto' :
path = fg('normalizedPath')
elif method == 'uploadPhoto' :
path = fg('normalizedPath')