[FIX] sitemap.php exports duplicates of some urls
Posted: Fri Jul 31, 2009 5:09 pm
Not sure what causes this but it does happen so I've hacked together a small fixed version of the file (see attached) which you replace the existing one with.
There's probably a simpler way to do this but my solution was literally to create an array of urls as they are output and each iteration does an in_array() check to see if the url has already been output before it continues. If it's a duplicate it's skipped and so on.
Simples...
There's probably a simpler way to do this but my solution was literally to create an array of urls as they are output and each iteration does an in_array() check to see if the url has already been output before it continues. If it's a duplicate it's skipped and so on.
Simples...
