Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Widget "Captive Portal Status" small bug

    Scheduled Pinned Locked Moved webGUI
    2 Posts 2 Posters 979 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GertjanG
      Gertjan
      last edited by

      The widget "Captive Portal Status" contains a smal visual bug.

      To see the effect:
      You should have more then one portal user connected.
      Like this:

      more users connected will be fine also.

      Now, disconnect a user with the "grey cross button" at the left side.

      When this button is clicked, someting like this is sent:

      href="?order=&showact=0&act=del&zone=cpzone1&id=2d84ec64268bc40d

      &showact will be set … to 0 (zéro).

      Now, have a look at line 75:

      $showact = isset($_GET['showact']) ? 1 : 0;
      

      $showwact will be set to "1" because 'showact' 'isset' (and has a value of 0 (zéro))  ;D

      Result: have a look at your screen: the widget breaks visually because two more columns are shown.

      I have tested and propose this for line:

      $showact = (isset($_GET['showact']) && ($_GET['showact'] == 1)) ? 1 : 0;
      

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • E
        EMWEE
        last edited by

        Noticed the widget breaking a couple of days ago. Gonna try out your solution.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.