. " ORDER BY cl_sortkey";
$res = $dbr->query( $sql );
+ $data = array();
if ( $dbr->numRows( $res ) > 0 ) {
foreach ( $res as $row ) {
// $data[] = Title::newFromText($wgContLang->getNSText ( NS_CATEGORY ).':'.$row->cl_to);
$data[$wgContLang->getNSText( NS_CATEGORY ) . ':' . $row->cl_to] = $this->getFullText();
}
- } else {
- $data = array();
}
return $data;
}
}
}
}
- return $stack;
- } else {
- return array();
}
+
+ return $stack;
}
return true; // any interwiki link might be viewable, for all we know
}
switch( $this->mNamespace ) {
- case NS_MEDIA:
- case NS_FILE:
- return (bool)wfFindFile( $this ); // file exists, possibly in a foreign repo
- case NS_SPECIAL:
- return SpecialPage::exists( $this->getDBkey() ); // valid special page
- case NS_MAIN:
- return $this->mDbkeyform == ''; // selflink, possibly with fragment
- case NS_MEDIAWIKI:
- // If the page is form Mediawiki:message/lang, calling wfMsgWeirdKey causes
- // the full l10n of that language to be loaded. That takes much memory and
- // isn't needed. So we strip the language part away.
- list( $basename, /* rest */ ) = explode( '/', $this->mDbkeyform, 2 );
- return (bool)wfMsgWeirdKey( $basename ); // known system message
- default:
- return false;
+ case NS_MEDIA:
+ case NS_FILE:
+ return (bool)wfFindFile( $this ); // file exists, possibly in a foreign repo
+ case NS_SPECIAL:
+ return SpecialPage::exists( $this->getDBkey() ); // valid special page
+ case NS_MAIN:
+ return $this->mDbkeyform == ''; // selflink, possibly with fragment
+ case NS_MEDIAWIKI:
+ // If the page is form Mediawiki:message/lang, calling wfMsgWeirdKey causes
+ // the full l10n of that language to be loaded. That takes much memory and
+ // isn't needed. So we strip the language part away.
+ list( $basename, /* rest */ ) = explode( '/', $this->mDbkeyform, 2 );
+ return (bool)wfMsgWeirdKey( $basename ); // known system message
+ default:
+ return false;
}
}
__METHOD__
);
-
foreach ( $res as $row ) {
$redirs[] = self::newFromRow( $row );
}