Show More
@@ -136,7 +136,7 b' class AdminController(BaseController):' | |||
|
136 | 136 | |
|
137 | 137 | users_log = users_log.order_by(UserLog.action_date.desc()) |
|
138 | 138 | |
|
139 |
p = safe_int(request. |
|
|
139 | p = safe_int(request.GET.get('page', 1), 1) | |
|
140 | 140 | |
|
141 | 141 | def url_generator(**kw): |
|
142 | 142 | return url.current(filter=c.search_term, **kw) |
@@ -64,7 +64,7 b' class NotificationsController(BaseContro' | |||
|
64 | 64 | notif = NotificationModel().get_for_user(self.rhodecode_user.user_id, |
|
65 | 65 | filter_=request.GET.getall('type')) |
|
66 | 66 | |
|
67 |
p = safe_int(request. |
|
|
67 | p = safe_int(request.GET.get('page', 1), 1) | |
|
68 | 68 | c.notifications = Page(notif, page=p, items_per_page=10) |
|
69 | 69 | c.pull_request_type = Notification.TYPE_PULL_REQUEST |
|
70 | 70 | c.comment_type = [Notification.TYPE_CHANGESET_COMMENT, |
@@ -54,20 +54,16 b' class ChangelogController(BaseRepoContro' | |||
|
54 | 54 | def index(self): |
|
55 | 55 | limit = 100 |
|
56 | 56 | default = 20 |
|
57 |
if request. |
|
|
58 | try: | |
|
59 | int_size = int(request.params.get('size')) | |
|
60 | except ValueError: | |
|
61 | int_size = default | |
|
62 | c.size = max(min(int_size, limit), 1) | |
|
57 | if request.GET.get('size'): | |
|
58 | c.size = max(min(safe_int(request.GET.get('size')), limit), 1) | |
|
63 | 59 | session['changelog_size'] = c.size |
|
64 | 60 | session.save() |
|
65 | 61 | else: |
|
66 | 62 | c.size = int(session.get('changelog_size', default)) |
|
67 | 63 | # min size must be 1 |
|
68 | 64 | c.size = max(c.size, 1) |
|
69 |
p = safe_int(request. |
|
|
70 |
branch_name = request. |
|
|
65 | p = safe_int(request.GET.get('page', 1), 1) | |
|
66 | branch_name = request.GET.get('branch', None) | |
|
71 | 67 | try: |
|
72 | 68 | collection = c.rhodecode_repo.get_changesets(start=0, |
|
73 | 69 | branch_name=branch_name) |
@@ -44,7 +44,7 b' class FollowersController(BaseRepoContro' | |||
|
44 | 44 | super(FollowersController, self).__before__() |
|
45 | 45 | |
|
46 | 46 | def followers(self, repo_name): |
|
47 |
p = safe_int(request. |
|
|
47 | p = safe_int(request.GET.get('page', 1), 1) | |
|
48 | 48 | repo_id = c.rhodecode_db_repo.repo_id |
|
49 | 49 | d = UserFollowing.get_repo_followers(repo_id)\ |
|
50 | 50 | .order_by(UserFollowing.follows_from) |
@@ -110,7 +110,7 b' class ForksController(BaseRepoController' | |||
|
110 | 110 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
111 | 111 | 'repository.admin') |
|
112 | 112 | def forks(self, repo_name): |
|
113 |
p = safe_int(request. |
|
|
113 | p = safe_int(request.GET.get('page', 1), 1) | |
|
114 | 114 | repo_id = c.rhodecode_db_repo.repo_id |
|
115 | 115 | d = [] |
|
116 | 116 | for r in Repository.get_repo_forks(repo_id): |
@@ -62,7 +62,7 b' class JournalController(BaseController):' | |||
|
62 | 62 | @NotAnonymous() |
|
63 | 63 | def index(self): |
|
64 | 64 | # Return a rendered template |
|
65 |
p = safe_int(request. |
|
|
65 | p = safe_int(request.GET.get('page', 1), 1) | |
|
66 | 66 | c.user = User.get(self.rhodecode_user.user_id) |
|
67 | 67 | c.following = self.sa.query(UserFollowing)\ |
|
68 | 68 | .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\ |
@@ -250,7 +250,7 b' class JournalController(BaseController):' | |||
|
250 | 250 | @LoginRequired() |
|
251 | 251 | def public_journal(self): |
|
252 | 252 | # Return a rendered template |
|
253 |
p = safe_int(request. |
|
|
253 | p = safe_int(request.GET.get('page', 1), 1) | |
|
254 | 254 | |
|
255 | 255 | c.following = self.sa.query(UserFollowing)\ |
|
256 | 256 | .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\ |
@@ -147,7 +147,7 b' class PullrequestsController(BaseRepoCon' | |||
|
147 | 147 | def show_all(self, repo_name): |
|
148 | 148 | c.pull_requests = PullRequestModel().get_all(repo_name) |
|
149 | 149 | c.repo_name = repo_name |
|
150 |
p = safe_int(request. |
|
|
150 | p = safe_int(request.GET.get('page', 1), 1) | |
|
151 | 151 | |
|
152 | 152 | c.pullrequests_pager = Page(c.pull_requests, page=p, items_per_page=10) |
|
153 | 153 |
@@ -84,7 +84,7 b' class SearchController(BaseRepoControlle' | |||
|
84 | 84 | log.debug(cur_query) |
|
85 | 85 | |
|
86 | 86 | if c.cur_query: |
|
87 |
p = safe_int(request. |
|
|
87 | p = safe_int(request.GET.get('page', 1), 1) | |
|
88 | 88 | highlight_items = set() |
|
89 | 89 | try: |
|
90 | 90 | idx = open_dir(config['app_conf']['index_dir'], |
@@ -64,8 +64,8 b' class ShortlogController(BaseRepoControl' | |||
|
64 | 64 | redirect(h.url('shortlog_home', repo_name=repo_name)) |
|
65 | 65 | |
|
66 | 66 | def index(self, repo_name, revision=None, f_path=None): |
|
67 |
p = safe_int(request. |
|
|
68 |
size = safe_int(request. |
|
|
67 | p = safe_int(request.GET.get('page', 1), 1) | |
|
68 | size = safe_int(request.GET.get('size', 20), 20) | |
|
69 | 69 | collection = c.rhodecode_repo |
|
70 | 70 | c.file_history = f_path |
|
71 | 71 |
General Comments 0
You need to be logged in to leave comments.
Login now