Make parser->getFunctionLang be dependent on title->getPageLanguage() instead of...
[lhc/web/wiklou.git] / includes / parser / LinkHolderArray.php
index 8037732..5418b6e 100644 (file)
@@ -35,15 +35,15 @@ class LinkHolderArray {
         * 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 );
@@ -55,15 +55,15 @@ class LinkHolderArray {
         * 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 );
@@ -94,7 +94,7 @@ class LinkHolderArray {
         * strings will be returned.
         *
         * @param $other LinkHolderArray
-        * @param $text Array of strings
+        * @param $texts Array of strings
         * @return Array
         */
        function mergeForeign( $other, $texts ) {
@@ -227,7 +227,7 @@ class LinkHolderArray {
        }
 
        /**
-        * 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.
@@ -259,7 +259,6 @@ class LinkHolderArray {
 
                wfProfileIn( __METHOD__.'-check' );
                $dbr = wfGetDB( DB_SLAVE );
-               $page = $dbr->tableName( 'page' );
                $threshold = $this->parent->getOptions()->getStubThreshold();
 
                # Sort by namespace
@@ -268,8 +267,6 @@ class LinkHolderArray {
                $linkcolour_ids = array();
 
                # Generate query
-               $query = false;
-               $current = null;
                $queries = array();
                foreach ( $this->internals as $ns => $entries ) {
                        foreach ( $entries as $entry ) {
@@ -325,7 +322,7 @@ class LinkHolderArray {
                                $pdbk = $title->getPrefixedDBkey();
                                $linkCache->addGoodLinkObj( $s->page_id, $title, $s->page_len, $s->page_is_redirect, $s->page_latest );
                                $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 );
@@ -526,7 +523,7 @@ class LinkHolderArray {
                                                $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 );