]> git.p6c8.net - selfforum.git/commitdiff
made perl 5.005 compilant
authorndparker <>
Sun, 17 Jun 2001 09:48:31 +0000 (09:48 +0000)
committerndparker <>
Sun, 17 Jun 2001 09:48:31 +0000 (09:48 +0000)
selfforum-cgi/shared/Arc/Archive.pm
selfforum-cgi/shared/Conf.pm
selfforum-cgi/shared/Posting/Cache.pm
selfforum-cgi/shared/Template.pm
selfforum-cgi/shared/Template/Forum.pm
selfforum-cgi/shared/Template/Posting.pm
selfforum-cgi/user/fo_voting.pl

index 9e6694b478acb83d614f230bddb3130b2391b052..9e3ccb911d87351814b3f1db4fcfc6cda35d9c5c 100644 (file)
@@ -181,9 +181,9 @@ sub cut_tail ($) {
                       my $monthpath = $monthdir . '/';
                       my $file = $monthpath . "t$tid.xml";
 
                       my $monthpath = $monthdir . '/';
                       my $file = $monthpath . "t$tid.xml";
 
-                      mkdir $yeardir unless (-d $yeardir);
+                      mkdir $yeardir, 0777 unless (-d $yeardir);
                       if (-d $yeardir) {
                       if (-d $yeardir) {
-                        mkdir $monthdir unless (-d $monthdir);
+                        mkdir $monthdir, 0777 unless (-d $monthdir);
                         if (-d $monthdir) {
                           save_file (
                             $file,
                         if (-d $monthdir) {
                           save_file (
                             $file,
index ca39efdc20e31d577445981b6f4aa30d758c04e2..c0920d019804317519f9d8a6e7d44ca9686106d8 100644 (file)
@@ -164,6 +164,8 @@ sub parse_script_conf ($\%$) {
 #         $Shared - /path/to/shared-dir   #        -- " --
 #         $Script - scriptname
 #
 #         $Shared - /path/to/shared-dir   #        -- " --
 #         $Script - scriptname
 #
+# Return: hashref of config hash
+#
 sub read_script_conf ($$$) {
   my ($Config, $Shared, $Script) = @_;
 
 sub read_script_conf ($$$) {
   my ($Config, $Shared, $Script) = @_;
 
index cf8c3c42b56c99052491afe24c372e73604c778a..b765a494a8f863fe7afa9fa912da736bec0341ef 100644 (file)
@@ -25,7 +25,7 @@ use Lock qw(:ALL);
 #
 $VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
 
 #
 $VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
 
-my $O_BINARY = eval "O_BINARY";
+my $O_BINARY = eval 'local $SIG{__DIE__}; O_BINARY';
 $O_BINARY = 0 if ($@);
 
 ### sub new ####################################################################
 $O_BINARY = 0 if ($@);
 
 ### sub new ####################################################################
@@ -416,10 +416,9 @@ sub r_add_posting {
   local $\;
 
   unless (-d $self -> threaddir($param)) {
   local $\;
 
   unless (-d $self -> threaddir($param)) {
-    mkdir $self->threaddir($param)                   or return;
+    mkdir $self->threaddir($param), 0777             or return;
   }
   }
-  sysopen (
-    FILE,
+  sysopen (FILE,
     $self->cachefile($param),
     O_WRONLY | O_CREAT | O_TRUNC
   )                                                  or return;
     $self->cachefile($param),
     O_WRONLY | O_CREAT | O_TRUNC
   )                                                  or return;
@@ -530,7 +529,7 @@ sub vote_wrap {
     }
     else {
       unless (-d $self->threaddir($param)) {
     }
     else {
       unless (-d $self->threaddir($param)) {
-        mkdir $self->threaddir($param)                     or return;
+        mkdir $self->threaddir($param), 0777                     or return;
       }
       my $filename = $self->cachefile($param);
 
       }
       my $filename = $self->cachefile($param);
 
index 16562c91c706c7a80585e2d5f8c2c778c4961d20..4e19eb24d3f21e73bafa8aecb81e573c1d24eabc 100644 (file)
@@ -4,8 +4,8 @@ package Template;
 #                                                                              #
 # File:        shared/Template.pm                                              #
 #                                                                              #
 #                                                                              #
 # File:        shared/Template.pm                                              #
 #                                                                              #
-# Authors:     AndrĂ© Malo <nd@o3media.de>, 2001-04-12                          #
-#              Frank Schoenmann <fs@tower.de>, 2001-06-04                      #
+# Authors:     AndrĂ© Malo       <nd@o3media.de>, 2001-06-16                    #
+#              Frank Schoenmann <fs@tower.de>,   2001-06-04                    #
 #                                                                              #
 # Description: Handle XML based HTML-Templates                                 #
 #                                                                              #
 #                                                                              #
 # Description: Handle XML based HTML-Templates                                 #
 #                                                                              #
index 245bb5e469e8a68cad7f55d71067c9434c3f0d52..675494127cb13965d625ac463e8bb7a68fdef7fa 100644 (file)
@@ -105,6 +105,7 @@ sub print_forum_as_HTML ($$$) {
 
     for (@threads) {
       $tpar -> {thread} = "$_";
 
     for (@threads) {
       $tpar -> {thread} = "$_";
+      $|++;
       print ${html_thread ($threads -> {$_}, $template, $tpar)},"\n",'<dd>&nbsp;</dd>',"\n";}
 
     print "</dl>\n",${$template -> scrap ($assign -> {mainDocEnd})};}
       print ${html_thread ($threads -> {$_}, $template, $tpar)},"\n",'<dd>&nbsp;</dd>',"\n";}
 
     print "</dl>\n",${$template -> scrap ($assign -> {mainDocEnd})};}
index 64b05373f4263c20560deedbeeae2908207daa80..57c6b2a5346372761d9a79a899b83e05f5ec7bfe 100644 (file)
@@ -163,6 +163,7 @@ sub print_posting_as_HTML ($$$) {
           })
       } if (%$pheader);
 
           })
       } if (%$pheader);
 
+      $|++;
       print ${$template -> scrap (
         $assign->{mainDoc},
         { $assign->{name}                            => plain(defined $header->{name}  ? $header->{name}  : ''),
       print ${$template -> scrap (
         $assign->{mainDoc},
         { $assign->{name}                            => plain(defined $header->{name}  ? $header->{name}  : ''),
index 8ab2d0f71e261810af2f40691c94985507bcaa5f..c8b9f9c8641d800866d1b37dba96dd4b8a4edb15 100644 (file)
@@ -70,8 +70,8 @@ my $voted;
 
 my ($tid, $mid) = map {$_ || 0} split /;/ => $fup, 2;
 
 
 my ($tid, $mid) = map {$_ || 0} split /;/ => $fup, 2;
 
-$tid = ($tid=~/(\d+)/)[0] || 0;
-$mid = ($mid=~/(\d+)/)[0] || 0;
+$tid = (defined $tid and $tid=~/(\d+)/)? $1: 0;
+$mid = (defined $mid and $mid=~/(\d+)/)? $1: 0;
 
 if ($tid and $mid and $unid) {
 
 
 if ($tid and $mid and $unid) {
 

patrick-canterino.de