should fix issues on IIS

This commit is contained in:
real_nowhereman 2008-04-26 08:01:39 +00:00
parent dd652e4cc5
commit e59d7bc707
3 changed files with 13 additions and 1 deletions

View File

@ -122,6 +122,15 @@
utils_redirect(); utils_redirect();
} }
} }
function system_prepare_iis() {
if (!@$_SERVER['REQUEST_URI']) {
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],1 );
if (isset($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING'];
}
}
}
function system_init_action_params() { function system_init_action_params() {
@ -143,6 +152,7 @@
system_sanitizequery(); system_sanitizequery();
system_unregister_globals(); system_unregister_globals();
system_prepare_iis();
$GLOBALS['fpdb'] =& new FPDB; $GLOBALS['fpdb'] =& new FPDB;

View File

@ -270,6 +270,8 @@
} }
$flatpress['themeurl'] = $themeurl; $flatpress['themeurl'] = $themeurl;
$flatpress['params'] = $fp_params;
$flatpress_upper = array_change_key_case($flatpress, CASE_UPPER); $flatpress_upper = array_change_key_case($flatpress, CASE_UPPER);

View File

@ -4,7 +4,7 @@
<form id="commentform" method="post" <form id="commentform" method="post"
action="{$smarty.server.REQUEST_URI|escape:'html'}#commentform" action="{$flatpress.params.entry|link:comments_link}#commentform"
enctype="multipart/form-data"> enctype="multipart/form-data">