I will post as little as possible, for it is extremely large (tested already and the same behavior occurs):
// THIS CLASS IN file_action.inc.php
class ActionPerformer extends MethodGeneratorForActionPerformer {
function ActionPerformer() {}
function add_content_to_file() {
global $section, $action, ${$section . 'LocationPath'}, $redirectArray;
foreach ($_REQUEST as $key => $val) if (!isset(${$key})) ${$key} = $val;
print_r($body); die('');
if ($this->isSuccessful && $redirectArray[$section]['add_content_to_file'])
echo $this->getHTMLRedirect('add_content_to_file');
}
}
// THIS CLASS IS IN classes.inc.php
class MethodGeneratorForActionPerformer {
function MethodGeneratorForActionPerformer () {
if (!is_subclass_of($this, 'MethodGeneratorForActionPerformer'))
trigger_error('This class cannot be instantiated', E_USER_ERROR);
}
/**
* Generate HTML/Javascript redirect output
*
* @access public
* @param mixed $myImmedAction
* @param mixed $additionalQS
* @return mixed HTML and Javascript redirect options
*/
function &getHTMLRedirect($myImmedAction, $additionalQS = '') { // STATIC HTML/JAVASCRIPT STRING METHOD
global $section, $projectURLPath, $redirectArray;
foreach ($_REQUEST as $key => $val) if (!isset(${$key})) ${$key} = $val;
// NEW 9/1/2004: DO NOT ALLOW FOR ACTION TO EXIST IF YOU ARE INTENDING TO RETURN TO SEARCH RESULTS
$action = (!$isFromSearch) ? $redirectArray[$section][$myImmedAction] : '';
if ($redirectArray[$section][$myImmedAction] && $myImmedAction) {
$html = "\n<script type=\"text/javascript\">\n <!--\n location.href = 'http://" . $_SERVER['SERVER_NAME'] . "$projectURLPath/index.php" .
"?section=$section&action=$action&success=" . urlencode($this->getSuccessMsg()) .
"&willKeepPageSession=$willKeepPageSession&page=$page";
$additionalQS = preg_replace('/^&(.*)$/i', '$1', $additionalQS); // TAKE OUT FIRST '&' IF FOUND
$html .= ($additionalQS) ? '&' . $additionalQS : '';
$html .= "';\n //-->\n</script>\n<noscript>\n<meta http-equiv=\"Refresh\" content=\"0;URL=http://" . $_SERVER['SERVER_NAME'] . "$projectURLPath/" .
"index.php?section=$section&action=$action&success=" . urlencode($this->getSuccessMsg()) .
"&willKeepPageSession=$willKeepPageSession&page=$page";
$html .= ($additionalQS) ? '&' . $additionalQS : '';
$html .= "\">\n</noscript>\n\n";
}
return $html;
}
}
Phil