projects
/
Portfolio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Factorisation / bugfix.
[Portfolio.git]
/
skins
/
getSelectionPhotosInfos.py
diff --git
a/skins/getSelectionPhotosInfos.py
b/skins/getSelectionPhotosInfos.py
index
80c52f9
..
362f76d
100644
(file)
--- a/
skins/getSelectionPhotosInfos.py
+++ b/
skins/getSelectionPhotosInfos.py
@@
-1,8
+1,6
@@
##parameters=pho_start=None, batch_size=None
from Products.CMFCore.utils import getToolByName
from Products.Plinn.PloneMisc import Batch
##parameters=pho_start=None, batch_size=None
from Products.CMFCore.utils import getToolByName
from Products.Plinn.PloneMisc import Batch
-from Products.Portfolio.utils import translate
-def _(message) : return translate(message, context).encode('utf-8')
uidh = getToolByName(context, 'portal_uidhandler')
utool = getToolByName(context, 'portal_url')
uidh = getToolByName(context, 'portal_uidhandler')
utool = getToolByName(context, 'portal_url')
@@
-28,8
+26,9
@@
else :
selection = req.SESSION.get('objects_selection', [])
selection = req.SESSION.get('objects_selection', [])
-start = pho_start if pho_start is not None else 0
brains = [uidh.getBrain(uid) for uid in selection]
brains = [uidh.getBrain(uid) for uid in selection]
+start = pho_start if pho_start is not None else 0
+batch_size = batch_size if batch_size is not None else context.default_batch_size
batch = Batch(brains, batch_size, start, quantumleap=1)
cart = req.SESSION.get('cart', None)
batch = Batch(brains, batch_size, start, quantumleap=1)
cart = req.SESSION.get('cart', None)