add flag to control metaweblog published or not;
refactor the published function.