//check if blog has any updates
BlogUpdateResult result = null;
//fetch channel on the web via RSS
Channel chan = FeedManager.loadRss(blog.getRss());
if (chan != null){
//update blog. Returns true if new items were added
result = updateBlog(pm, blog, chan);
//test url and title and correct if worng
if (chan.getLink() != null && !chan.getLink().equalsIgnoreCase(blog.getLink())){
blog.setLink(chan.getLink());
}
if (chan.getTitle() != null && !chan.getTitle().equalsIgnoreCase(blog.getTitle())){
blog.setTitle(chan.getTitle());
}
}
//Set last post entry date to blog
if (result != null && result.isUpdate())