Fork me on GitHub

what the hell?  Bottom

  • Hi there,

    Looking at the the server vars ( print_r($_SERVER); ) on the index page when news is set as the start module I see that we get two different values for the the [QUERY_STRING] :

    if you are logged in as admin the query string returns null, on the other hand if you are not logged in as admin the query string shows " name=News "...

    Why is this so? Seems strange to me...

    -Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Now looking at $GLOBALS['pnconfig'] I see that $GLOBALS['pnconfig']['startpage'] is present if you are logged in as admin, but not present if you are NOT logged in as admin.

    Logic dictates that admin gets the nice $global whilst everyone else gets a crusty old server global.

    Why, oh why, oh why is it like this?

    -Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • And then foolish Lobos remembers /PNConfig...

    pnModGetVar('/PNConfig', 'startpage'); - not as nicely formatted as $pnconfig['startpage'] but it will do...

    Now I have been noticing some little things like this everynow and then - ie differences in certain global variables depending if one is logged as admin (or not). For example the comments in my nvMenus module:

    //pnVarCleanFromInput function is cutting a dimension off multidimension $_request arrays
    //if user doesn't have full admin privs, due I think to the admin priv check in the
    //pnVarCleanFromInput function - includes/pnapi.php
    //$vars = pnVarCleanFromInput('update');

    It may be worthwhile someone looking into this - actually I can't really understand why there is an admin check there...

    -Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment

This list is based on users active over the last 60 minutes.