Changeset - 97c12433267a
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2015-07-20 15:11:42
madski@unity3d.com
changelog: fix URL after submitting new page size via GET form

The URL ended up getting lots of crap. Workaround this by redirecting to a
clean URL.
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changelog.py
Show inline comments
 
@@ -94,6 +94,15 @@ class ChangelogController(BaseRepoContro
 
    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
 
                                   'repository.admin')
 
    def index(self, repo_name, revision=None, f_path=None):
 
        # Fix URL after page size form submission via GET
 
        # TODO: Somehow just don't send this extra junk in the GET URL
 
        if request.GET.get('set'):
 
            request.GET.pop('set', None)
 
            request.GET.pop('_authentication_token', None)
 
            if revision is None:
 
                return redirect(url('changelog_home', repo_name=repo_name, **request.GET))
 
            return redirect(url('changelog_file_home', repo_name=repo_name, revision=revision, f_path=f_path, **request.GET))
 

	
 
        limit = 2000
 
        default = 100
 
        if request.GET.get('size'):
0 comments (0 inline, 0 general)