]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/user/fo_view.pl
modified version check
[selfforum.git] / selfforum-cgi / user / fo_view.pl
index ee83ce28ba9955c5d1606d488f67a2cd5af49cf0..c185dd31dcafea6e8a69353c650f432a452fa30b 100644 (file)
@@ -4,14 +4,19 @@
 #                                                                              #
 # File:        user/fo_view.pl                                                 #
 #                                                                              #
-# Authors:     AndrĂ© Malo <nd@o3media.de>, 2001-04-01                          #
+# Authors:     AndrĂ© Malo <nd@o3media.de>                                      #
 #                                                                              #
 # Description: display the forum main file or a single posting                 #
 #                                                                              #
 ################################################################################
 
 use strict;
-use vars qw($Bin $Shared $Script $Config);
+use vars qw(
+  $Bin
+  $Shared
+  $Script
+  $Config
+);
 
 BEGIN {
   my $null = $0; $null =~ s/\\/\//g; # for win :-(
@@ -19,8 +24,18 @@ BEGIN {
   $Shared  = "$Bin/../shared";
   $Config  = "$Bin/config";
   $Script  = ($null =~ /^.*\/(.*)$/)? $1 : $null;
+
+#  my $null = $0;
+#  $Bin     = ($null =~ /^(.*)\/.*$/)? $1 : '.';
+#  $Config  = "$Bin/../../daten/forum/config";
+#  $Shared  = "$Bin/../../cgi-shared";
+#  $Script  = ($null =~ /^.*\/(.*)$/)? $1 : $null;
 }
 
+# setting umask, remove or comment it, if you don't need
+#
+umask 006;
+
 use lib "$Shared";
 use CGI::Carp qw(fatalsToBrowser);
 
@@ -29,9 +44,25 @@ use Conf::Admin;
 use Template::Forum;
 use Template::Posting;
 
-use CGI qw(param header);
+use CGI qw(
+  param
+  header
+);
 
-print header(-type => 'text/html');
+################################################################################
+#
+# Version check
+#
+# last modified:
+#    $Date$ (GMT)
+# by $Author$
+#
+sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'}
+
+print header(
+  -type    => 'text/html',
+  -expires => '+10m'
+);
 
 my $conf = read_script_conf ($Config, $Shared, $Script);
 
@@ -58,7 +89,9 @@ if (defined ($tid) and defined ($mid)) {
       messages     => $conf -> {template} -> {messages},
       form         => $show_posting -> {form},
       cgi          => $cgi,
-      tree         => $tree
+      tree         => $tree,
+      firsttime    => 1,
+      cachepath    => $conf -> {files} -> {cachePath}
     }
   );
 }

patrick-canterino.de