[open-ils-commits] r7535 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 9 13:55:36 EDT 2007
Author: erickson
Date: 2007-07-09 13:51:09 -0400 (Mon, 09 Jul 2007)
New Revision: 7535
Removed:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm
Log:
removing deprecated JS builder module
Deleted: trunk/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm 2007-07-09 17:50:52 UTC (rev 7534)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/FastJS.pm 2007-07-09 17:51:09 UTC (rev 7535)
@@ -1,89 +0,0 @@
-package OpenILS::WWW::FastJS;
-use strict; use warnings;
-
-use Apache2 ();
-use Apache::Log;
-use Apache::Const -compile => qw(OK REDIRECT :log);
-use APR::Const -compile => qw(:error SUCCESS);
-use Apache::RequestRec ();
-use Apache::RequestIO ();
-use Apache::RequestUtil;
-
-use CGI ();
-use Template;
-
-use OpenSRF::EX qw(:try);
-
-
-my $main_ttk = "opac/logic/fastjs.ttk";
-my $init_ttk = "opac/logic/page_init.ttk";
-
-my $includes = ['/pines/cvs/ILS/Open-ILS/src/templates'];
-
-my $plugin_base = 'OpenILS::Template::Plugin';
-
-sub handler {
-
- my $apache = shift;
- my $cgi = CGI->new( $apache );
- print "Content-type: text/javascript; charset=utf-8\n\n";
-
- my @files = $cgi->param("file");
- warn "INcluding js files @files\n";
-
- _process_template(
- apache => $apache,
- template => $main_ttk,
- pre_process => $init_ttk,
- files => \@files,
- );
-
- return Apache::OK;
-}
-
-sub _process_template {
-
- my %params = @_;
- my $ttk = $params{template} || return undef;
- my $apache = $params{apache} || undef;
- my $pre_process = $params{pre_process} || undef;
- my $files = $params{files} || [];
-
- my $template;
-
- $template = Template->new( {
- OUTPUT => $apache,
- ABSOLUTE => 1,
- RELATIVE => 1,
- PLUGIN_BASE => $plugin_base,
- PRE_PROCESS => $pre_process,
- INCLUDE_PATH => $includes,
- PRE_CHOMP => 1,
- POST_CHOMP => 1,
- }
- );
-
- try {
-
- if( ! $template->process( $ttk,
- { files => $files, doc_root => $ENV{"DOCUMENT_ROOT"} } ) ) {
-
- warn "Error Occured: " . $template->error();
- my $err = $template->error();
- $err =~ s/\n/\<br\/\>/g;
- warn "Error processing template $ttk\n";
- my $string = "<br><b>Unable to process template:<br/><br/> " . $err . "!!!</b>";
- #$template->process( $error_ttk , { error => $string } );
- }
-
- } catch Error with {
- my $e = shift;
- warn "Error processing template $ttk: $e - $@ \n";
- print "<center><br/><br/><b>Error<br/><br/> $e <br/><br/> $@ </b><br/></center>";
- return;
- };
-
-}
-
-
-1;
More information about the open-ils-commits
mailing list