예제 #1
0
    def setnum(self, format=None):
        "Set number of account items returned"
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            session['accounts_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]
        redirect(nextpage)
예제 #2
0
    def setnum(self, format=None):
        "Set number of account items returned"
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            session['accounts_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]
        redirect(nextpage)
예제 #3
0
    def setnum(self, format=None):
        "Set num of organizations returned"
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            session["organizations_num_items"] = num
            session.save()
        nextpage = request.headers.get("Referer", "/")
        if "://" in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]
        redirect(nextpage)
예제 #4
0
파일: status.py 프로젝트: haugvald/baruwa2
    def setnum(self, format=None):
        "Set number of items to return for auditlog/mailq"
        app = request.GET.get('ac', 'mailq')
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            if app == 'auditlog':
                session['auditlog_num_items'] = num
            else:
                session['mailq_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]
        redirect(nextpage)
예제 #5
0
    def setnum(self, format=None):
        "Set number of items to return for auditlog/mailq"
        app = request.GET.get('ac', 'mailq')
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            if app == 'auditlog':
                session['auditlog_num_items'] = num
            else:
                session['mailq_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]
        redirect(nextpage)
예제 #6
0
    def setnum(self, format=None):
        "Set num of items to return"
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            session['msgs_search_num_results'] = num
            session['msgs_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]

        params = []
        for param in request.params:
            value = request.params[param]
            if value:
                params.append('%s=%s' % (urllib2.quote(param),
                                        urllib2.quote(value)))
        if params:
            nextpage = "%s?%s" % (nextpage, '&'.join(params))
        redirect(nextpage)
예제 #7
0
    def setnum(self, format=None):
        "Set num of items to return"
        num = check_num_param(request)

        if num and num in [10, 20, 50, 100]:
            session['msgs_search_num_results'] = num
            session['msgs_num_items'] = num
            session.save()
        nextpage = request.headers.get('Referer', '/')
        if '://' in nextpage:
            from_url = urlparse(nextpage)
            nextpage = from_url[2]

        params = []
        for param in request.params:
            value = request.params[param]
            if value:
                params.append('%s=%s' % (urllib2.quote(param),
                                        urllib2.quote(value)))
        if params:
            nextpage = "%s?%s" % (nextpage, '&'.join(params))
        redirect(nextpage)