From: Leandro Lucarella Date: Thu, 29 Jan 2004 17:53:32 +0000 (+0000) Subject: Acomodo la configuracion X-Git-Tag: svn_import~46 X-Git-Url: https://git.llucax.com/mecon/samurai.git/commitdiff_plain/0b4c46600fea05f1d7a5f1a423fb771c13deab66?ds=sidebyside Acomodo la configuracion --- diff --git a/lib/SAMURAI/DB/consultas.ini b/lib/SAMURAI/DB/consultas.ini index a7a2c15..2822624 100644 --- a/lib/SAMURAI/DB/consultas.ini +++ b/lib/SAMURAI/DB/consultas.ini @@ -1,6 +1,6 @@ ; ConfiguraciĆ³n de la base de datos. ; $Id$ -dsn = "mysql://intranet:intranet@bal747f/samurai" +dsn = "mysql://samurai:25fdd50c0e4d68@unix(/var/run/mysqld/mysqld.sock)/samurai" [opciones] persistent = true diff --git a/lib_perl/Perm.epl b/lib_perl/Perm.epl index 99e8af9..346cc67 100644 --- a/lib_perl/Perm.epl +++ b/lib_perl/Perm.epl @@ -46,7 +46,8 @@ $SAMURAI_Perm->{new} = sub $udat{SAMURAI_Perm_vars}{id_sistema} = @_[1]; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); ##Obtengo los permisos de la base $re = $dbh->prepare($sql); $re->execute($udat{SAMURAI_Perm_vars}{login}); @@ -151,7 +152,7 @@ $SAMURAI_Perm->{getObservaciones} = sub $udat{SAMURAI_Perm_vars}{observaciones} = ''; $sql = 'SELECT ps.observaciones AS observaciones FROM samurai.perm_sist AS ps WHERE ps.id_permiso = ? AND ps.id_sistema = ?'; #TODO cambiar los parametros de conexion segun corresponda - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); $re = $dbh->prepare($sql); $re->execute($perm, $sistema); while ($r = $re->fetchrow_hashref()) { @@ -177,7 +178,7 @@ $SAMURAI_Perm->{asignarPerfil} = sub my $sql = "REPLACE INTO perfil_sist_usuario (login,id_perfil,id_sistema,responsable) VALUES ('$login',$id_perfil,$id_sistema,'$resp')"; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); my $result=$dbh->do($sql); #Desconexion con la base $dbh->disconnect; @@ -195,7 +196,7 @@ $SAMURAI_Perm->{quitarPerfil} = sub my $sql = "DELETE FROM perfil_sist_usuario where (login='$login') AND (id_perfil=$id_perfil) AND (id_sistema=$id_sistema)"; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); my $result=$dbh->do($sql); #Desconexion con la base $dbh->disconnect;