[siesta-commit] siesta index.cgi,1.2,1.3

[prev] [thread] [next] [lurker] [Date index for 2002/08/29]

From: muttley
Subject: [siesta-commit] siesta index.cgi,1.2,1.3
Date: 08:28 on 29 Aug 2002
Update of /cvsroot/siesta/siesta
In directory usw-pr-cvs1:/tmp/cvs-serv12025

Modified Files:
	index.cgi 
Log Message:
TStill having prolmes.


Index: index.cgi
===================================================================
RCS file: /cvsroot/siesta/siesta/index.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- index.cgi	21 Aug 2002 00:53:41 -0000	1.2
+++ index.cgi	29 Aug 2002 07:28:30 -0000	1.3
@@ -4,33 +4,46 @@
 use CGI;
 use Template;
 use File::Find::Rule qw/find/;
+use Siesta::Storage::Table::Lists;
 
 my $cgi  = new CGI();
 
 print $cgi->header();
 
-my $mode = $cgi->param('plugin') || 'default';
+my $mode = $cgi->param('mode') || 'lists';
 
 # hack
-unshift @INC, "/home/simon/projects/siesta/lib";
-unshift @INC, "/home/richardc/lab/siesta/lib";
 my @dirs = map {"$_/Siesta/Plugin"} @INC;
-print join "<br/>\n", @dirs;
-print "<hr><br/>";
-
-
 my @files = find (name => "*.pm", in => \@dirs);
+my @plugins;
 
-foreach my $dir (@files) {
-    print $dir."<br/>\n";
+foreach my $file (@files)
+{
+	$file =~ s!^.*[\\/](.+=?)\.pm!$1!i;
+	push @plugins, { 'name' => $file };
 }
 
+my $t_lists = Siesta::Storage::Table::Lists->new();
+my @t_lists = $t_lists->retrieve_all();
+my @lists;
+#foreach my $list (qw(siesta-dev siesta-commit))
+foreach my $list (@t_lists)
+{	
+	#print STDERR $list->id();
+	push @lists, {'name' => $list};
+}
 
-my $vars = {};
+my $vars = {
+		plugins => \@plugins, 
+		lists   => \@lists,
+		plugin  => $cgi->param('plugin') || "", 
+		list    => $cgi->param('list') || "", 
+	   };
 
 
     my $template = Template->new({
-	INCLUDE_PATH => 'templates',
+	INCLUDE_PATH => './templates:',
+	PRE_PROCESS  => 'pre-config',
     });
 
     $template->process($mode, $vars)



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52