/[smecontribs]/rpms/smeserver-awstats/contribs7/smeserver-awstats-1.2-note.patch
ViewVC logotype

Annotation of /rpms/smeserver-awstats/contribs7/smeserver-awstats-1.2-note.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Sep 20 02:50:22 2008 UTC (16 years, 2 months ago) by dungog
Branch: MAIN
CVS Tags: smeserver-awstats-1_2-6_el4_sme, smeserver-awstats-1_2-7_el4_sme
add note to awstats panel

1 dungog 1.1 --- smeserver-awstats-1.2/root/etc/e-smith/web/functions/awstats.note 2007-04-06 14:59:44.000000000 +1000
2     +++ smeserver-awstats-1.2/root/etc/e-smith/web/functions/awstats 2008-09-20 12:48:10.000000000 +1000
3     @@ -173,43 +173,43 @@
4     print $q->hr;
5     }
6    
7     - # find domains that this user can edit, store in @mydom
8     - my $acctName = $ENV{'REMOTE_USER'};
9     + # find domains that this user can edit, store in @mydom
10     + my $acctName = $ENV{'REMOTE_USER'};
11     my $owner = '';
12     -
13     - my @mydom = ();
14     - my @alldom = ();
15     -
16     - if ($acctName ne 'admin')
17     - {
18     - #A. user must be set as owner
19     - #1. include all virtual domains + primary
20     - foreach (keys %domains)
21     - {
22     - push (@alldom, $_)
23     - if (db_get_type(\%domains, $_) eq "domain");
24     - }
25     -
26     - #2. only retain this users domains
27     - foreach my $vd (@alldom)
28     - {
29     - if ($vd eq db_get(\%conf, 'DomainName'))
30     - {
31     - $owner = db_get_prop(\%conf, "AWStats", "owner") || 'admin';
32     - }
33     - else
34     - {
35     - $owner = db_get_prop(\%domains, $vd, "owner") || 'admin';
36     - }
37     -
38     +
39     + my @mydom = ();
40     + my @alldom = ();
41     +
42     + if ($acctName ne 'admin')
43     + {
44     + #A. user must be set as owner
45     + #1. include all virtual domains + primary
46     + foreach (keys %domains)
47     + {
48     + push (@alldom, $_)
49     + if (db_get_type(\%domains, $_) eq "domain");
50     + }
51     +
52     + #2. only retain this users domains
53     + foreach my $vd (@alldom)
54     + {
55     + if ($vd eq db_get(\%conf, 'DomainName'))
56     + {
57     + $owner = db_get_prop(\%conf, "AWStats", "owner") || 'admin';
58     + }
59     + else
60     + {
61     + $owner = db_get_prop(\%domains, $vd, "owner") || 'admin';
62     + }
63     +
64     #is owner a group ?
65     my $userlist = db_get_prop(\%accounts, $owner, 'Members') || 'notgroup';
66     if ($userlist eq 'notgroup')
67     {
68     #then is it a user or everyone ?
69     - if (($owner eq $acctName) || ($owner eq 'everyone'))
70     - {
71     - push (@mydom, $vd);
72     + if (($owner eq $acctName) || ($owner eq 'everyone'))
73     + {
74     + push (@mydom, $vd);
75     }
76     }
77     else
78     @@ -218,24 +218,24 @@
79     my @selected = split (/,/, $userlist);
80     foreach my $grpmem (@selected)
81     {
82     - if ($grpmem eq $acctName)
83     - {
84     - push (@mydom, $vd);
85     + if ($grpmem eq $acctName)
86     + {
87     + push (@mydom, $vd);
88     }
89     }
90     }
91     - }
92     - }
93     - else
94     + }
95     + }
96     + else
97     {
98     - #B. admin gets all domains
99     - foreach (keys %domains)
100     - {
101     - push (@mydom, $_)
102     - if (db_get_type(\%domains, $_) eq "domain");
103     - }
104     - }
105     -
106     + #B. admin gets all domains
107     + foreach (keys %domains)
108     + {
109     + push (@mydom, $_)
110     + if (db_get_type(\%domains, $_) eq "domain");
111     + }
112     + }
113     +
114    
115     print $q->startform (-method => 'POST', -action => $q->url (-absolute => 1));
116    
117     @@ -262,7 +262,9 @@
118    
119     print $q->h4 ("List of Domains viewable by $acctName");
120    
121     - print "Note: A Domain is not shown until statistics are available.<br>";
122     + print "Note: A Domain is not shown in the list below until after midnight on the day <br>".
123     + "statistics are available. To force the display sooner, browse to the website to <br>".
124     + "create some stats, then resave awstats settings.<br>";
125    
126     print "<table border=1 cellspacing=1 cellpadding=4>";
127    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed