home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / wiki / action / edit.php < prev    next >
PHP Script  |  2004-03-08  |  720b  |  33 lines

  1. <?php
  2. // $Id: edit.php,v 1.1 2004/01/12 22:14:04 comsubvie Exp $
  3.  
  4. require('parse/html.php');
  5. require(TemplateDir . '/edit.php');
  6.  
  7. // Edit a page (possibly an archive version).
  8. function action_edit()
  9. {
  10.   global $page, $pagestore, $ParseEngine, $version;
  11.  
  12.   $pg = $pagestore->page($page);
  13.   $pg->read();
  14.  
  15.   if(!$pg->mutable)
  16.     { die(ACTION_ErrorPageLocked); }
  17.  
  18.   $archive = 0;
  19.   if($version != '')
  20.   {
  21.     $pg->version = $version;
  22.     $pg->read();
  23.     $archive = 1;
  24.   }
  25.  
  26.   template_edit(array('page'      => $page,
  27.                       'text'      => $pg->text,
  28.                       'timestamp' => $pg->time,
  29.                       'nextver'   => $pg->version + 1,
  30.                       'archive'   => $archive));
  31. }
  32. ?>
  33.