changeset 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 fe03637fe5a6
files src/browser/libervia_main.py src/browser/sat_browser/blog.py src/server/blog.py src/server/server.py
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Thu Jun 04 12:39:27 2015 +0200
+++ b/src/browser/libervia_main.py	Thu Jun 04 12:03:45 2015 +0200
@@ -523,7 +523,7 @@
         def cb(result):
             self._ownBlogsFills(result, mblog_panel)
 
-        rsm = {'max': str(delta + C.RSM_MAX_ITEMS), 'index': str(self.next_rsm_index)}
+        rsm = {'max_': str(delta + C.RSM_MAX_ITEMS), 'index': str(self.next_rsm_index)}
         self.bridge.getMassiveMblogs('JID', [unicode(self.whoami.bare)], rsm, callback=cb, profile=C.PROF_KEY_NONE)
         self.next_rsm_index = index + C.RSM_MAX_ITEMS
 
--- a/src/browser/sat_browser/blog.py	Thu Jun 04 12:39:27 2015 +0200
+++ b/src/browser/sat_browser/blog.py	Thu Jun 04 12:03:45 2015 +0200
@@ -479,7 +479,7 @@
         @param main_entry (MicroblogEntry): main entry having comments.
         """
         index = str(main_entry.comments_count - main_entry.hidden_count)
-        rsm = {'max': str(main_entry.hidden_count), 'index': index}
+        rsm = {'max_': str(main_entry.hidden_count), 'index': index}
         self.host.bridge.call('getMblogComments', self.mblogsInsert, main_entry.comments_service, main_entry.comments_node, rsm)
 
     def loadMoreMainEntries(self):
@@ -491,7 +491,7 @@
         self.host.loadOurMainEntries(self.next_rsm_index, self)
 
         type_ = 'ALL' if self.accepted_groups == [] else 'GROUP'
-        rsm = {'max': str(C.RSM_MAX_ITEMS), 'index': str(self.next_rsm_index)}
+        rsm = {'max_': str(C.RSM_MAX_ITEMS), 'index': str(self.next_rsm_index)}
         self.host.bridge.getMassiveMblogs(type_, list(self.accepted_groups), rsm, profile=C.PROF_KEY_NONE, callback=self.massiveInsert)
 
     def getWarningData(self, comment):
--- a/src/server/blog.py	Thu Jun 04 12:39:27 2015 +0200
+++ b/src/server/blog.py	Thu Jun 04 12:03:45 2015 +0200
@@ -163,7 +163,7 @@
                     pass
 
         rsm_ = self.parseURLParams(request, item_id)
-        max_items = int(rsm_['max'])
+        max_items = int(rsm_['max_'])
 
         if atom is not None:
             d.addCallbacks(self.render_atom_feed, self.render_error_blog, [request], None, [request, profile], None)
@@ -186,9 +186,9 @@
         # retrieve RSM request data from URL parameters
         rsm_ = {}
         try:
-            rsm_['max'] = request.args['max'][0]
+            rsm_['max_'] = request.args['max'][0]
         except (ValueError, KeyError):
-            rsm_['max'] = unicode(C.RSM_MAX_ITEMS if item_id else C.RSM_MAX_COMMENTS)
+            rsm_['max_'] = unicode(C.RSM_MAX_ITEMS if item_id else C.RSM_MAX_COMMENTS)
         try:
             rsm_['index'] = request.args['index'][0]
         except (ValueError, KeyError):
--- a/src/server/server.py	Thu Jun 04 12:39:27 2015 +0200
+++ b/src/server/server.py	Thu Jun 04 12:03:45 2015 +0200
@@ -321,7 +321,7 @@
         @param item_ids: list of microblogs items IDs
         @return list of microblog data (dict)"""
         profile = ISATSession(self.session).profile
-        d = self.asyncBridgeCall("getGroupBlogs", publisher_jid, item_ids, {'max': unicode(max_items)}, False, profile)
+        d = self.asyncBridgeCall("getGroupBlogs", publisher_jid, item_ids, {'max_': unicode(max_items)}, False, profile)
         return d
 
     def jsonrpc_getMblogsWithComments(self, publisher_jid, item_ids, max_comments=C.RSM_MAX_COMMENTS):
@@ -345,7 +345,7 @@
         """
         profile = ISATSession(self.session).profile
         if rsm is None:
-            rsm = {'max': unicode(C.RSM_MAX_ITEMS)}
+            rsm = {'max_': unicode(C.RSM_MAX_ITEMS)}
         d = self.asyncBridgeCall("getMassiveGroupBlogs", publishers_type, publishers, rsm, profile)
         self.sat_host.bridge.massiveSubscribeGroupBlogs(publishers_type, publishers, profile)
         return d
@@ -357,7 +357,7 @@
         """
         profile = ISATSession(self.session).profile
         if rsm is None:
-            rsm = {'max': unicode(C.RSM_MAX_COMMENTS)}
+            rsm = {'max_': unicode(C.RSM_MAX_COMMENTS)}
         d = self.asyncBridgeCall("getGroupBlogComments", service, node, rsm, profile)
         return d