ispman/lib/ISPMan ApacheMan.pm,1.59,1.60

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

Modified Files:
	ApacheMan.pm 
Log Message:
added check for domain existence
calling "addVhost" without proper domain, caused wierd problems

Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- ApacheMan.pm	30 Apr 2004 23:40:54 -0000	1.59
+++ ApacheMan.pm	1 May 2004 10:08:37 -0000	1.60
@@ -271,7 +271,12 @@
    
    # save domain info for use in template
    my $domain_info=$self->getDomainInfo($domain);
-   $r->param("domain_info",$domain_info);
+   if ($domain_info) {
+       $r->param("domain_info",$domain_info);
+   } else {
+       print "Domain \"$domain\" does not exist!\n";
+       return 0;
+   }
    
    # determine DN for new vhost
    my $dn=$self->getVhostDN($domain, $ispmanVhostName);



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&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.