ispman/lib/ISPMan ApacheMan.pm,1.55,1.56 UserMan.pm,1.44,1.45

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-serv29237/lib/ISPMan

Modified Files:
	ApacheMan.pm UserMan.pm 
Log Message:
updated check for vhost/user limit checks to honor negative values (e.g. -1) for unlimited configuration


Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- ApacheMan.pm	17 Apr 2004 15:43:35 -0000	1.55
+++ ApacheMan.pm	17 Apr 2004 16:18:44 -0000	1.56
@@ -272,7 +272,7 @@
    my $domainMaxVhosts = $self->getDomainAttribute($domain,"ispmanMaxVhosts");
    my $domainVhostCount = $self->getVhostCount($domain);
    
-   if ($domainVhostCount >= $domainMaxVhosts) {
+   if ($domainMaxVhosts>0 && $domainVhostCount >= $domainMaxVhosts) {
    	  $self->{'message'}="Max vhosts limit exceeded. <br>Your limit is $domainMaxVhosts <br>You cannot create any more vhosts.";
    	  print $self->{'message'};
    	  return;

Index: UserMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/UserMan.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- UserMan.pm	17 Apr 2004 15:43:36 -0000	1.44
+++ UserMan.pm	17 Apr 2004 16:18:44 -0000	1.45
@@ -130,7 +130,7 @@
    my $domainMaxUsers = $self->getDomainAttribute($domain,"ispmanMaxAccounts");
    my $domainUserCount = $self->getUserCount($domain);
    
-   if ($domainUserCount >= $domainMaxUsers) {
+   if ($domainMaxUsers>0 && $domainUserCount >= $domainMaxUsers) {
    	  $self->{'message'}="Max accounts limit exceeded. <br>Your limit is $domainMaxUsers <br>You cannot create any more users.";
    	  print $self->{'message'};
    	  return;



-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.