"; $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

  1. "; $html .= gettext ("Use your browser's Back button to go back to the edit page."); $html .= "\n
  2. "; $html .= gettext ("Copy your changes to the clipboard or to another temporary place (e.g. text editor)."); $html .= "\n
  3. "; $html .= gettext ("Reload the page. You should now see the most current version of the page. Your changes are no longer there."); $html .= "\n
  4. "; $html .= gettext ("Make changes to the file again. Paste your additions from the clipboard (or text editor)."); $html .= "\n
  5. "; $html .= gettext ("Press Save again."); $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 .= "
\n"; if (! empty($content)) { // patch from Grant Morgan for magic_quotes_gpc if (get_magic_quotes_gpc()) $content = stripslashes($content); $pagehash['content'] = preg_split('/[ \t\r]*\n/', chop($content)); // convert spaces to tabs at user request if (isset($convert)) { $pagehash['content'] = CookSpaces($pagehash['content']); } } for ($i = 1; $i <= NUM_LINKS; $i++) { if (! empty(${'r'.$i})) { if (preg_match("#^($AllowedProtocols):#", ${'r'.$i})) $pagehash['refs'][$i] = ${'r'.$i}; else $html .= "

Link [$i]: unknown protocol" . " - use one of $AllowedProtocols - link discarded.

\n"; } } InsertPage($dbi, $pagename, $pagehash); UpdateRecentChanges($dbi, $pagename, $newpage); $html .= gettext ("Your careful attention to detail is much appreciated."); $html .= "\n"; // fixme: no test for flat file db system if (isset($DBMdir) && preg_match('@^/tmp\b@', $DBMdir)) { $html .= "

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 .= "

\n"; $html .= "

"; include('lib/transform.php'); GeneratePage('BROWSE', $html, $pagename, $pagehash); ?>