X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FLinkHolderArray.php;h=0c05a51d096a1624f1aca4f534dd12dbf2f1af3e;hb=04b47c018040aa8cf520cbbaab4071dac54a6b27;hp=083bd29893048897e86e32b6065983eca120d32a;hpb=e5a04a3f54b1120de34e2627a27f116ab060de9c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 083bd29893..0c05a51d09 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -322,7 +322,7 @@ class LinkHolderArray { } if ( $queries ) { $where = array(); - foreach( $queries as $ns => $pages ){ + foreach( $queries as $ns => $pages ) { $where[] = $dbr->makeList( array( 'page_namespace' => $ns, @@ -514,7 +514,7 @@ class LinkHolderArray { } - if(!$linkBatch->isEmpty()){ + if( !$linkBatch->isEmpty() ) { // construct query $dbr = wfGetDB( DB_SLAVE ); $varRes = $dbr->select( 'page', @@ -570,16 +570,18 @@ class LinkHolderArray { wfRunHooks( 'GetLinkColours', array( $linkcolour_ids, &$colours ) ); // rebuild the categories in original order (if there are replacements) - if(count($varCategories)>0){ + if( count( $varCategories ) > 0 ) { $newCats = array(); $originalCats = $output->getCategories(); - foreach($originalCats as $cat => $sortkey){ + foreach( $originalCats as $cat => $sortkey ) { // make the replacement - if( array_key_exists($cat,$varCategories) ) + if( array_key_exists( $cat, $varCategories ) ) { $newCats[$varCategories[$cat]] = $sortkey; - else $newCats[$cat] = $sortkey; + } else { + $newCats[$cat] = $sortkey; + } } - $output->setCategoryLinks($newCats); + $output->setCategoryLinks( $newCats ); } } }