private function redirect()
 {
     $news = $this->get_news();
     $category = $news->get_category();
     if ($this->is_new_news && $this->is_contributor_member() && !$news->is_visible()) {
         DispatchManager::redirect(new UserContributionSuccessController());
     } elseif ($news->is_visible()) {
         if ($this->is_new_news) {
             AppContext::get_response()->redirect(NewsUrlBuilder::display_news($category->get_id(), $category->get_rewrited_name(), $news->get_id(), $news->get_rewrited_name()), StringVars::replace_vars($this->lang['news.message.success.add'], array('name' => $news->get_name())));
         } else {
             AppContext::get_response()->redirect($this->form->get_value('referrer') ? $this->form->get_value('referrer') : NewsUrlBuilder::display_news($category->get_id(), $category->get_rewrited_name(), $news->get_id(), $news->get_rewrited_name()), StringVars::replace_vars($this->lang['news.message.success.edit'], array('name' => $news->get_name())));
         }
     } else {
         if ($this->is_new_news) {
             AppContext::get_response()->redirect(NewsUrlBuilder::display_pending_news(), StringVars::replace_vars($this->lang['news.message.success.add'], array('name' => $news->get_name())));
         } else {
             AppContext::get_response()->redirect($this->form->get_value('referrer') ? $this->form->get_value('referrer') : NewsUrlBuilder::display_pending_news(), StringVars::replace_vars($this->lang['news.message.success.edit'], array('name' => $news->get_name())));
         }
     }
 }
 private function generate_response()
 {
     $response = new SiteDisplayResponse($this->tpl);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['news.pending'], $this->lang['news']);
     $graphical_environment->get_seo_meta_data()->set_description($this->lang['news.seo.description.pending']);
     $graphical_environment->get_seo_meta_data()->set_canonical_url(NewsUrlBuilder::display_pending_news(AppContext::get_request()->get_getint('page', 1)));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['news'], NewsUrlBuilder::home());
     $breadcrumb->add($this->lang['news.pending'], NewsUrlBuilder::display_pending_news());
     return $response;
 }