[open-ils-commits] r9533 - in branches/acq-experiment: . Open-ILS/src/perlmods/OpenILS/Application Open-ILS/src/perlmods/OpenILS/WWW Open-ILS/src/perlmods/OpenILS/WWW/AddedContent Open-ILS/src/support-scripts Open-ILS/web/js/dojo/openils

svn at svn.open-ils.org svn at svn.open-ils.org
Thu May 8 12:06:32 EDT 2008


Author: erickson
Date: 2008-05-08 12:06:30 -0400 (Thu, 08 May 2008)
New Revision: 9533

Added:
   branches/acq-experiment/Open-ILS/web/js/dojo/openils/CGI.js
Modified:
   branches/acq-experiment/
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm
   branches/acq-experiment/Open-ILS/src/support-scripts/settings-tester.pl
Log:
Merged revisions 9515,9520,9525,9527,9532 via svnmerge from 
svn://svn.open-ils.org/ILS/trunk

........
  r9515 | dbs | 2008-05-06 15:59:06 -0400 (Tue, 06 May 2008) | 2 lines
  
  After 1.2, domains element is no longer used
........
  r9520 | miker | 2008-05-07 14:17:37 -0400 (Wed, 07 May 2008) | 1 line
  
  do not record emtpy tcn valuesOpen-ILS/src/perlmods/OpenILS/Application/Cat.pm
........
  r9525 | erickson | 2008-05-07 16:40:13 -0400 (Wed, 07 May 2008) | 1 line
  
  added content handler no longer tries to pull from the cache when the plugin cannot return data for that type of call anyway.  removed Amazon stub methods because they 1. should have returned explicit undef, but more importantly because having them around means extra calls to memcache
........
  r9527 | erickson | 2008-05-07 16:46:49 -0400 (Wed, 07 May 2008) | 1 line
  
  applying empty tcn check on marc overlay api call as well
........
  r9532 | erickson | 2008-05-08 12:01:57 -0400 (Thu, 08 May 2008) | 1 line
  
  dojo-ized CGI parser
........



Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk:1-9513
   + /trunk:1-9532

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2008-05-08 16:01:57 UTC (rev 9532)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2008-05-08 16:06:30 UTC (rev 9533)
@@ -217,7 +217,7 @@
 
 	    return $evt if $evt;
 
-		$rec->tcn_value($tcn);
+		$rec->tcn_value($tcn) if ($tcn);
 		$rec->tcn_source($tsource);
 
     } else {
@@ -292,7 +292,7 @@
 
 	$record->source(bib_source_from_name($source)) if $source;
 	$record->tcn_source($tcn_source);
-	$record->tcn_value($tcn);
+	$record->tcn_value($tcn) if ($tcn);
 	$record->creator($e->requestor->id);
 	$record->editor($e->requestor->id);
 	$record->create_date('now');

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm	2008-05-08 16:01:57 UTC (rev 9532)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent/Amazon.pm	2008-05-08 16:06:30 UTC (rev 9533)
@@ -47,65 +47,6 @@
 
 # --------------------------------------------------------------------------
 
-sub toc_html {
-    my( $self, $key ) = @_;
-}
-
-sub toc_xml {
-    my( $self, $key ) = @_;
-}
-
-sub toc_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
-sub anotes_html {
-    my( $self, $key ) = @_;
-}
-
-sub anotes_xml {
-    my( $self, $key ) = @_;
-}
-
-sub anotes_json {
-    my( $self, $key ) = @_;
-}
-
-
-# --------------------------------------------------------------------------
-
-sub excerpt_html {
-    my( $self, $key ) = @_;
-}
-
-sub excerpt_xml {
-    my( $self, $key ) = @_;
-}
-
-sub excerpt_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
-sub reviews_html {
-    my( $self, $key ) = @_;
-}
-
-# we have to aggregate the reviews
-sub reviews_xml {
-    my( $self, $key ) = @_;
-}
-
-
-sub reviews_json {
-    my( $self, $key ) = @_;
-}
-
-# --------------------------------------------------------------------------
-
 sub send_img {
     my($self, $response) = @_;
     return { 

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2008-05-08 16:01:57 UTC (rev 9532)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2008-05-08 16:06:30 UTC (rev 9533)
@@ -86,14 +86,14 @@
     child_init() unless $handler;
 
     return Apache2::Const::NOT_FOUND unless $handler and $type and $format and $key;
-    return $res if defined($res = $AC->serve_from_cache($type, $format, $key));
-    return Apache2::Const::NOT_FOUND unless $AC->lookups_enabled;
 
     my $err;
     my $data;
     my $method = "${type}_${format}";
 
     return Apache2::Const::NOT_FOUND unless $handler->can($method);
+    return $res if defined($res = $AC->serve_from_cache($type, $format, $key));
+    return Apache2::Const::NOT_FOUND unless $AC->lookups_enabled;
 
     try {
         $data = $handler->$method($key);

Modified: branches/acq-experiment/Open-ILS/src/support-scripts/settings-tester.pl
===================================================================
--- branches/acq-experiment/Open-ILS/src/support-scripts/settings-tester.pl	2008-05-08 16:01:57 UTC (rev 9532)
+++ branches/acq-experiment/Open-ILS/src/support-scripts/settings-tester.pl	2008-05-08 16:06:30 UTC (rev 9533)
@@ -70,7 +70,8 @@
 my $j_username    = $conf->bootstrap->username;
 my $j_password    = $conf->bootstrap->passwd;
 my $j_port    = $conf->bootstrap->port;
-my $j_domain    = $conf->bootstrap->domains->[0];
+# We should check for a domains element to catch likely upgrade errors
+my $j_domain    = $conf->bootstrap->domain;
 my $settings_config = $conf->bootstrap->settings_config;
 my $logfile    = $conf->bootstrap->logfile;
 (my $log_dir = $logfile) =~ s#(.*)/.*#$1#;

Copied: branches/acq-experiment/Open-ILS/web/js/dojo/openils/CGI.js (from rev 9532, trunk/Open-ILS/web/js/dojo/openils/CGI.js)
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/CGI.js	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/CGI.js	2008-05-08 16:06:30 UTC (rev 9533)
@@ -0,0 +1,99 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2008  Georgia Public Library Service
+ * Bill Erickson <erickson at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource["openils.CGI"]) {
+
+    dojo._hasResource["openils.CGI"] = true;
+    dojo.provide("openils.CGI");
+    dojo.declare('openils.CGI', null, {
+
+        constructor : function() {
+
+            this._keys = new Array();
+            this.data = new Object();
+
+            var string = location.search.replace(/^\?/,"");
+            this.server_name = location.href.replace(/^https?:\/\/([^\/]+).+$/,"$1");
+
+            var key = ""; 
+            var value = "";
+            var inkey = true;
+            var invalue = false;
+
+            for( var idx = 0; idx!= string.length; idx++ ) {
+
+                var c = string.charAt(idx);
+
+                if( c == "=" )	{
+                    invalue = true;
+                    inkey = false;
+                    continue;
+                } 
+
+                if(c == "&" || c == ";") {
+                    inkey = 1;
+                    invalue = 0;
+                    if( ! this.data[key] ) this.data[key] = [];
+                    this.data[key].push(decodeURIComponent(value));
+                    this._keys.push(key);
+                    key = ""; value = "";
+                    continue;
+                }
+
+                if(inkey) key += c;
+                else if(invalue) value += c;
+            }
+
+            if( ! this.data[key] ) this.data[key] = [];
+            this.data[key].push(decodeURIComponent(value));
+            this._keys.push(key);
+        },
+
+        /* returns the value for the given param.  If there is only one value for the
+           given param, it returns that value.  Otherwise it returns an array of values
+         */
+        param : function(p) {
+            if(this.data[p] == null) return null;
+            if(this.data[p].length == 1)
+                return this.data[p][0];
+            return this.data[p];
+        },
+
+        /* returns an array of param names */
+        keys : function() {
+            return this._keys;
+        },
+
+        /* debugging method */
+        toString : function() {
+            var string = "";
+            var keys = this.keys();
+
+            for( var k in keys ) {
+                string += keys[k] + " : ";
+                var params = this.param(keys[k]);
+
+                for( var p in params ) {
+                    string +=  params[p] + " ";
+                }
+                string += "\n";
+            }
+            return string;
+        }
+    });
+}
+
+



More information about the open-ils-commits mailing list