From f1109715281869813216bfaaf16d9b49128445c5 Mon Sep 17 00:00:00 2001 From: tetragon Date: Thu, 22 Mar 2007 19:02:31 +0000 Subject: Removing delete_dataset git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@982 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/User.pm | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 3cf3e0e5..c9d7713c 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -451,60 +451,6 @@ sub process_query { } - -sub dbdelete { - my ($self, $form) = @_; - - $form->{sid} = $form->{dbdefault}; - &dbconnect_vars($form, $form->{dbdefault}); - my $dbh = DBI->connect( - $form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd}) - or $form->dberror(__FILE__.':'.__LINE__); - my $query = qq|DROP DATABASE "$form->{db}"|; - $dbh->do($query) || $form->dberror(__FILE__.':'.__LINE__.$query); - - $dbh->disconnect; - -} - - - -sub dbsources_unused { - my ($self, $form, $memfile) = @_; - - my @dbexcl = (); - my @dbsources = (); - - $form->error(__FILE__.':'.__LINE__.": $memfile locked!") if (-f "${memfile}.LCK"); - - # open members file - open(FH, '<', "$memfile") or $form->error(__FILE__.':'.__LINE__.": $memfile : $!"); - - while () { - if (/^dbname=/) { - my ($null,$item) = split /=/; - push @dbexcl, $item; - } - } - - close FH; - - $form->{only_acc_db} = 1; - my @db = &dbsources("", $form); - - push @dbexcl, $form->{dbdefault}; - - foreach $item (@db) { - unless (grep /$item$/, @dbexcl) { - push @dbsources, $item; - } - } - - return @dbsources; - -} - - sub dbneedsupdate { my ($self, $form) = @_; -- cgit v1.2.3