[open-ils-commits] r8388 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
controllers lib lib/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 15 18:54:37 EST 2008
Author: erickson
Date: 2008-01-15 18:29:10 -0500 (Tue, 15 Jan 2008)
New Revision: 8388
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py
Log:
updated to match opensrf and ils api changes
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py 2008-01-15 23:26:10 UTC (rev 8387)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py 2008-01-15 23:29:10 UTC (rev 8388)
@@ -27,7 +27,7 @@
meta = r.ctx.adm.object_meta = oils.utils.idl.IDLParser.get_class(obj_type)
if obj_id is not None:
- r.ctx.adm.object = osrf.ses.AtomicRequest(
+ r.ctx.adm.object = osrf.ses.ClientSession.atomic_request(
'open-ils.cstore',
'open-ils.cstore.direct.%s.retrieve' %
meta.fieldmapper.replace('::', '.'), obj_id)
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py 2008-01-15 23:26:10 UTC (rev 8387)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py 2008-01-15 23:29:10 UTC (rev 8388)
@@ -11,6 +11,10 @@
class CoreContext(SubContext):
+
+ # cache the authenticated user info
+ _auth_cache = {}
+
def __init__(self):
self.prefix = ContextItem() # web prefix
self.media_prefix = ContextItem() # media prefix
@@ -23,7 +27,6 @@
self.page = ContextItem() # the current page
def postinit(self):
- import pylons.config
self.prefix = pylons.config['oils_prefix']
self.media_prefix = pylons.config['oils_media_prefix']
self.ac_prefix = pylons.config['oils_added_content_prefix']
@@ -33,7 +36,6 @@
self.fetchUser()
- _auth_cache = {}
def fetchUser(self):
''' Grab the logged in user and their workstation '''
if self.authtoken:
@@ -43,7 +45,7 @@
self.workstation = CoreContext._auth_cache[self.authtoken]['workstation']
return
- self.user = osrf.ses.AtomicRequest(
+ self.user = osrf.ses.ClientSession.atomic_request(
'open-ils.auth',
'open-ils.auth.session.retrieve', self.authtoken)
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py 2008-01-15 23:26:10 UTC (rev 8387)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py 2008-01-15 23:29:10 UTC (rev 8388)
@@ -14,7 +14,7 @@
global _z_sources
if _z_sources:
return _z_sources
- _z_sources = osrf.ses.AtomicRequest(
+ _z_sources = osrf.ses.ClientSession.atomic_request(
'open-ils.search', EG_Z39_SOURCES, ctx.core.authtoken)
return _z_sources
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py 2008-01-15 23:26:10 UTC (rev 8387)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py 2008-01-15 23:29:10 UTC (rev 8388)
@@ -1,6 +1,5 @@
import pylons.config, pylons.templating
import libxml2, libxslt
-#import oils.utils.utils
def childInit():
''' Global child-init handler.
@@ -9,12 +8,15 @@
2. Parses the IDL file
'''
- import oils.system, osrf.system
- oils.system.oilsConnect(pylons.config['osrf_config'], pylons.config['osrf_config_ctxt'])
- osrf.system.connect_cache()
+ import oils.system
+ oils.system.System.connect(
+ config_file = pylons.config['osrf_config'],
+ config_context = pylons.config['osrf_config_ctxt'],
+ connect_cache = True)
_parsedSheets = {}
def apply_xsl(xmlStr, xslFile, xslParams={}):
+ ''' Applies xslFile to xmlStr and returns the string result '''
doc = libxml2.parseDoc(xmlStr)
stylesheet = _parsedSheets.get(xslFile)
More information about the open-ils-commits
mailing list