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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
what the hell?
-
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
-
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
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 -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
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
- Moderated by:
- Support
