r83027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83026‎ | r83027 | r83028 >
Date:18:31, 1 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r82562
Modified paths:
  • /trunk/extensions/SemanticResultFormats/SemanticResultFormats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/SemanticResultFormats.php
@@ -125,25 +125,23 @@
126126 'tagcloud' => array( 'tag cloud' )
127127 );
128128
129 - // Register the resource loader modules for when they are supported.
130 - if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
131 - foreach ( $srfgFormats as $format ) {
132 - if ( array_key_exists( $format, $formatClasses ) ) {
133 - $smwgResultFormats[$format] = $formatClasses[$format];
134 -
135 - if ( method_exists( $formatClasses[$format], 'registerResourceModules' ) ) {
136 - call_user_func( array( $formatClasses[$format], 'registerResourceModules' ) );
137 - }
138 -
139 - if ( isset( $smwgResultAliases ) && array_key_exists( $format, $formatAliases ) ) {
140 - $smwgResultAliases[$format] = $formatAliases[$format];
141 - }
 129+ foreach ( $srfgFormats as $format ) {
 130+ if ( array_key_exists( $format, $formatClasses ) ) {
 131+ $smwgResultFormats[$format] = $formatClasses[$format];
 132+
 133+ // Register the resource loader modules for when they are supported.
 134+ if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) && method_exists( $formatClasses[$format], 'registerResourceModules' ) ) {
 135+ call_user_func( array( $formatClasses[$format], 'registerResourceModules' ) );
142136 }
143 - else {
144 - wfDebug( "There is not result format class associated with the format '$format'." );
 137+
 138+ if ( isset( $smwgResultAliases ) && array_key_exists( $format, $formatAliases ) ) {
 139+ $smwgResultAliases[$format] = $formatAliases[$format];
145140 }
146 - }
147 - }
 141+ }
 142+ else {
 143+ wfDebug( "There is not result format class associated with the format '$format'." );
 144+ }
 145+ }
148146 }
149147
150148 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82562RL support check tweakjeroendedauw17:59, 21 February 2011

Status & tagging log