[OPEN-ILS-DEV] disable automatic record deletion

2008-12-09 Thread Grant Johnson
Hey all,
It's cold and snowy here!

 Where do I go to do this?
disable automatic record deletion using an org_unit setting
-- 

F. Grant Johnson
  Systems Coordinator
  Robertson Library - UPEI
  566-0630 (w), 393-4920 (c)




Re: [OPEN-ILS-DEV] disable automatic record deletion

2008-12-09 Thread Bill Erickson
On Tue, 09 Dec 2008 12:37:22 -0500, Grant Johnson [EMAIL PROTECTED]  
wrote:



Hey all,
It's cold and snowy here!

 Where do I go to do this?
disable automatic record deletion using an org_unit setting


Hi Grand,

I believe that's referring to not deleting a bib record when all attached  
items/call-numbers are being deleted?


If so, you can set an org_unit setting called cat.bib.keep_on_empty.   
For now, you'll have to do that directly in the database.


Something to the effect of:

insert into actor.org_unit_setting (org_unit, name, value) values (1,  
'cat.bib.keep_on_empty', 1);


That will apply the setting globally, if top of your org_unit hierarchy  
has an ID of 1.


You can also tell the system to alert the staff when this occurs with the  
cat.bib.alert_on_empty setting.


Hope this helps,

-b


--
Bill Erickson
| VP, Software Development  Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: [EMAIL PROTECTED]
| web: http://esilibrary.com


Re: [OPEN-ILS-DEV] disable automatic record deletion

2008-12-09 Thread Bill Erickson
On Tue, 09 Dec 2008 15:23:10 -0500, Bill Erickson  
[EMAIL PROTECTED] wrote:


On Tue, 09 Dec 2008 12:37:22 -0500, Grant Johnson [EMAIL PROTECTED]  
wrote:



Hey all,
It's cold and snowy here!

 Where do I go to do this?
disable automatic record deletion using an org_unit setting


Hi Grand,


Er.. Grant.  Sorry.  Although, Grand isn't such a bad thing to be ;)

-b


--
Bill Erickson
| VP, Software Development  Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: [EMAIL PROTECTED]
| web: http://esilibrary.com


[OPEN-ILS-DEV] PATCH: transport_message.[ch] (miscellaneous)

2008-12-09 Thread Scott McKellar
These patches tidy up a few things.  They are independent of the patches
I submitted yesterday.

1. In the header: removed a commented-out prototype for
   message_init_xml(), to which I could find no reference elsewhere.

2. Since message_prepare_xml() was a trivial wrapper for message_to_xml(), 
   which is not called anywhere else, I combined them into a single
   function message_prepare_xml().

3. In message_set_osrf_xid() and message_set_router_info(): added code to
   free the various members before replacing them, in order to avoid a
   potential memory leak.

--

In message_set_osrf_xid() and message_set_router_info() I not only added
some new code but also replaced the existing if/else code with the 
ternary conditional operator ('?' and ':').  I am not a big fan of the
ternary conditional operator because it usually makes the code more
cryptic.  In this case, however, the results are compact, repetitive,
and stereotyped.  To my eyes the new version is easier to read.

Scott McKellar
http://home.swbell.net/mck9/ct/

Developer's Certificate of Origin 1.1 By making a contribution to
this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license indicated
in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source license
and I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it; and

(d) In the case of each of (a), (b), or (c), I understand and agree
that this project and the contribution are public and that a record
of the contribution (including all personal information I submit
with it, including my sign-off) is maintained indefinitely and may
be redistributed consistent with this project or the open source
license indicated in the file.*** ./trunk/include/opensrf/transport_message.h	2008-12-07 08:07:52.0 -0600
--- ./trunk-mod/include/opensrf/transport_message.h	2008-12-09 18:30:03.0 -0600
***
*** 55,67 
  void message_set_osrf_xid( transport_message* msg, const char* osrf_xid );
  
  // -
- // Formats the Jabber message as XML for encoding. 
- // Returns NULL on error
- // -
- char* message_to_xml( const transport_message* msg );
- 
- 
- // -
  // Call this to create the encoded XML for sending on the wire.
  // This is a seperate function so that encoding will not necessarily have
  // to happen on all messages (i.e. typically only occurs outbound messages).
--- 56,61 
***
*** 75,85 
  int message_free( transport_message* msg );
  
  // -
- // Prepares the shared XML document
- // -
- //int message_init_xml();
- 
- // -
  // Determines the username of a Jabber ID.  This expects a pre-allocated char 
  // array for the return value.
  // -
--- 69,74 
*** ./trunk/src/libopensrf/transport_message.c	2008-12-07 08:07:55.0 -0600
--- ./trunk-mod/src/libopensrf/transport_message.c	2008-12-09 18:39:01.0 -0600
***
*** 160,221 
  		new_msg-body = strdup();
  
  	new_msg-msg_xml = xmlDocToString(msg_doc, 0);
!xmlFreeDoc(msg_doc);
!xmlCleanupParser();
  
  	return new_msg;
  }
  
  void message_set_osrf_xid( transport_message* msg, const char* osrf_xid ) {
!if(!msg) return;
!if( osrf_xid )
!   msg-osrf_xid = strdup(osrf_xid);
!else msg-osrf_xid = strdup();
  }
  
  void message_set_router_info( transport_message* msg, const char* router_from,
  		const char* router_to, const char* router_class, const char* router_command,
  		int broadcast_enabled ) {
  
! 	if( !msg ) return;
! 	
! 	if(router_from)
! 		msg-router_from		= strdup(router_from);
! 	else
! 		msg-router_from		= strdup();
! 
! 	if(router_to)
! 		msg-router_to			= strdup(router_to);
! 	else
! 		msg-router_to			= strdup();
! 
! 	if(router_class)
! 		msg-router_class		= strdup(router_class);
! 	else 
! 		msg-router_class		= strdup();
! 	
! 	if(router_command)
! 		msg-router_command	= strdup(router_command);
! 	else
! 		msg-router_command	= strdup();
! 
! 	msg-broadcast =