Reini Urban - 2001-02-10

I'm trying to get admin.php to just show a flatfile, but not to save it. I use mysql but don't want to change the config.
All the database overhead is too slow, just to check the correct rendering.

How to force the translation easily?
There's some not so obvious magic in the translation, which I haven't got yet.
(This is also my third day, that I learned php, sorry. It's easy, but...)

This is what I added into the admin loop:
   } elseif (isset($show)) {
      // no save, just display. need path like "admin.php?show=pgsrc/TestPage"
      $fn = rawurldecode($show);
      if (filetype($fn) == 'file') {
        $data = file($fn);
        $stat = stat("$fn");
    $mtime = $stat[9];
    $pagehash = array('author' => $remoteuser,
                  'pagename' => $fn,
                  'flags' => 0,
                      'lastmodified' => $mtime,
                  'refs' => array(),
                  'version' => 1,
              'content' => implode("\n",$data)
    // 'content' => preg_split('/[ \t\r]*\n/', chop(implode("\n",$data)))
              );
        $html = $pagehash['content'];
        include('lib/transform.php');
    GeneratePage('BROWSE', $html, $fn, $pagehash);
    flush();