public function Result() { global $page; if ($this->from_page && $this->title) { if (!$this->show_popup) { $url = \gp\tool::AbsoluteUrl($this->title, '', true, false); $page->ajaxReplace[] = array('location', $url, 0); } return true; } return $this->show_popup; }
/** * Message or redirect when file is saved * */ public function HiddenSaved($new_index) { global $langmessage; $this->search_page = 0; //take user back to first page where the new page will be displayed if (isset($_REQUEST['redir'])) { $title = \gp\tool::IndexToTitle($new_index); $url = \gp\tool::AbsoluteUrl($title, '', true, false); msg(sprintf($langmessage['will_redirect'], \gp\tool::Link_Page($title))); $this->page->ajaxReplace[] = array('location', $url, 15000); } else { msg($langmessage['SAVED']); } }
/** * Try to fetch a response using RemoteGet to see if we're getting a 500 error * * @access public * @static * @since 1.7 * * @return boolean */ public static function TestResponse($new_rewrite = true) { //get url, force gp_rewrite to $new_gp_rewrite $rewrite_before = $_SERVER['gp_rewrite']; $_SERVER['gp_rewrite'] = $new_rewrite; \gp\tool::SetLinkPrefix(); $abs_url = \gp\tool::AbsoluteUrl('Site_Map', '', true, false); //can't be special_site_map, otherwise \gp\tool::IndexToTitle() will be called during install $_SERVER['gp_rewrite'] = $rewrite_before; \gp\tool::SetLinkPrefix(); return self::ConfirmGet($abs_url, false); }