Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8219

Feature Request: Sort banned IPs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.6
    • 3.0.4
    • ACP
    • None
    • PHP Environment: 5.0.4
      Database: MySql Client API 4.1.13

      This is feature request and i don't know a better way to place it. It also covers the solution.

      Nearly every day I must look after banned ips and it is hard to recognize, which ones are in my list and which ones belong to a range, because they are not sorted by numbers.

      The solution would be quite simple by adding an ORDER BY snippet.

      Edit the file includes/acp/acp_ban.php

      Look for the sql cmd in line 155:

      $sql = 'SELECT *
         FROM ' . BANLIST_TABLE . '
         WHERE (ban_end >= ' . time() . "
               OR ban_end = 0)
            AND ban_ip <> ''";

      Replace it with

      $sql = 'SELECT *
         FROM ' . BANLIST_TABLE . '
         WHERE (ban_end >= ' . time() . "
               OR ban_end = 0)
            AND ban_ip <> ''
         ORDER BY INET_ATON(ban_ip)";

      Remarks: This will work with php versions >= 5.0

            TerraFrost TerraFrost [X] (Inactive)
            Gorgonz Gorgonz [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: