function SavePage($dbi, $page, $source) { global $WikiPageStore; $pagename = $page['pagename']; $version = $page['version']; if (is_array($current = RetrievePage($dbi, $pagename, $WikiPageStore))) { if ($version <= $current['version']) { $page['version'] = $current['version'] + 1; $version = $page['version'] . " [was {$version}]"; } SaveCopyToArchive($dbi, $pagename, $current); } printf(gettext("Inserting page %s, version %s from %s"), "<b>" . htmlspecialchars($pagename) . "</b>", $version, $source); print "<br>\n"; flush(); InsertPage($dbi, $pagename, $page); }
$html = "<p>" . gettext("This page has been locked by the administrator and cannot be edited."); $html .= "\n<p>" . gettext("Sorry for the inconvenience."); GeneratePage('MESSAGE', $html, sprintf(gettext("Problem while editing %s"), $pagename), 0); } else { $html = "<p>" . gettext("Cette page est verrouillée par l'administrateur et ne peux pas être modifiée."); $html .= "\n<p>" . gettext("Désolé pour le dérangement."); GeneratePage('MESSAGE', $html, sprintf(gettext("Problème lors de la mise à jour de %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); // Gilles Casse (2003-01-21) for the Oralux website. // $html = sprintf(gettext("Thank you for editing %s."), // "<a href=\"$ScriptUrl?$enc_url\">$enc_name</a>"); // $html .= "<br>\n"; if (!empty($content)) {