Menu

#156 REQUEST_URI used in TForm

v2.0
open
nobody
5
2006-02-13
2006-02-13
No

This is a repost of bug number 1166126 which was never
fixed.

Essentially the REQUEST_URI server variable can not be
assumed to be available on all web servers, so the code
either needs to be fixed, or REQUEST_URI needs to be
added to the list of requirements.

There is code posted in the original bug that works
without using REQUEST_URI, although it does use other
server variables instead. It was suggested that
TRequest should be used instead, although no code was
given.

Here is some code which I only tested briefly. It
isn't identical to REQUEST_URI in all cases (the only
case I found is when you are simply at the index.php
and there are no GET parameters, with the code below it
adds the page name to the string) but I didn't see any
problems.

public function getAction()
{
$getValues = $_GET;
unset($getValues['page']);

return isset($this->action) ? $this->action :

pradoEncodeData($request->constructUrl($request->getRequestedPage(),$getValues));

}

Discussion


Log in to post a comment.