ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Configuration/ConfigArea.pm
(Generate patch)

Comparing COMP/SCRAM/src/Configuration/ConfigArea.pm (file contents):
Revision 1.26 by sashby, Wed Feb 2 18:57:01 2005 UTC vs.
Revision 1.29 by sashby, Thu Mar 10 12:39:28 2005 UTC

# Line 311 | Line 311 | sub sitename
311     return $self->{sitename};
312     }
313  
314 + sub admindir()
315 +   {
316 +   my $self=shift;
317 +  
318 +   @_ ? $self->{admindir} = shift
319 +      : $self->{admindir};
320 +   }
321  
322   sub bootstrapfromlocation {
323          my $self=shift;
# Line 575 | Line 582 | sub save {
582          $self->_SaveEnvFile();
583   }
584  
585 + sub reqdoc()
586 +   {
587 +   my $self=shift;
588 +   my ($path)=@_;
589 +   return $path."/".$self->{reqdoc};
590 +   }
591 +
592 + sub creationtime()
593 +   {
594 +   my $self=shift;
595 +   my ($location)= @_;
596 +   $location||=$self->location();
597 +   my $requirementsdoc = $self->reqdoc($location);
598 +   my ($mode, $time) = (stat($requirementsdoc))[2, 9];
599 +   my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);
600 +
601 +   ($sec < 10) ? ($sec = "0".$sec) : $sec;
602 +   ($min < 10) ? ($min = "0".$min) : $min;
603 +
604 +   $year += 1900;
605 +   my $months =
606 +      {
607 +      0 => "Jan", 1 => "Feb",
608 +      2 => "Mar", 3 => "Apr",
609 +      4 => "May", 5 => "Jun",
610 +      6 => "Jul", 7 => "Aug",
611 +      8 => "Sept", 9 => "Oct",
612 +      10 => "Nov", 11 => "Dec" };
613 +  
614 +   my $days = { 1 => "Mon", 2 => "Tue", 3 => "Wed", 4 => "Thu", 5 => "Fri", 6 => "Sat", 7 => "Sun"};
615 +  
616 +   # Return the timestamp (as string) of the requirementsdoc:
617 +   return $days->{$wday}."-".$mday."-".$months->{$mon}."-".$year." ".$hour.":".$min.":".$sec;
618 +   }
619 +
620   # ---- support routines
621  
622   sub _SaveEnvFile
# Line 654 | Line 696 | sub _LoadEnvFile
696        }
697     if ( defined $self->{ENV}{"SCRAM_TOOLBOXVERSION"} )
698        {
699 <      $self->toolboxversion($self->{ENV}{"SCRAM_TOOLBOXVERSION"});
699 >      if ($self->{ENV}{"SCRAM_TOOLBOXVERSION"} eq '')
700 >         {
701 >         $self->toolboxversion("STANDALONE");
702 >         }
703 >      else
704 >         {
705 >         $self->toolboxversion($self->{ENV}{"SCRAM_TOOLBOXVERSION"});
706 >         }
707        }
708    
709     if ( ( defined $self->{ENV}{"RELEASETOP"} ) &&

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines