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/skins/plonegooglesitemaps/gsm_edit_settings.cpy

    r1593 r3568  
    4747else: 
    4848    smselected = req.get('smselected', []) 
    49  
    5049    if req.get('form.button.Delete', False): 
    51         portal.manage_delObjects(ids=smselected[:]) 
     50        for sm_path in smselected: 
     51            sitemap = portal.restrictedTraverse(sm_path) 
     52            sitemap.aq_parent.manage_delObjects(sitemap.id) 
    5253        message = "Succesfully deleted: %s" % smselected 
    5354 
     
    5556        pinged = [] 
    5657        message = "Google pinged. It will review your sitemap as soon as it will be able to. Processed: %s" 
    57         for sm_id in smselected: 
     58        for sm_path in smselected: 
    5859            try: 
    59                 ping_google(portalURL, sm_id) 
     60                ping_google(portalURL, sm_path) 
    6061            except: 
    6162                message = "Cannot contact Google. Try again in a while. But pinged for: %s" 
    6263                break 
    6364            else: 
    64                 pinged.append(sm_id) 
     65                pinged.append(sm_path) 
    6566        message = message % pinged 
    6667 
Note: See TracChangeset for help on using the changeset viewer.