GetSimple Support Forum
save-sitemap hook - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: save-sitemap hook (/showthread.php?tid=1812)



save-sitemap hook - roog - 2011-06-04

I think the save-sitemap hook is executed a bit too often because it is inside a loop. This is giving me troubles when including posts written by the News Manager plugin: they are all included as many times as there are pages. In file sitemap.php, lines 80-88:

Code:
}

    //create xml file
    $file = GSROOTPATH .'sitemap.xml';
    exec_action('save-sitemap');
    XMLsave($xml, $file);
  }
}

should be:

Code:
}
  }
  //create xml file
  $file = GSROOTPATH .'sitemap.xml';
  exec_action('save-sitemap');
  XMLsave($xml, $file);
}