summaryrefslogtreecommitdiff
path: root/rhimport.pl
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-02-17 21:51:59 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-02-17 21:51:59 (GMT)
commit46019a7fdc84cf3dfde4a3a95292af2b7899be58 (patch)
treee96ee940fc681f9460a8bf393cf9469f478324f6 /rhimport.pl
parent097dc0dd7ffe2ed58bca1b6ec80aa708e946e096 (diff)
updated (cleaned) GUI
Diffstat (limited to 'rhimport.pl')
-rwxr-xr-xrhimport.pl35
1 files changed, 20 insertions, 15 deletions
diff --git a/rhimport.pl b/rhimport.pl
index 8f8a4ed..5c3b2ca 100755
--- a/rhimport.pl
+++ b/rhimport.pl
@@ -40,37 +40,42 @@ EOF
my $user = 'martinland';#$ENV{'USER'};
$user or die "Username not found in environment";
-my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr";
+# my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr";
-my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;};
+# my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;};
-my $sth = $dbh->prepare($sql);
-$sth->execute();
+# my $sth = $dbh->prepare($sql);
+# $sth->execute();
my @allowed_dbs;
-while(my ($group, $path) = $sth->fetchrow_array()) {
- $path =~ s/\/\*$//;
- my $perm = {};
- $perm->{'GROUP'} = $group;
- $perm->{'PATH'} = $path;
- push @allowed_dbs, $perm;
-}
-$sth->finish();
+# while(my ($group, $path) = $sth->fetchrow_array()) {
+# $path =~ s/\/\*$//;
+# my $perm = {};
+# $perm->{'GROUP'} = $group;
+# $perm->{'PATH'} = $path;
+# push @allowed_dbs, $perm;
+# }
+# $sth->finish();
if($LISTALLOWED) {
for my $href ( @allowed_dbs ) {
print "$href->{'PATH'}\n";
}
- $dbh->disconnect();
+# $dbh->disconnect();
exit 0;
}
## GUI mode
if(!$M3U) {
- my $gui = Gtk2::GladeXML->new('rhimport.glade');
+ my $guixml = Gtk2::GladeXML->new('rhimport.glade');
+ $guixml or die "can't load glade xml file";
+# my $widget = $guixml->get_widget('appwin');
+# $widget or die "can't find main GUI Widget";
+
Gtk2->main;
+# $dbh->disconnect();
exit 0;
}
@@ -83,5 +88,5 @@ if($DONTCONCAT) {
print "Will import $M3U (concatenated), with user $user\n\n";
}
-$dbh->disconnect();
+# $dbh->disconnect();
exit 0;