function finish($errormsg = false) { static $in_exit = 0; if ($in_exit) { exit; } // just in case CloseDataBase calls us $in_exit = true; global $ErrorManager; $ErrorManager->flushPostponedErrors(); if (!empty($errormsg)) { PrintXML(HTML::br(), HTML::hr(), HTML::h2(_("Fatal PhpWiki Error")), $errormsg); // HACK: echo "\n</body></html>"; } if (is_object($this->_user)) { $this->_user->page = $this->getArg('pagename'); $this->_user->action = $this->getArg('action'); unset($this->_user->_HomePagehandle); unset($this->_user->_auth_dbi); } Request::finish(); exit; }