ispman/lib database.MySQL.lib,1.3,1.4
Joerg Delker <[email protected]> Fri, 06 Feb 2009 10:09:19 +0000
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/lib
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19045/lib
Modified Files:
database.MySQL.lib
Log Message:
added "IF NOT EXISTS" to db creation cmd
allow db action script to by fully qualified
Index: database.MySQL.lib
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/database.MySQL.lib,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- database.MySQL.lib 30 Jan 2009 13:12:25 -0000 1.3
+++ database.MySQL.lib 6 Feb 2009 10:09:17 -0000 1.4
@@ -59,10 +59,11 @@
sub add_database {
my $params = shift;
- my $sql = "CREATE DATABASE " . $params->{'ispmanDBName'} . ";";
+ my $sql = "CREATE DATABASE " . $params->{'ispmanDBName'} . " IF NOT EXISTS;";
$sql .= sql_grant($params);
$sql .= "use " . $params->{'ispmanDBName'} . ";";
- $sql .= join ";", map { "\\. ".$ispman->{'Config'}{'installDir'}."/tasks/$_" } split('\|',$params->{'actions'});
+ $sql .= join ";", map { "\\. " . ((/^\//)?$_:($ispman->getConf{'installDir'}."/tasks/$_")) }
+ split('\|',$params->{'actions'});
return "echo \"$sql\" | $cmnds{'mysql'} --defaults-file=$defaultsfile";
}
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com