diff options
author | Florent Villard <warly@mandriva.com> | 2006-08-04 16:45:06 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-08-04 16:45:06 +0000 |
commit | 0a7ef4aa1b338a6c23dccd0db15086596f05a22a (patch) | |
tree | 620105c88261aa086535f04d1ca5fba94cb4cbbf /cgi | |
parent | 1fec4f0cac5732229070c4ad2e24c01ba2bab51b (diff) | |
download | mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.gz mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.bz2 mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.xz mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.zip |
imported initial version of youri svn
Diffstat (limited to 'cgi')
-rwxr-xr-x | cgi/maintainers.cgi | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/cgi/maintainers.cgi b/cgi/maintainers.cgi new file mode 100755 index 0000000..b9fc425 --- /dev/null +++ b/cgi/maintainers.cgi @@ -0,0 +1,65 @@ +#!/usr/bin/perl +# $Id: maintainers.cgi 936 2006-07-01 16:52:49Z guillomovitch $ + +=head1 NAME + +maintainers.cgi - youri CGI interface to maintainers list + +=head1 VERSION + +Version 1.0 + +=head1 DESCRIPTION + +This script allows to get package maintainers list through CGI interface. + +=head1 SYNOPSIS + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2004-2005, YOURI project + +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. + +=head1 AUTHORS + +Guillaume Rousse <guillomovitch@zarb.org>, + +=cut + +use Youri::Bugzilla; +use CGI; +use AppConfig qw/:argcount :expand/; +use strict; +use warnings; + +my $config = AppConfig->new( + { + GLOBAL => { + DEFAULT => undef, + EXPAND => EXPAND_ALL, + ARGCOUNT => ARGCOUNT_ONE, + } + }, + host => { ARGCOUNT => ARGCOUNT_ONE }, + base => { ARGCOUNT => ARGCOUNT_ONE }, + user => { ARGCOUNT => ARGCOUNT_ONE }, + pass => { ARGCOUNT => ARGCOUNT_ONE }, +); + +my $home = (getpwnam($ENV{PROJECT}))[7]; +foreach my $file ("/etc/youri/maintainers.conf", "$home/.youri/maintainers.conf") { + $config->file($file) if -f $file && -r $file; +} + +my $bugzilla = Bugzilla->new( + $config->host(), + $config->base(), + $config->user(), + $config->pass(), +); + +my $cgi = CGI->new(); +print $cgi->header(-type=>'text/plain'); + +$bugzilla->browse_packages(sub { print "$_[0]\t$_[2]\n"; }); |