*
* @see self::getLocalURL
* @see wfExpandUrl
+ * @param $query
+ * @param $query2 bool
* @param $proto Protocol type to use in URL
* @return String the URL
*/
*
* @param $query string|array an optional query string,
- * not used for interwiki links. Can be specified as an associative array as well,
+ * not used for interwiki links. Can be specified as an associative array as well,
* e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
* Some query patterns will trigger various shorturl path replacements.
* @param $query2 Mixed: An optional secondary query array. This one MUST
*
* 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 );
$newid = $redirectArticle->insertOn( $dbw );
if ( $newid ) { // sanity
$redirectRevision = new Revision( array(
+ 'title' => $this, // for determining the default content model
'page' => $newid,
'comment' => $comment,
'content' => $redirectContent ) );
/**
* Update page_touched timestamps and send squid purge messages for
- * pages linking to this title. May be sent to the job queue depending
+ * pages linking to this title. May be sent to the job queue depending
* on the number of links. Typically called on create and delete.
*/
public function touchLinks() {
$contentHandler = ContentHandler::getForTitle( $this );
$pageLang = $contentHandler->getPageLanguage( $this );
- // Hook at the end because we don't want to override the above stuff
- wfRunHooks( 'PageContentLanguage', array( $this, &$pageLang, $wgLang ) );
return wfGetLangObj( $pageLang );
}