ispman/lib/ISPMan ApacheMan.pm,1.52,1.53 UserMan.pm,1.39,1.40
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2388/lib/ISPMan
Modified Files:
ApacheMan.pm UserMan.pm
Log Message:
fixed bug [ 923378 ] ispmanMaxVhosts and ispmanMaxAccounts are not checked
thanks to Carsten Ginter
Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ApacheMan.pm 15 Feb 2004 21:24:42 -0000 1.52
+++ ApacheMan.pm 16 Apr 2004 18:29:08 -0000 1.53
@@ -270,6 +270,16 @@
my $dn=$self->getVhostDN($domain, $ispmanVhostName);
$r->param("dn", $dn);
+ my $domainMaxVhosts = $self->getDomainAttribute($domain,"ispmanMaxVhosts");
+ my $domainVhostCount = $self->getVhostCount($domain);
+
+ if ($domainVhostCount >= $domainMaxVhosts) {
+ $self->{'message'}="Max vhosts limit exceeded. <br>Your limit is $domainMaxVhosts <br>You cannot create any more vhosts.";
+ print $self->{'message'}:
+ return;
+ }
+
+
$self->prepareBranchForDN($self->getVhostsBranchDN($domain));
my $documentrootoptions=$self->as_arrayref($r->param("ispmanVhostDocumentRootOption"));
Index: UserMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/UserMan.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- UserMan.pm 8 Feb 2004 20:32:49 -0000 1.39
+++ UserMan.pm 16 Apr 2004 18:29:08 -0000 1.40
@@ -131,6 +131,16 @@
my $domain=$r->param("ispmanDomain");
+ my $domainMaxUsers = $self->getDomainAttribute($domain,"ispmanMaxAccounts");
+ my $domainUserCount = $self->getUserCount($domain);
+
+ if ($domainUserCount >= $domainMaxUsers) {
+ $self->{'message'}="Max accounts limit exceeded. <br>Your limit is $domainMaxUsers <br>You cannot create any more users.";
+ print $self->{'message'}:
+ return;
+ }
+
+
my $_uid=$self->create_uid($r->param("uid"), $r->param("ispmanDomain"));
$r->param("uid", $_uid);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click