Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv26472/lib Modified Files: main.php Log Message: Fix for remove page bug when USE_PATH_INFO is false. Index: main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.86 retrieving revision 1.87 diff -u -2 -b -p -d -r1.86 -r1.87 --- main.php 15 Oct 2002 18:42:21 -0000 1.86 +++ main.php 19 Oct 2002 16:40:29 -0000 1.87 @@ -402,5 +402,26 @@ class WikiRequest extends Request { } } + elseif ($this->isPost()) { + /* + * In general, for security reasons, HTTP_GET_VARS should be ignored + * on POST requests, but we make an exception here (only for pagename). + * + * The justifcation for this hack is the following + * asymmetry: When POSTing with USE_PATH_INFO set, the + * pagename can (and should) be communicated through the + * request URL via PATH_INFO. When POSTing with + * USE_PATH_INFO off, this cannot be done --- the only way + * to communicate the pagename through the URL is via + * QUERY_ARGS (HTTP_GET_VARS). + */ + global $HTTP_GET_VARS; + if (isset($HTTP_GET_VARS['pagename'])) { + return $HTTP_GET_VARS['pagename']; + } + } + /* + * Support for PhpWiki 1.2 style requests. + */ $query_string = $this->get('QUERY_STRING'); if (preg_match('/^[^&=]+$/', $query_string)) {