From 1bff08f5d280f907454183256aca649f0cb624c0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 14 Sep 2007 01:19:13 +0000 Subject: [PATCH] wscott: The cms will now ping google with sitemap updates when pages are published or unpublished (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41700 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/CMSMain.php b/code/CMSMain.php index 66f58b5d..fa720f3f 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -446,6 +446,8 @@ JS; //$record->PublishedByID = Member::currentUser()->ID; $record->write(); $record->publish("Stage", "Live"); + + Sitemap::Ping(); // Fix the sort order for this page's siblings DB::query("UPDATE SiteTree_Live @@ -671,6 +673,9 @@ HTML; $page->write(); return $this->tellBrowserAboutPublicationChange($page, "Removed '$page->Title' from the published site"); + Sitemap::Ping(); + + return $this->tellBrowserAboutPublicationChange($page, sprintf(_t('CMSMain.REMOVEDPAGE',"Removed '%s' from the published site"),$page->Title)); }