ispman/lib/ISPMan UserMan.pm,1.36,1.37

[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-serv14570/lib/ISPMan

Modified Files:
	UserMan.pm 
Log Message:
removed hardcoded defaults for user's mail/ftp quota in favor of ispmanConfVars
(also eliminated those nasty ^M caused by some DOS/Windows editor)


Index: UserMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/UserMan.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- UserMan.pm	26 Jan 2004 17:02:19 -0000	1.36
+++ UserMan.pm	26 Jan 2004 20:33:03 -0000	1.37
@@ -54,8 +54,8 @@
    searchUsers
 
    addUserFileServerProcess
-suggestHostForFileServer
-
+suggestHostForFileServer
+
 );
 $VERSION = '0.01';
 
@@ -150,19 +150,19 @@
    $r->param("sn", ($r->param("sn")? $r->param("sn"):$r->param("userid")));
    $r->param("homeDirectory", $homeDirectory);
 
-   #define 1 MB quota by default
+   # validate ftp quota 
    if ($r->param("FTPQuotaMBytes") !~ /\d\d*/  || $r->param("FTPQuotaMBytes") < 0) {
-      $r->param("FTPQuotaMBytes", 1);
+      $r->param("FTPQuotaMBytes", $self->getConf('defaultUserFtpQuota'));
    }
 
-   #define 5 MB quota by default
+   # validate mail quota
    if ($r->param("mailQuota") !~ /\d\d*/  || $r->param("mailQuota") < 0) {
-      $r->param("mailQuota", 5);
-   }
-   
-   unless (defined $r->param("fileHost") && $r->param("fileHost") ne "none" ){
-		   $r->param('fileHost', $self->suggestHostForFileServer($domain));
-   }
+      $r->param("mailQuota", $self->getConf('defaultUserMailQuota'));
+   }
+
+   unless (defined $r->param("fileHost") && $r->param("fileHost") ne "none" ){
+		   $r->param('fileHost', $self->suggestHostForFileServer($domain));
+   }
    
 
    $r->param("homeDirectory", $homeDirectory);
@@ -554,21 +554,21 @@
 
 
 
-sub suggestHostForFileServer {
-	my $self=shift;
-	
+sub suggestHostForFileServer {
+	my $self=shift;
+	
 	my ($domain)=@_;
-
-	my $_filehost;
-			 
+
+	my $_filehost;
+			 
 	if ($_filehost=$self->getDomainAttribute($domain, "ispmanDomainDefaultFileServer")){
-		return  $_filehost;
+		return  $_filehost;
 	}elsif ($_filehost=$self->getHostGroupFirstMember('fileservergroup')) {
-		return  $_filehost;
+		return  $_filehost;
 	} else {
-		return 0;
+		return 0;
 	}
-}
+}
 
 
 



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
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.