"; $html .= gettext ("PhpWiki is unable to save your changes, because another user edited and saved the page while you were editing the page too. If saving proceeded now changes from the previous author would be lost."); $html .= "
\n"; $html .= gettext ("In order to recover from this situation follow these steps:"); $html .= "\n
"; $html .= gettext ("Sorry for the inconvenience."); $html .= "
"; GeneratePage('MESSAGE', $html, sprintf (gettext ("Problem while updating %s"), $pagename), 0); exit; } $pagename = rawurldecode($post); $pagehash = RetrievePage($dbi, $pagename, $WikiPageStore); // if this page doesn't exist yet, now's the time! if (! is_array($pagehash)) { $pagehash = array(); $pagehash['version'] = 0; $pagehash['created'] = time(); $pagehash['flags'] = 0; $newpage = 1; } else { if (($pagehash['flags'] & FLAG_PAGE_LOCKED) && !defined('WIKI_ADMIN')) { $html = "" . gettext ("This page has been locked by the administrator and cannot be edited."); $html .= "\n
" . gettext ("Sorry for the inconvenience.");
GeneratePage('MESSAGE', $html, sprintf (gettext ("Problem while editing %s"), $pagename), 0);
ExitWiki ("");
}
if(isset($editversion) && ($editversion != $pagehash['version'])) {
ConcurrentUpdates($pagename);
}
// archive it if it's a new author
if ($pagehash['author'] != $remoteuser) {
SaveCopyToArchive($dbi, $pagename, $pagehash);
}
$newpage = 0;
}
// set new pageinfo
$pagehash['lastmodified'] = time();
$pagehash['version']++;
$pagehash['author'] = $remoteuser;
// create page header
$enc_url = rawurlencode($pagename);
$enc_name = htmlspecialchars($pagename);
$html = sprintf(gettext("Thank you for editing %s."),
"$enc_name");
$html .= " Link [$i]: unknown protocol" .
" - use one of $AllowedProtocols - link discarded. Warning: the Wiki DB files still live in the " .
"/tmp directory. Please read the INSTALL file and move " .
"the DBM file to a permanent location or risk losing " .
"all the pages!\n";
}
if (!empty($SignatureImg))
$html .= " ";
include('lib/transform.php');
GeneratePage('BROWSE', $html, $pagename, $pagehash);
?>
\n";
if (! empty($content)) {
// patch from Grant Morgan