Ticket #560: patch-server-560-r3385-A0.diff

File patch-server-560-r3385-A0.diff, 1.2 kB (added by elemoine, 2 years ago)
  • mapfish/controllers/printer.py

     
    2727import re 
    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 
    3534from paste.fileapp import FileApp 
     
    206205        This method is returning the base URL for accessing the different 
    207206        actions of this controller. 
    208207        """ 
    209         actionUrl = url_for(action = actionName, id = id) 
     208        actionUrl = url(controller="printer", action=actionName, id=id) 
    210209        if request.params.has_key('url'): 
    211210            fullUrl = request.params['url'].encode('utf8') 
    212             myUrl = url_for(action = fromAction) 
     211            myUrl = url(controller="printer", action=fromAction) 
    213212            if fullUrl == myUrl[1:]:  # support for very short relative URLs 
    214213                return actionUrl[1:] 
    215214            if fullUrl.endswith(myUrl):