Mercurial > libervia-web
comparison src/server/blog.py @ 705:531eacb82e9f
browser and server sides: renamed max to max_ after sat's changeset 1423 (882e5fabf68c)
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 04 Jun 2015 12:03:45 +0200 |
parents | 5319110a862c |
children | e9a6cbb924e6 |
comparison
equal
deleted
inserted
replaced
704:5319110a862c | 705:531eacb82e9f |
---|---|
161 item_id = request.postpath[1] | 161 item_id = request.postpath[1] |
162 except ValueError: | 162 except ValueError: |
163 pass | 163 pass |
164 | 164 |
165 rsm_ = self.parseURLParams(request, item_id) | 165 rsm_ = self.parseURLParams(request, item_id) |
166 max_items = int(rsm_['max']) | 166 max_items = int(rsm_['max_']) |
167 | 167 |
168 if atom is not None: | 168 if atom is not None: |
169 d.addCallbacks(self.render_atom_feed, self.render_error_blog, [request], None, [request, profile], None) | 169 d.addCallbacks(self.render_atom_feed, self.render_error_blog, [request], None, [request, profile], None) |
170 self.host.bridge.getGroupBlogsAtom(pub_jid.userhost(), rsm_, C.SERVICE_PROFILE, d.callback, d.errback) | 170 self.host.bridge.getGroupBlogsAtom(pub_jid.userhost(), rsm_, C.SERVICE_PROFILE, d.callback, d.errback) |
171 return | 171 return |
184 | 184 |
185 def parseURLParams(self, request, item_id): | 185 def parseURLParams(self, request, item_id): |
186 # retrieve RSM request data from URL parameters | 186 # retrieve RSM request data from URL parameters |
187 rsm_ = {} | 187 rsm_ = {} |
188 try: | 188 try: |
189 rsm_['max'] = request.args['max'][0] | 189 rsm_['max_'] = request.args['max'][0] |
190 except (ValueError, KeyError): | 190 except (ValueError, KeyError): |
191 rsm_['max'] = unicode(C.RSM_MAX_ITEMS if item_id else C.RSM_MAX_COMMENTS) | 191 rsm_['max_'] = unicode(C.RSM_MAX_ITEMS if item_id else C.RSM_MAX_COMMENTS) |
192 try: | 192 try: |
193 rsm_['index'] = request.args['index'][0] | 193 rsm_['index'] = request.args['index'][0] |
194 except (ValueError, KeyError): | 194 except (ValueError, KeyError): |
195 try: | 195 try: |
196 rsm_['before'] = request.args['before'][0] | 196 rsm_['before'] = request.args['before'][0] |