~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/lib/Foswiki/Configure/Checkers/ConfigurationLogName.pm

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# See bottom of file for license and copyright information
 
2
package Foswiki::Configure::Checkers::ConfigurationLogName;
 
3
 
 
4
use strict;
 
5
 
 
6
use base 'Foswiki::Configure::Checker';
 
7
 
 
8
use Foswiki::Configure::Checker;
 
9
use Foswiki::Configure::Load;
 
10
 
 
11
sub check {
 
12
    my $this = shift;
 
13
 
 
14
    if (   $Foswiki::cfg{ConfigurationLogName}
 
15
        && $Foswiki::cfg{ConfigurationLogName}!~/^NOT SET/ )
 
16
    {
 
17
        my $logFile = $Foswiki::cfg{ConfigurationLogName} || "";
 
18
        $logFile =~ s/%DATE%/DATE/;
 
19
        Foswiki::Configure::Load::expandValue($logFile);
 
20
        my $e = $this->checkCanCreateFile($logFile);
 
21
        $e = $this->ERROR($e) if $e;
 
22
        return $e;
 
23
    }
 
24
    else {
 
25
        $Foswiki::cfg{ConfigurationLogName} =~ s/^NOT SET/$Foswiki::cfg{DataDir}/g;
 
26
        return $this->guessed(0);
 
27
    }
 
28
    return '';
 
29
}
 
30
 
 
31
1;
 
32
__DATA__
 
33
#
 
34
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
 
35
#
 
36
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
 
37
# Foswiki Contributors are listed in the AUTHORS file in the root
 
38
# of this distribution. NOTE: Please extend that file, not this notice.
 
39
#
 
40
# Additional copyrights apply to some or all of the code in this
 
41
# file as follows:
 
42
#
 
43
# Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved.
 
44
# TWiki Contributors are listed in the AUTHORS file in the root
 
45
# of this distribution. NOTE: Please extend that file, not this notice.
 
46
#
 
47
# This program is free software; you can redistribute it and/or
 
48
# modify it under the terms of the GNU General Public License
 
49
# as published by the Free Software Foundation; either version 2
 
50
# of the License, or (at your option) any later version. For
 
51
# more details read LICENSE in the root of this distribution.
 
52
#
 
53
# This program is distributed in the hope that it will be useful,
 
54
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
55
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
56
#
 
57
# As per the GPL, removal of this notice is prohibited.