/**
* Get the interwiki prefix
*
+ * Use Title::isExternal to check if a interwiki is set
+ *
* @return String Interwiki prefix
*/
public function getInterwiki() {
/**
* Get the Title fragment (i.e.\ the bit after the #) in text form
*
+ * Use Title::hasFragment to check for a fragment
+ *
* @return String Title fragment
*/
public function getFragment() {
wfProfileIn( __METHOD__ );
if ( $this->isExternal() || $proto !== PROTO_RELATIVE ) {
$ret = $this->getFullURL( $query, $query2, $proto );
- } elseif ( $this->getPrefixedText() === '' && $this->getFragment() !== '' ) {
+ } elseif ( $this->getPrefixedText() === '' && $this->hasFragment() ) {
$ret = $this->getFragmentForURL();
} else {
$ret = $this->getLocalURL( $query, $query2 ) . $this->getFragmentForURL();