* (bug 22339) Added srwhat=nearmatch to list=search to get a "go" result
* (bug 24303) Added new &servedby parameter to all actions which adds the hostname
that served the request to the result. It is also added unconditionally on error
-
+* (bug 24185) Titles in the Media and Special namespace are now supported for
+ title normalization in action=query. Special pages have their name resolved
+ to the local alias.
+
+
=== Languages updated in 1.17 ===
MediaWiki supports over 330 languages. Many localisations are updated
private $mAllPages; // [ns][dbkey] => page_id or negative when missing
private $mTitles, $mGoodTitles, $mMissingTitles, $mInvalidTitles;
- private $mMissingPageIDs, $mRedirectTitles;
+ private $mMissingPageIDs, $mRedirectTitles, $mSpecialTitles;
private $mNormalizedTitles, $mInterwikiTitles;
private $mResolveRedirects, $mPendingRedirectIDs;
private $mGoodRevIDs, $mMissingRevIDs;
$this->mInterwikiTitles = array();
$this->mGoodRevIDs = array();
$this->mMissingRevIDs = array();
+ $this->mSpecialTitles = array();
$this->mRequestedPageFields = array();
$this->mResolveRedirects = $resolveRedirects;
public function getMissingRevisionIDs() {
return $this->mMissingRevIDs;
}
+
+ /**
+ * Get the list of titles with negative namespace
+ * @return array Title
+ */
+ public function getSpecialTitles() {
+ return $this->mSpecialTitles;
+ }
/**
* Returns the number of revisions (requested with revids= parameter)\
// This title is an interwiki link.
$this->mInterwikiTitles[$titleObj->getPrefixedText()] = $iw;
} else {
- // Validation
if ( $titleObj->getNamespace() < 0 ) {
- $this->setWarning( 'No support for special pages has been implemented' );
+ $titleObj = $titleObj->fixSpecialName();
+ $this->mSpecialTitles[$this->mFakePageId] = $titleObj;
+ $this->mFakePageId--;
} else {
$linkBatch->addObj( $titleObj );
}
'missing' => ''
);
}
+ // Report special pages
+ foreach ( $pageSet->getSpecialTitles() as $fakeId => $title ) {
+ $vals = array();
+ ApiQueryBase::addTitleInfo( $vals, $title );
+ $vals['special'] = '';
+ if ( $title->getNamespace() == NS_SPECIAL &&
+ !SpecialPage::exists( $title->getText() ) ) {
+ $vals['missing'] = '';
+ }
+ $pages[$fakeId] = $vals;
+ }
// Output general page information for found titles
foreach ( $pageSet->getGoodTitles() as $pageid => $title ) {