* Compact the titles, only serialize the text form.
*/
function __sleep() {
- foreach ( $this->internals as $ns => &$nsLinks ) {
- foreach ( $nsLinks as $key => &$entry ) {
+ foreach ( $this->internals as &$nsLinks ) {
+ foreach ( $nsLinks as &$entry ) {
unset( $entry['title'] );
}
}
unset( $nsLinks );
unset( $entry );
- foreach ( $this->interwikis as $key => &$entry ) {
+ foreach ( $this->interwikis as &$entry ) {
unset( $entry['title'] );
}
unset( $entry );
* Recreate the Title objects
*/
function __wakeup() {
- foreach ( $this->internals as $ns => &$nsLinks ) {
- foreach ( $nsLinks as $key => &$entry ) {
+ foreach ( $this->internals as &$nsLinks ) {
+ foreach ( $nsLinks as &$entry ) {
$entry['title'] = Title::newFromText( $entry['pdbk'] );
}
}
unset( $nsLinks );
unset( $entry );
- foreach ( $this->interwikis as $key => &$entry ) {
+ foreach ( $this->interwikis as &$entry ) {
$entry['title'] = Title::newFromText( $entry['pdbk'] );
}
unset( $entry );
* strings will be returned.
*
* @param $other LinkHolderArray
- * @param $text Array of strings
+ * @param $texts Array of strings
* @return Array
*/
function mergeForeign( $other, $texts ) {
}
/**
- * FIXME: update documentation. makeLinkObj() is deprecated.
+ * @todo FIXME: Update documentation. makeLinkObj() is deprecated.
* Replace <!--LINK--> link placeholders with actual links, in the buffer
* Placeholders created in Skin::makeLinkObj()
* Returns an array of link CSS classes, indexed by PDBK.
wfProfileIn( __METHOD__.'-check' );
$dbr = wfGetDB( DB_SLAVE );
- $page = $dbr->tableName( 'page' );
$threshold = $this->parent->getOptions()->getStubThreshold();
# Sort by namespace
$linkcolour_ids = array();
# Generate query
- $query = false;
- $current = null;
$queries = array();
foreach ( $this->internals as $ns => $entries ) {
foreach ( $entries as $entry ) {
foreach ( $res as $s ) {
$title = Title::makeTitle( $s->page_namespace, $s->page_title );
$pdbk = $title->getPrefixedDBkey();
- $linkCache->addGoodLinkObj( $s->page_id, $title, $s->page_len, $s->page_is_redirect, $s->page_latest );
+ $linkCache->addGoodLinkObjFromRow( $title, $s );
$output->addLink( $title, $s->page_id );
- # FIXME: convoluted data flow
+ # @todo FIXME: Convoluted data flow
# The redirect status and length is passed to getLinkColour via the LinkCache
# Use formal parameters instead
$colours[$pdbk] = Linker::getLinkColour( $title, $threshold );
// construct query
$dbr = wfGetDB( DB_SLAVE );
$varRes = $dbr->select( 'page',
- array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect', 'page_len' ),
+ array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect', 'page_len', 'page_latest' ),
$linkBatch->constructSet( 'page', $dbr ),
__METHOD__
);
$holderKeys = array();
if( isset( $variantMap[$varPdbk] ) ) {
$holderKeys = $variantMap[$varPdbk];
- $linkCache->addGoodLinkObj( $s->page_id, $variantTitle, $s->page_len, $s->page_is_redirect );
+ $linkCache->addGoodLinkObjFromRow( $variantTitle, $s );
$output->addLink( $variantTitle, $s->page_id );
}
$entry['pdbk'] = $varPdbk;
// set pdbk and colour
- # FIXME: convoluted data flow
+ # @todo FIXME: Convoluted data flow
# The redirect status and length is passed to getLinkColour via the LinkCache
# Use formal parameters instead
$colours[$varPdbk] = Linker::getLinkColour( $variantTitle, $threshold );