Lines Matching defs:dest
68 * @param string $dest redirect destination, absolute id or external url
71 protected function getRedirectURL($status = 302, $dest)
75 if (preg_match('@^(https?://|/)@', $dest)) {
76 $url = $dest; // external url
78 list($ext, $mime) = mimetype($dest);
80 $url = ml($dest);
82 list($page, $section) = explode('#', $dest, 2);
95 $this->_show_message('redirected_from', $ID, $dest, $status);
144 $dest = $id;
146 $url = $this->getRedirectURL($status, $dest);
148 $this->_log_redirection($status, $ID, $dest);
183 $dest = $map->pattern[$checkID]['destination'];
184 list($ns, $section) = explode('#', $dest, 2);
185 $dest = $ns.$leaf;
186 $dest.= (!empty($section)) ? '#'.rawurlencode($section) : '';
189 $url = $this->getRedirectURL($status, $dest);
191 $this->_log_redirection($status, $ID, $dest);
209 $dest = $redirect['destination'];
211 $url = $this->getRedirectURL($status, $dest);
213 $this->_log_redirection($status, $ID, $dest);
244 $dest = $map->pattern[$checkID]['destination'];
245 list($ns, $section) = explode('#', $dest, 2);
246 $dest = $ns.$leaf;
247 $dest.= (!empty($section)) ? '#'.rawurlencode($section) : '';
250 $url = $this->getRedirectURL($status, $dest);
252 $this->_log_redirection($status, $event->data['media'], $dest);
271 $dest = $redirect['destination'];
273 $url = $this->getRedirectURL($status, $dest);
275 $this->_log_redirection($status, $event->data['media'], $dest);
316 * @param string $dest page id of redirect destination
319 protected function _show_message($format, $orig=NULL, $dest=NULL, $status=302)
331 foreach (array($orig, $dest) as $id) {
345 msg(sprintf($this->getLang($format), $link[$orig], $link[$dest]), -1);
354 msg(sprintf($this->getLang($format), $link[$orig], $link[$dest]), 0);
365 protected function _log_redirection($status, $orig, $dest='')
374 // $dest is referer of the $orig page
375 $s.= "\t".$status."\t".$orig."\t".$dest;
377 // redirect from $orig to $dest
378 $s.= "\t".$status."\t".$orig."\t".$dest;