From c82d349f864e6bd9f96fd1156903bc1f7193a203 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Mon, 27 Dec 2010 00:04:45 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'. --- httemplate/misc/process/meta-import.cgi | 190 -------------------------------- 1 file changed, 190 deletions(-) delete mode 100644 httemplate/misc/process/meta-import.cgi (limited to 'httemplate/misc/process/meta-import.cgi') diff --git a/httemplate/misc/process/meta-import.cgi b/httemplate/misc/process/meta-import.cgi deleted file mode 100644 index 68ae49c60..000000000 --- a/httemplate/misc/process/meta-import.cgi +++ /dev/null @@ -1,190 +0,0 @@ -<% include("/elements/header.html",'Map tables') %> - - - -
-% -% #use DBIx::DBSchema; -% my $schema = new_native DBIx::DBSchema -% map { $cgi->param($_) } qw( data_source username password ); -% foreach my $field (qw( data_source username password )) { - - VALUE="<% $cgi->param($field) %>"> -% } -% -% my %schema; -% use Tie::DxHash; -% tie %schema, 'Tie::DxHash'; -% if ( $cgi->param('schema') ) { -% my $schema_string = $cgi->param('schema'); -% - -% -% %schema = map { /^\s*(\w+)\s*=>\s*(\w+)\s*$/ -% or die "guru meditation #420: $_"; -% ( $1 => $2 ); -% } -% split( /\n/, $schema_string ); -% } -% -% #first page -% unless ( $cgi->param('magic') ) { - - - - <% hashmaker('schema', [ $schema->tables ], - [ grep !/^h_/, dbdef->tables ], ) %> -
-% -% -% #second page -% } elsif ( $cgi->param('magic') eq 'process' ) { - - - -% -% -% my %unique; -% foreach my $table ( keys %schema ) { -% -% my @from_columns = $schema->table($table)->columns; -% my @fs_columns = dbdef->table($schema{$table})->columns; -% -% - - <% hashmaker( $table.'__'.$unique{$table}++, - \@from_columns => \@fs_columns, - $table => $schema{$table}, ) %> -


-% -% -% } -% -% - -
-% -% -% #third (results) -% } elsif ( $cgi->param('magic') eq 'process2' ) { -% -% print "
\n";
-%
-%    my %unique;
-%    foreach my $table ( keys %schema ) {
-%      ( my $spaces = $table ) =~ s/./ /g;
-%      print "'$table' => { 'table' => '$schema{$table}',\n".
-%            #(length($table) x ' '). "         'map'   => {\n";
-%            "$spaces        'map'   => {\n";
-%      my %map = map { /^\s*(\w+)\s*=>\s*(\w+)\s*$/
-%                         or die "guru meditation #420: $_";
-%                       ( $1 => $2 );
-%                     }
-%                 split( /\n/, $cgi->param($table.'__'.$unique{$table}++) );
-%      foreach ( keys %map ) {
-%        print "$spaces                     '$_' => '$map{$_}',\n";
-%      }
-%      print "$spaces                   },\n";
-%      print "$spaces      },\n";
-%
-%    }
-%    print "\n
"; -% -% } else { -% warn "unrecognized magic: ". $cgi->param('magic'); -% } -% -% - -
- - -% -% #hashmaker widget -% sub hashmaker { -% my($name, $from, $to, $labelfrom, $labelto) = @_; -% my $fromsize = scalar(@$from); -% my $tosize = scalar(@$to); -% "'. -% '
$labelfrom$labelto
". -% qq!\n
". -% qq!!. -% '
'. -% qq!\n
". -% qq!!. -% '
'. -% qq!!. -% '
'. -% qq!!. -% '
'. -% "". -% ''; -% } -% -% -<%init> - -#there's no ACL for this... haven't used in ages -#make XSS-safe if this is used for more than just admins to import data.... -die 'meta-import not enabled; remove this if you want to use it'; - - -- cgit v1.2.1