Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Commit

Permalink
ADDED: limit in updateAllrank,& schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Bernard committed Oct 11, 2006
1 parent 793ca3a commit 1b22f55
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions web/ryzom_com/RingRanking/RingRanking.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
i18n_domain="RingRanking",
),
),
IntegerField('limit',
default = 10,
widget=IntegerWidget(
label='Limite',
label_msgid="RingRanking_schema_label_limit",
description="Nombre d'auteur, scenario visible dans le Classement",
description_msgid="RingRanking_schema_limit",
i18n_domain="RingRanking",
),
),
))


Expand Down Expand Up @@ -105,10 +115,11 @@ def initializeArchetype(self, **kwargs):
security.declareProtected(CMFCorePermissions.ModifyPortalContent, 'updateAllRank')
def updateAllRank(self):
"""update all ranking in the content"""
result = []
result = []
limit = int(self.getLimit())
for name in self.content:
obj = getattr(self.aq_inner.aq_explicit, name)
result.append(obj.update())
result.append(obj.update(limit))
return result


Expand Down

0 comments on commit 1b22f55

Please sign in to comment.