summaryrefslogtreecommitdiff
path: root/bin/rt-update-links
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-12-27 00:04:45 +0000
committercvs2git <cvs2git>2010-12-27 00:04:45 +0000
commitc82d349f864e6bd9f96fd1156903bc1f7193a203 (patch)
treee117a87533656110b6acd56fc0ca64289892a9f5 /bin/rt-update-links
parent74e058c8a010ef6feb539248a550d0bb169c1e94 (diff)
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'bin/rt-update-links')
-rw-r--r--bin/rt-update-links36
1 files changed, 0 insertions, 36 deletions
diff --git a/bin/rt-update-links b/bin/rt-update-links
deleted file mode 100644
index 75d554f48..000000000
--- a/bin/rt-update-links
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-use FS::UID qw(adminsuidsetup);
-
-my( $olddb, $newdb ) = ( shift, shift );
-
-$FS::CurrentUser::upgrade_hack = 1;
-my $dbh = adminsuidsetup;
-
-my $statement = "select * from links where base like 'fsck.com-rt://$olddb/%' OR target like 'fsck.com-rt://$olddb/%'";
-
-my $sth = $dbh->prepare($statement) or die $dbh->errstr;
-$sth->execute or die $sth->errstr;
-
-while ( my $row = $sth->fetchrow_hashref ) {
-
- ( my $base = $row->{'base'} )
- =~ s(^fsck\.com-rt://$olddb/)(fsck.com-rt://$newdb/);
-
- ( my $target = $row->{'target'} )
- =~ s(^fsck\.com-rt://$olddb/)(fsck.com-rt://$newdb/);
-
- if ( $row->{'base'} ne $base || $row->{'target'} ne $target ) {
-
- my $update = 'UPDATE links SET base = ?, target = ? where id = ?';
- my @param = ( $base, $target, $row->{'id'} );
-
- warn "$update : ". join(', ', @param). "\n";
- $dbh->do($update, {}, @param );
-
- }
-
-}
-
-$dbh->commit;
-