Page 1 of 1

mact var for using in forms

Posted: Fri Feb 01, 2008 3:43 pm
by Lucas
Hello, I noticed that some modules are using the mact var in forms as a hidden field. However, when a form is posted to /admin/moduleinterface.php in this way, the mact var is not behaving as I would expect.
This shows in the breadcrumb and module title not visible in the module.

The cause for this is the var `query` in class.admintheme.inc.php is not urldecoded. This is necessary because POST vars are automatticaly urlencoded.

Simple solution is to change line 121 of this file to:

Code: Select all

$this->query = (isset($_SERVER['QUERY_STRING'])?urldecode($_SERVER['QUERY_STRING']):'');
Do you guys foresee any problems?

Re: mact var for using in forms

Posted: Wed Feb 27, 2008 9:22 pm
by Lucas
I'm not sure why the above solution ever worked  ;D

I changed the line to:

Code: Select all

$this->query = (isset($_REQUEST['mact'])? 'mact=' . $_REQUEST['mact']:'');
I don't see this as a bugfix, but more as a `hack`... any comments?