Skip to content
This repository
Browse code

Reorganize calling order in the comment listing

Better logically grouped
  • Loading branch information...
commit cc9f329b83ff6295b0eabb09aa4179aea26ce5d1 1 parent 2261b65
Nikolay Bachiyski nb authored

Showing 1 changed file with 6 additions and 7 deletions. Show diff stats Hide diff stats

  1. +6 7 code_comments/web.py
13 code_comments/web.py
@@ -133,21 +133,20 @@ def process_request(self, req):
133 133
134 134 self.data = {}
135 135 self.args = {}
136   -
137 136 self.req = req
138   - self.data['reponame'], repos, path = RepositoryManager(self.env).get_repository_by_path('/')
139   -
140   - self.add_path_and_author_filters()
141 137
142 138 self.per_page = int(req.args.get('per_page', self.COMMENTS_PER_PAGE))
143 139 self.page = int(req.args.get('page', 1))
  140 +
  141 + self.add_path_and_author_filters()
144 142
145 143 self.data['comments'] = Comments(req, self.env).search(self.args, 'DESC', self.per_page, self.page)
146   -
147   - self.data.update(Comments(req, self.env).get_filter_values())
148   -
  144 + self.data['reponame'], repos, path = RepositoryManager(self.env).get_repository_by_path('/')
149 145 self.data['can_delete'] = 'TRAC_ADMIN' in req.perm
150 146 self.data['paginator'] = self.get_paginator()
  147 +
  148 + self.data.update(Comments(req, self.env).get_filter_values())
  149 +
151 150 # DataTables lets us filter and sort comments table
152 151 add_script(req, 'code-comments/DataTables/js/jquery.dataTables.min.js')
153 152 add_stylesheet(req, 'code-comments/DataTables/css/demo_page.css')

0 comments on commit cc9f329

Please sign in to comment.
Something went wrong with that request. Please try again.