[Rt-commit] r13106 - rt/branches/3.8-TESTING/share/html/Admin/Tools/Shredder

ruz at bestpractical.com ruz at bestpractical.com
Tue Jun 10 07:38:24 EDT 2008


Author: ruz
Date: Tue Jun 10 07:36:12 2008
New Revision: 13106

Modified:
   rt/branches/3.8-TESTING/share/html/Admin/Tools/Shredder/index.html

Log:
* retab

Modified: rt/branches/3.8-TESTING/share/html/Admin/Tools/Shredder/index.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Admin/Tools/Shredder/index.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Admin/Tools/Shredder/index.html	Tue Jun 10 07:36:12 2008
@@ -53,9 +53,9 @@
 </%ARGS>
 <& /Admin/Elements/Header, Title => $title &>
 <& /Admin/Elements/ToolTabs,
-	current_tab => 'Admin/Tools/Shredder',
-	current_subtab => 'Admin/Tools/Shredder',
-	Title => $title,
+    current_tab => 'Admin/Tools/Shredder',
+    current_subtab => 'Admin/Tools/Shredder',
+    Title => $title,
 &>
 <form id="shredder-search-form" action="<% RT->Config->Get('WebPath') %>/Admin/Tools/Shredder/" method="GET">
 <div id="shredder-select-plugin">
@@ -95,92 +95,92 @@
 
 
 if( $Plugin ) { { # use additional block({}) to effectively exit block on errors
-	use RT::Shredder::Plugin;
-	$plugin_obj = new RT::Shredder::Plugin;
-	my( $status, $msg ) = $plugin_obj->LoadByName( $Plugin );
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = '';
-		last;
-	}
-
-	my %args;
-	foreach my $k( keys %ARGS ) {
-		next unless $k =~ /^\Q$Plugin\E:(.*)$/;
-		$args{ $1 } = $ARGS{$k};
-	}
-	( $status, $msg ) = $plugin_obj->HasSupportForArgs( keys %args );
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = '';
-		last;
-	}
+    use RT::Shredder::Plugin;
+    $plugin_obj = new RT::Shredder::Plugin;
+    my( $status, $msg ) = $plugin_obj->LoadByName( $Plugin );
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = '';
+        last;
+    }
+
+    my %args;
+    foreach my $k( keys %ARGS ) {
+        next unless $k =~ /^\Q$Plugin\E:(.*)$/;
+        $args{ $1 } = $ARGS{$k};
+    }
+    ( $status, $msg ) = $plugin_obj->HasSupportForArgs( keys %args );
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = '';
+        last;
+    }
 
-	($status, $msg) = eval { $plugin_obj->TestArgs( %args ) };
+    ($status, $msg) = eval { $plugin_obj->TestArgs( %args ) };
     $catch_non_fatals->() && last if $@;
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = '';
-		last;
-	}
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = '';
+        last;
+    }
 } }
 
 my $dump_file = '';
 
 if( $Plugin && $Wipeout ) { { # use additional block({}) to effectively exit block on errors
-	my $shredder = new RT::Shredder( force => 1 );
+    my $shredder = new RT::Shredder( force => 1 );
     my $backup_plugin = new RT::Shredder::Plugin;
     my ($status, $msg) = $backup_plugin->LoadByName('SQLDump');
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = ''; @objs = ();
-		last;
-	}
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = ''; @objs = ();
+        last;
+    }
     ($status, $msg) = $backup_plugin->TestArgs;
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = ''; @objs = ();
-		last;
-	}
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = ''; @objs = ();
+        last;
+    }
 
-	($dump_file) = $backup_plugin->FileName;
+    ($dump_file) = $backup_plugin->FileName;
     push @{ $messages{'Success'} }, "SQL dump file is '$dump_file'";
 
     $shredder->AddDumpPlugin( Object => $backup_plugin );
 
-	$shredder->PutObjects( Objects => \@WipeoutObject );
-	($status, $msg) = $plugin_obj->SetResolvers( Shredder => $shredder );
-	unless( $status ) {
-		push @{ $messages{Errors} }, $msg;
-		$Search = ''; @objs = ();
-		last;
-	}
-	eval { $shredder->WipeoutAll };
+    $shredder->PutObjects( Objects => \@WipeoutObject );
+    ($status, $msg) = $plugin_obj->SetResolvers( Shredder => $shredder );
+    unless( $status ) {
+        push @{ $messages{Errors} }, $msg;
+        $Search = ''; @objs = ();
+        last;
+    }
+    eval { $shredder->WipeoutAll };
     $catch_non_fatals->() && last if $@;
 
-	push @{ $messages{Success} }, 'objects were successfuly removed';
+    push @{ $messages{Success} }, 'objects were successfuly removed';
 } }
 
 if( $Plugin && ( $Search || $Wipeout ) ) { { # use additional block({}) to effectively exit block on errors
-	my $status;
-	($status, @objs) = eval { $plugin_obj->Run };
+    my $status;
+    ($status, @objs) = eval { $plugin_obj->Run };
     $catch_non_fatals->() && last if $@;
     unless( $status ) {
-		push @{ $messages{Errors} }, $objs[0];
-		$Search = ''; @objs = ();
-		last;
-	}
-	push @{ $messages{Success} }, 'executed plugin successfuly';
-
-	my $shredder = new RT::Shredder;
-	foreach my $o( splice @objs ) {
-		eval { push @objs, $shredder->CastObjectsToRecords( Objects => $o ) };
+        push @{ $messages{Errors} }, $objs[0];
+        $Search = ''; @objs = ();
+        last;
+    }
+    push @{ $messages{Success} }, 'executed plugin successfuly';
+
+    my $shredder = new RT::Shredder;
+    foreach my $o( splice @objs ) {
+        eval { push @objs, $shredder->CastObjectsToRecords( Objects => $o ) };
         $catch_non_fatals->() && last if $@;
-	}
-	unless( @objs ) {
-		push @{ $messages{Success} }, 'plugin returned empty list';
-	} else {
-		push @{ $messages{Success} }, 'see object list below';
-	}
+    }
+    unless( @objs ) {
+        push @{ $messages{Success} }, 'plugin returned empty list';
+    } else {
+        push @{ $messages{Success} }, 'see object list below';
+    }
 } }
 </%INIT>


More information about the Rt-commit mailing list