* @deprecated since 1.21, use Content::getRedirectTarget instead.
*/
public static function newFromRedirect( $text ) {
+ ContentHandler::deprecated( __METHOD__, '1.21' );
+
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
return $content->getRedirectTarget();
}
* @deprecated since 1.21, use Content::getUltimateRedirectTarget instead.
*/
public static function newFromRedirectRecurse( $text ) {
+ ContentHandler::deprecated( __METHOD__, '1.21' );
+
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
return $content->getUltimateRedirectTarget();
}
* @deprecated since 1.21, use Content::getRedirectChain instead.
*/
public static function newFromRedirectArray( $text ) {
+ ContentHandler::deprecated( __METHOD__, '1.21' );
+
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
return $content->getRedirectChain();
}
*
* @see self::getLocalURL
* @see wfExpandUrl
+ * @param $query
+ * @param $query2 bool
* @param $proto Protocol type to use in URL
* @return String the URL
*/
*
* See getLocalURL for the arguments.
*
+ * @param $query
+ * @param $query2 bool
* @param $proto Protocol to use; setting this will cause a full URL to be used
* @see self::getLocalURL
* @return String the URL
$linkCache = LinkCache::singleton();
$cached = $linkCache->getGoodLinkFieldObj( $this, 'redirect' );
- if ( $cached === null ) {
+ if ( $cached === null ) {
// TODO: check the assumption that the cache actually knows about this title
// and handle this, such as get the title from the database.
// See https://bugzilla.wikimedia.org/show_bug.cgi?id=37209
+ wfDebug( "LinkCache doesn't currently know about this title: " . $this->getPrefixedDBkey() );
+ wfDebug( wfBacktrace() );
}
$this->mRedirect = (bool)$cached;
if ( $cached === null ) { # check the assumption that the cache actually knows about this title
# XXX: this does apparently happen, see https://bugzilla.wikimedia.org/show_bug.cgi?id=37209
# as a stop gap, perhaps log this, but don't throw an exception?
- throw new MWException( "LinkCache doesn't currently know about this title: " . $this->getPrefixedDBkey() );
+ wfDebug( "LinkCache doesn't currently know about this title: " . $this->getPrefixedDBkey() );
+ wfDebug( wfBacktrace() );
}
$this->mLength = intval( $cached );