#426 (ok 3.1.1) Navi panel server links wrong

closed-accepted
Marc Delisle
1
2014-10-21
2008-11-08
Martin Stricker
No

Problem:
When config parameter DisplayServersList is set to TRUE all server links in left navigation frame link to current server. This is because function PMA_generate_common_url (defined in url_generating.lib.php, called in select_server_lib.php on line 88) always uses $GLOBALS['server'] (line 244) instead of testing for server parameter in function argument.

(My) Solution:
Change line 242-243 in url_generating.lib.php to:

if (isset($GLOBALS['server'])
&& $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault'] && !$params['server'])

... don't know if that breaks anything else, it just stops overwriting $params['server] with $GLOBALS['server'] if in the function argument was a server parameter. I haven't checked any security implications (don't know the source code very well).

Discussion

  • Additional Note:
    Described problem applies only when another than the first (default) server has been selected previously.

     
  • Marc Delisle
    Marc Delisle
    2008-11-21

    • assigned_to: nobody --> lem9
     
  • Marc Delisle
    Marc Delisle
    2008-11-21

    • labels: 509102 --> Navigation/Usability
     
  • Marc Delisle
    Marc Delisle
    2008-11-21

    • priority: 5 --> 1
    • summary: Left Server Navigation wrong when DisplayServersList = TRUE --> (ok 3.1.1) Navi panel server links wrong
    • status: open --> open-accepted
     
  • Marc Delisle
    Marc Delisle
    2008-11-21

    Merged in subversion, thanks.

     
  • Marc Delisle
    Marc Delisle
    2008-12-09

    • status: open-accepted --> closed-accepted