[open-ils-commits] r16405 - in branches/rel_1_6/Open-ILS: examples src/perlmods/OpenILS/SIP (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 7 14:54:19 EDT 2010


Author: erickson
Date: 2010-05-07 14:54:14 -0400 (Fri, 07 May 2010)
New Revision: 16405

Modified:
   branches/rel_1_6/Open-ILS/examples/oils_sip.xml.example
   branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm
Log:
patch from James Fournie to repair some faulty assumptions in the previous legacy script SIP fix;  additionally, I added legacy_script_support override option to oils_sip.xml.exmple to allow use of in-db circ-mod configs even if the circ code is still using circ scritps

Modified: branches/rel_1_6/Open-ILS/examples/oils_sip.xml.example
===================================================================
--- branches/rel_1_6/Open-ILS/examples/oils_sip.xml.example	2010-05-07 18:53:45 UTC (rev 16404)
+++ branches/rel_1_6/Open-ILS/examples/oils_sip.xml.example	2010-05-07 18:54:14 UTC (rev 16405)
@@ -101,6 +101,11 @@
 					<option name='msg64_summary_datatype' value='barcode' />
 				</options>
 
+                <!-- If uncommented, overrides the legacy_script_support value in opensrf.xml for SIP. -->
+                <!--
+                <legacy_script_support>false</legacy_script_support>
+                -->
+
 				<scripts>
                     <!-- 
                         When legacy script support is disabled, the <script> configuration

Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm	2010-05-07 18:53:45 UTC (rev 16404)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm	2010-05-07 18:54:14 UTC (rev 16405)
@@ -11,6 +11,7 @@
 use OpenILS::Const qw/:const/;
 use OpenSRF::Utils qw/:datetime/;
 use DateTime::Format::ISO8601;
+use OpenSRF::Utils::SettingsClient;
 my $U = 'OpenILS::Application::AppUtils';
 
 my %item_db;
@@ -71,6 +72,17 @@
 
 	syslog("LOG_DEBUG", "OILS: Item('$item_id'): found with title '%s'", $self->title_id);
 
+    my $config = OpenILS::SIP->config();
+
+    if( defined $config->{implementation_config}->{legacy_script_support} ) {
+        $self->{legacy_script_support} = 
+            ($config->{implementation_config}->{legacy_script_support} =~ /true/io);
+    } else {
+        $self->{legacy_script_support} = 
+            OpenSRF::Utils::SettingsClient->new->config_value(
+                apps => 'open-ils.circ' => app_settings => 'legacy_script_support')
+    }
+
 	return $self;
 }
 
@@ -79,11 +91,8 @@
 	return 1 if $self->{ran_script};
 	$self->{ran_script} = 1;
 
+    if($self->{legacy_script_support}){
 
-    if($self->{osrf_config}->config_value(
-        apps => 'open-ils.circ' => app_settings => 'legacy_script_support')) {
-
-
         my $config = OpenILS::SIP->config();
         my $path = $config->{implementation_config}->{scripts}->{path};
         my $item_config_script = $config->{implementation_config}->{scripts}->{item_config};
@@ -126,7 +135,7 @@
             }
         }
 
-        $self->{item_config_result} = $config;
+        $self->{item_config_result} = { item_config => $config };
     }
 
 	return 1;



More information about the open-ils-commits mailing list