'Overrides Publisher method, because there may be some descendants, which
are waiting for parent to publish, so publish them if possible.
:returns: True if page was successfully published.'

def publish(self, language):

    if (not self.publisher_is_draft):
        raise PublicIsUnmodifiable('The    public    instance    cannot    be    published.    Use    draft.')
    published = None
    marked_as_published = False
    if (not self.pk):
        self.save()
    self.refresh_from_db()
    if self._publisher_can_publish():
        published = True
        if self.publisher_public_id:
            public_page = Page.objects.get(pk=self.publisher_public_id)
        else:
            public_page = Page(created_by=self.created_by)
        if (not self.publication_date):
            self.publication_date = now()
        self._copy_attributes(public_page)
        public_page.publisher_public = self
        public_page.publisher_is_draft = False
        public_page = self._publisher_save_public(public_page)
        if (not public_page.pk):
            public_page.save()
        if (not public_page.parent_id):
            marked_as_published = True
        else:
            marked_as_published = public_page.parent.is_published(language)
        self._copy_titles(public_page, language, marked_as_published)
        self._copy_contents(public_page, language)
        public_page.save()
        menu_pool.clear(site_id=self.site_id)
        self.publisher_public = public_page
    else:
        pass
    if (not published):
        self.set_publisher_state(language, PUBLISHER_STATE_PENDING, published=True)
    self._publisher_keep_state = True
    self.save()
    if self.is_home:
        for title in self.title_set.all():
            if (title.path != ''):
                title._publisher_keep_state = True
                title.save()
    if (not published):
        return
    self.mark_descendants_as_published(language)
    import cms.signals as cms_signals
    cms_signals.post_publish.send(sender=Page, instance=self, language=language)
    from cms.cache import invalidate_cms_page_cache
    invalidate_cms_page_cache()
    if (marked_as_published and get_cms_setting('PLACEHOLDER_CACHE')):
        for placeholder in self.publisher_public.get_placeholders():
            placeholder.clear_cache(language, site_id=self.site_id)
    return published
