Bugfix: Google Sitemap Plugin and draft static pages

Creating and modifying plugins.
Post Reply
frAgor
Posts: 4
Joined: Sun Apr 16, 2006 2:30 pm

Bugfix: Google Sitemap Plugin and draft static pages

Post by frAgor »

(I do not know which forum to use for bugfixes and not bug reports, so I simply use this one ;-) )

I wondered why google listed a static page from my blog with state draft.
This was caused by the SQL query in serendipity_event_google_sitemap.php.

So please change (lines 285 - 290) from

Code: Select all

$static_pages = serendipity_db_query(
        'SELECT permalink, '.$sqlnullfunction.'(timestamp, 0)
         FROM '.$serendipity['dbPrefix'].'staticpages
         WHERE CHAR_LENGTH(pass)=0',
    false, 'assoc');
to

Code: Select all

$static_pages = serendipity_db_query(
        'SELECT permalink, '.$sqlnullfunction.'(timestamp, 0)
         FROM '.$serendipity['dbPrefix'].'staticpages
         WHERE CHAR_LENGTH(pass)=0 AND publishstatus != 0',
    false, 'assoc');
Thank you,
Markus
s9y Blog: sAmmelsurium @ frAgwOrld
http://samsu.fragworld.de/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bugfix: Google Sitemap Plugin and draft static pages

Post by garvinhicking »

Thanks a lot! Fixed in CVS! :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply