}
if ( $queries ) {
$where = array();
- foreach( $queries as $ns => $pages ){
+ foreach( $queries as $ns => $pages ) {
$where[] = $dbr->makeList(
array(
'page_namespace' => $ns,
}
- if(!$linkBatch->isEmpty()){
+ if( !$linkBatch->isEmpty() ) {
// construct query
$dbr = wfGetDB( DB_SLAVE );
$varRes = $dbr->select( 'page',
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 );
}
}
}