projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b4060ee
)
quick hack to add extra 'config lines' to svc_www and otherwise enhance svc_www
author
jeff
<jeff>
Sun, 1 Apr 2007 02:45:28 +0000
(
02:45
+0000)
committer
jeff
<jeff>
Sun, 1 Apr 2007 02:45:28 +0000
(
02:45
+0000)
FS/FS/AccessRight.pm
patch
|
blob
|
history
FS/FS/Schema.pm
patch
|
blob
|
history
bin/apache.export
patch
|
blob
|
history
httemplate/edit/svc_www.cgi
patch
|
blob
|
history
httemplate/view/svc_www.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/AccessRight.pm
b/FS/FS/AccessRight.pm
index
5194bd4
..
f67614a
100644
(file)
--- a/
FS/FS/AccessRight.pm
+++ b/
FS/FS/AccessRight.pm
@@
-116,6
+116,7
@@
assigned to users and/or groups.
# customer service rights
###
'Edit usage', #NEW
# customer service rights
###
'Edit usage', #NEW
+ 'Edit www config', #NEW
'View customer services', #NEW
'Provision customer service',
'Recharge customer service', #NEW
'View customer services', #NEW
'Provision customer service',
'Recharge customer service', #NEW
diff --git
a/FS/FS/Schema.pm
b/FS/FS/Schema.pm
index
84078fa
..
e0fef91
100644
(file)
--- a/
FS/FS/Schema.pm
+++ b/
FS/FS/Schema.pm
@@
-940,6
+940,7
@@
sub tables_hashref {
'svcnum', 'int', '', '', '', '',
'recnum', 'int', '', '', '', '',
'usersvc', 'int', '', '', '', '',
'svcnum', 'int', '', '', '', '',
'recnum', 'int', '', '', '', '',
'usersvc', 'int', '', '', '', '',
+ 'config', 'text', 'NULL', '', '', '',
],
'primary_key' => 'svcnum',
'unique' => [],
],
'primary_key' => 'svcnum',
'unique' => [],
diff --git
a/bin/apache.export
b/bin/apache.export
index
47863a9
..
b39b5f1
100755
(executable)
--- a/
bin/apache.export
+++ b/
bin/apache.export
@@
-36,9
+36,12
@@
foreach my $export ( @exports ) {
my @svc_www = $export->svc_x;
foreach my $svc_www ( @svc_www ) {
my @svc_www = $export->svc_x;
foreach my $svc_www ( @svc_www ) {
- use vars qw($zone $username);
+ use vars qw($zone $username
$dir $email $config
);
$zone = $svc_www->domain_record->zone;
$username = $svc_www->svc_acct->username;
$zone = $svc_www->domain_record->zone;
$username = $svc_www->svc_acct->username;
+ $dir = $svc_www->svc_acct->dir;
+ $email = $svc_www->svc_acct->email;
+ $config = $svc_www->config;
print HTTPD_CONF eval(qq("$template")). "\n\n";
}
print HTTPD_CONF eval(qq("$template")). "\n\n";
}
diff --git
a/httemplate/edit/svc_www.cgi
b/httemplate/edit/svc_www.cgi
index
4b27752
..
a9f97ff
100644
(file)
--- a/
httemplate/edit/svc_www.cgi
+++ b/
httemplate/edit/svc_www.cgi
@@
-1,6
+1,6
@@
%my $conf = new FS::Conf;
%
%my $conf = new FS::Conf;
%
-%my( $svcnum, $pkgnum, $svcpart, $part_svc, $svc_www );
+%my( $svcnum, $pkgnum, $svcpart, $part_svc, $svc_www
, $config
);
%
%if ( $cgi->param('error') ) {
%
%
%if ( $cgi->param('error') ) {
%
@@
-10,6
+10,7
@@
% $svcnum = $svc_www->svcnum;
% $pkgnum = $cgi->param('pkgnum');
% $svcpart = $cgi->param('svcpart');
% $svcnum = $svc_www->svcnum;
% $pkgnum = $cgi->param('pkgnum');
% $svcpart = $cgi->param('svcpart');
+% $config = $cgi->param('config');
% $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
% die "No part_svc entry!" unless $part_svc;
%
% $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
% die "No part_svc entry!" unless $part_svc;
%
@@
-42,6
+43,7
@@
%
% $pkgnum=$cust_svc->pkgnum;
% $svcpart=$cust_svc->svcpart;
%
% $pkgnum=$cust_svc->pkgnum;
% $svcpart=$cust_svc->svcpart;
+% $config=$svc_www->config;
%
% $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
% die "No part_svc entry!" unless $part_svc;
%
% $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
% die "No part_svc entry!" unless $part_svc;
@@
-200,6
+202,14
@@
% print "</SELECT></TD></TR>";
%}
%
% print "</SELECT></TD></TR>";
%}
%
+%if ( $part_svc->part_svc_column('config')->columnflag ne 'F' &&
+% $FS::CurrentUser::CurrentUser->access_right('Edit www config') ) {
+% print '<TR><TD ALIGN="right">Config lines</TD><TD>';
+% print qq!<TEXTAREA NAME="config" rows="15" cols="80">$config</TEXTAREA></TD></TR>!
+%}else{
+% print qq!<INPUT TYPE="hidden" NAME="config" VALUE="$config">!;
+%}
+%
%foreach my $field ($svc_www->virtual_fields) {
% if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) {
% # If the flag is X, it won't even show up in $svc_acct->virtual_fields.
%foreach my $field ($svc_www->virtual_fields) {
% if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) {
% # If the flag is X, it won't even show up in $svc_acct->virtual_fields.
diff --git
a/httemplate/view/svc_www.cgi
b/httemplate/view/svc_www.cgi
index
0579a55
..
c503d18
100644
(file)
--- a/
httemplate/view/svc_www.cgi
+++ b/
httemplate/view/svc_www.cgi
@@
-73,6
+73,8
@@
%
% print '</TD></TR>';
%}
%
% print '</TD></TR>';
%}
+ <% qq!<TR><TD ALIGN="right">Config lines</TD>! %>
+ <% qq!<TD BGCOLOR="#ffffff"><pre>!.$cgi->escapeHTML(join("\n",$svc_www->config))."</pre></TD></TR>" %>
%
%foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
% print $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)),
%
%foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
% print $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)),