Changeset - a12aef38b8b0
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2015-01-06 00:54:36
madski@unity3d.com
error: remove allmost unused code for redirect on error page

It is much better to just stop and show the error message.
2 files changed with 0 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/error.py
Show inline comments
 
@@ -67,11 +67,6 @@ class ErrorController(BaseController):
 
        c.error_message = cgi.escape(request.GET.get('code', str(resp.status)))
 
        c.error_explanation = self.get_error_explanation(resp.status_int)
 

	
 
        #  redirect to when error with given seconds
 
        c.redirect_time = 0
 
        c.redirect_module = _('Home page')
 
        c.url_redirect = "/"
 

	
 
        return render('/errors/error_document.html')
 

	
 
    def img(self, id):
kallithea/templates/errors/error_document.html
Show inline comments
 
@@ -8,9 +8,6 @@
 
        <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/png" />
 

	
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        %if c.redirect_time:
 
            <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
 
        %endif
 

	
 
        <!-- stylesheets -->
 
        <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen"/>
 
@@ -43,13 +40,8 @@
 

	
 
                    <p>${c.error_explanation}</p>
 

	
 
                    %if c.redirect_time:
 
                        <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
 
                    %endif
 

	
 
                </div>
 
            </div>
 
            <!-- end login -->
 
        </div>
 
    </body>
 

	
0 comments (0 inline, 0 general)