"; $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 .= "
"; echo GeneratePage('MESSAGE', $html, sprintf (gettext ("Problem while updating %s"), $pagename), 0); ExitWiki(); } $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) && ! $user->is_admin()) { $html = "" . gettext ("This page has been locked by the administrator and cannot be edited."); $html .= "\n
" . gettext ("Sorry for the inconvenience.");
echo GeneratePage('MESSAGE', $html,
sprintf (gettext ("Problem while editing %s"), $pagename), 0);
ExitWiki ("");
}
if(isset($editversion) && ($editversion != $pagehash['version'])) {
ConcurrentUpdates($pagename);
}
if ($user->id() != $pagehash['author'] && ! $user->is_admin())
unset($minor_edit); // Force archive
if (empty($minor_edit))
SaveCopyToArchive($dbi, $pagename, $pagehash);
$newpage = 0;
}
// set new pageinfo
$pagehash['lastmodified'] = time();
$pagehash['version']++;
$pagehash['author'] = $user->id();
// create page header
$html = sprintf(gettext("Thank you for editing %s."),
LinkExistingWikiWord($pagename));
$html .= " Warning: $DBWarning" .
"Please read the INSTALL file and move " .
"the DB file to a permanent location or risk losing " .
"all the pages!\n";
}
if (!empty($SignatureImg))
$html .= sprintf("
\n";
if (! empty($content)) {
// patch from Grant Morgan
\n";
include('lib/transform.php');
echo GeneratePage('BROWSE', $html, $pagename, $pagehash);
?>