[open-ils-commits] r9996 - branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jul 8 15:34:13 EDT 2008


Author: miker
Date: 2008-07-08 15:34:10 -0400 (Tue, 08 Jul 2008)
New Revision: 9996

Modified:
   branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
add status as a public note in exporter

Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm	2008-07-08 19:32:09 UTC (rev 9995)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm	2008-07-08 19:34:10 UTC (rev 9996)
@@ -88,11 +88,14 @@
 	# still no records ...
 	my $container = $cgi->param('containerid');
 	if ($container) {
-		my $authid = $cgi->cookie('ses') || $cgi->param('ses');
-		my $auth = verify_login($authid);
-		if (!$auth) {
-			return 403;
-		}
+		my $bucket = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket.retrieve', $container )->gather(1);
+        if ($bucket->pub !~ /t|1/oi) {
+    		my $authid = $cgi->cookie('ses') || $cgi->param('ses');
+	    	my $auth = verify_login($authid);
+		    if (!$auth) {
+			    return 403;
+    		}
+        }
 		my $recs = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket_item.search.atomic', { bucket => $container } )->gather(1);
 		@records = map { ($_->target_biblio_record_entry) } @$recs;
 	}
@@ -151,6 +154,7 @@
 
 	my %orgs;
 	my %shelves;
+	my %statuses;
 
 	my $flesh = {};
 	if ($holdings) {
@@ -175,6 +179,16 @@
     		}
     		$req->finish;
 
+		$req = $ses->request( 'open-ils.cstore.direct.config.copy_status.search', { id => { '!=' => undef } } );
+
+    		while (my $s = $req->recv) {
+        		next if ($req->failed);
+        		$s = $s->content;
+        		last unless ($s);
+	    		$statuses{$s->id} = $s;
+    		}
+    		$req->finish;
+
     		$flesh = { flesh => 2, flesh_fields => { bre => [ 'call_numbers' ], acn => [ 'copies' ] } };
 	}
 
@@ -243,6 +257,7 @@
 										($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()),
 										($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()),
 										($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()),
+										z => $statuses{$cp->status}->name,
 									)
 								);
 
@@ -315,7 +330,7 @@
 				<option value="biblio">Bibliographic Records</option>
 				<option value="authority">Authority Records</option>
 			</select>
-			<br/> Record Fromat:
+			<br/> Record Format:
 			<select name="format">
 				<option value="USMARC">MARC21</option>
 				<option value="UNIMARC">UNIMARC</option>



More information about the open-ils-commits mailing list