[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) 


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

Modified: trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm
==============================================================================
--- 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 @@
 
 sub update_db
 {
-        my ( $main , $dbname ) = @_;
+	my $main = shift;
+	my $pg = shift;
 
-        my $pg = new Vhffs::Services::Postgres( $main , $dbname );
-        my $db = pgsql_admin_db_connect( $main );
+	my $db = pgsql_admin_db_connect( $main );
 
-        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;
-        }
+	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;
+	}
 }
 
 




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