- public function addReturnTo( $title, $query = array(), $text = null ) {
- $this->addLink( array( 'rel' => 'next', 'href' => $title->getFullURL() ) );
+ public function addReturnTo( $title, $query = array(), $text = null, $options = array() ) {
+ if( in_array( 'http', $options ) ) {
+ $proto = PROTO_HTTP;
+ } elseif( in_array( 'https', $options ) ) {
+ $proto = PROTO_HTTPS;
+ } else {
+ $proto = PROTO_RELATIVE;
+ }
+
+ $this->addLink( array( 'rel' => 'next', 'href' => $title->getFullURL( '', false, $proto ) ) );