[vhffs-dev] [vhffs-dev] [svn] commit: r139 - /trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: soda
Date: Thu Jan 19 18:11:56 2006
New Revision: 139

Log:
Fix bug on PostgreSQL robot (modify DB)=20


Modified:
    trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm

Modified: trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm Thu Jan 19 18:11:56 2006
@@ -62,18 +62,18 @@
=20
 sub update_db
 {
-        my ( $main , $dbname ) =3D @_;
+	my $main =3D shift;
+	my $pg =3D shift;
=20
-        my $pg =3D new Vhffs::Services::Postgres( $main , $dbname );
-        my $db =3D pgsql_admin_db_connect( $main );
+	my $db =3D pgsql_admin_db_connect( $main );
=20
-        if( $pg->fetch > 0 )
-        {
-                $db->do("ALTER USER " . $pg->get_dbusername ." WITH PASSWO=
RD '".$pg->get_dbpassword."'");
-                $pg->set_status( Vhffs::Constants::ACTIVATED );
-                $pg->commit;
-				$pg->blank_password;
-        }
+	if( $pg->fetch > 0 )
+	{
+		$db->do("ALTER USER " . $pg->get_dbusername ." WITH PASSWORD '".$pg->get=
_dbpassword."'");
+		$pg->set_status( Vhffs::Constants::ACTIVATED );
+		$pg->commit;
+		$pg->blank_password;
+	}
 }
=20




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/