[Home]OpenNewSection

UseModWiki | RecentChanges | Preferences

Initializes the %Section variable.

 sub OpenNewSection {
   my ($name, $data) = @_;

   %Section = ();
   $Section{'name'} = $name;
   $Section{'version'} = 1;      # Data format version
   $Section{'revision'} = 0;     # Number of edited times
   $Section{'tscreate'} = $Now;  # Set once at creation
   $Section{'ts'} = $Now;        # Updated every edit
   $Section{'ip'} = $ENV{REMOTE_ADDR};
   $Section{'host'} = '';        # Updated only for real edits (can be slow)
   $Section{'id'} = $UserID;
   $Section{'username'} = &GetParam("username", "");
   $Section{'data'} = $data;
   $Page{$name} = join($FS2, %Section);  # Replace with save?
 }

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 13, 2004 11:29 am by 62.213.86.109 (diff)
Search: