Show
Ignore:
Timestamp:
03/02/10 10:26:18 (2 years ago)
Author:
elemoine
Message:

apply patches from
https://trac.mapfish.org/trac/mapfish/ticket/550
https://trac.mapfish.org/trac/mapfish/ticket/553
https://trac.mapfish.org/trac/mapfish/ticket/550
https://trac.mapfish.org/trac/mapfish/ticket/560

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/server/branches/1.2/mapfish/controllers/printer.py

    r3083 r3388  
    2828import simplejson 
    2929 
    30 from routes import url_for 
    3130from pylons.controllers import WSGIController 
    32 from pylons import config, request, response, session 
     31from pylons import config, request, response, session, url 
    3332from pylons.controllers.util import forward 
    3433 
     
    7473        if ret == 0: 
    7574            response.status = 200 
    76             response.headers['Content-Type'] = 'application/json; charset=utf-8' 
    7775            result = self._addURLs(result) 
    7876            if request.params.has_key('var'): 
     77                response.headers['Content-Type'] = 'text/javascript; charset=utf-8' 
    7978                return 'var ' + request.params['var'].encode('utf8') + '=' + result + ';' 
    8079            else: 
     80                response.headers['Content-Type'] = 'application/json; charset=utf-8' 
    8181                return result 
    8282        else: 
     
    206206        actions of this controller. 
    207207        """ 
    208         actionUrl = url_for(action = actionName, id = id) 
     208        actionUrl = url(controller="printer", action=actionName, id=id) 
    209209        if request.params.has_key('url'): 
    210210            fullUrl = request.params['url'].encode('utf8') 
    211             myUrl = url_for(action = fromAction) 
     211            myUrl = url(controller="printer", action=fromAction) 
    212212            if fullUrl == myUrl[1:]:  # support for very short relative URLs 
    213213                return actionUrl[1:]