Ignore:
Timestamp:
Oct 15, 2012 4:06:01 PM (7 years ago)
Author:
potar
Message:

fixed url for sitemap which is not in a site root; set absolute path for sitemap instead of id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/utils.py

    r3566 r3568  
    11from urllib import quote as urlquote 
    22from DateTime import DateTime 
     3from urlparse import urljoin 
    34import logging 
    45import urllib2 
     
    3637 
    3738 
    38 def ping_google(url, sitemap_id): 
     39def ping_google(plone_home, sitemap_relative_path): 
    3940    """Ping sitemap to Google""" 
    40  
    41     resurl = url + "/" + sitemap_id 
     41    resurl = urljoin(plone_home, sitemap_relative_path) 
    4242 
    4343    if DevelopmentMode or config.testing: 
Note: See TracChangeset for help on using the changeset viewer.