- Patch #555400 by boombatower: remove duplicate method.
parent
19638ba0c6
commit
0d9816b8fd
|
@ -288,7 +288,7 @@ class Browser {
|
||||||
// Clear the page variable since the content has change.
|
// Clear the page variable since the content has change.
|
||||||
unset($this->page);
|
unset($this->page);
|
||||||
|
|
||||||
$this->checkForRefresh();
|
$this->refreshCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -781,29 +781,7 @@ class Browser {
|
||||||
* A refresh signifier can either be the 'Location' HTTP header or the meta
|
* A refresh signifier can either be the 'Location' HTTP header or the meta
|
||||||
* tag 'http-equiv="Refresh"'.
|
* tag 'http-equiv="Refresh"'.
|
||||||
*/
|
*/
|
||||||
function refreshCheck() {
|
protected function refreshCheck() {
|
||||||
// If not handled by backend wrapper then go ahead and handle.
|
|
||||||
if (isset($this->headers['Location'])) {
|
|
||||||
// Expect absolute URL.
|
|
||||||
$this->get($this->headers['Location']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($page = $this->getPage()) !== FALSE && ($tag = $page->getMetaTag('Refresh', 'http-equiv'))) {
|
|
||||||
// Parse the content attribute of the meta tag for the format:
|
|
||||||
// "[delay]: URL=[path_to_redirect_to]".
|
|
||||||
if (preg_match('/\d+;\s*URL=(?P<url>.*)/i', $tag['content'], $match)) {
|
|
||||||
$this->get($page->getAbsoluteUrl(decode_entities($match['url'])));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check for a refresh signifier.
|
|
||||||
*
|
|
||||||
* A refresh signifier can either be the 'Location' HTTP header or the meta
|
|
||||||
* tag 'http-equiv="Refresh"'.
|
|
||||||
*/
|
|
||||||
protected function checkForRefresh() {
|
|
||||||
// If not handled by backend wrapper then go ahead and handle.
|
// If not handled by backend wrapper then go ahead and handle.
|
||||||
if (isset($this->headers['Location'])) {
|
if (isset($this->headers['Location'])) {
|
||||||
// Expect absolute URL.
|
// Expect absolute URL.
|
||||||
|
|
Loading…
Reference in New Issue