Ticket #10214: SBLE_internal.diff

File SBLE_internal.diff, 1013 bytes (added by mail@…, 16 years ago)

SBLE_internal

  • django/middleware/common.py

     
    8888                referer = request.META.get('HTTP_REFERER', None)
    8989                is_internal = _is_internal_request(domain, referer)
    9090                path = request.get_full_path()
    91                 if referer and not _is_ignorable_404(path) and (is_internal or '?' not in referer):
     91                if settings.SEND_BROKEN_LINK_EMAILS == 'internal':
     92                    cond = is_internal
     93                else:
     94                    cond = (is_internal or '?' not in referer):
     95                if referer and not _is_ignorable_404(path) and cond:
    9296                    ua = request.META.get('HTTP_USER_AGENT', '<none>')
    9397                    ip = request.META.get('REMOTE_ADDR', '<none>')
    9498                    mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain),
Back to Top