User "Hashar" changed the status of MediaWiki.r91124. Old Status: new New Status: fixme
User "Hashar" also posted a comment on MediaWiki.r91124. Full URL: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/91124#c19011 Commit summary: Add the rest of the example metrics Comment: In MetricsReporting.php you really want to automatically detect metrics by looking for PHP files ending with 'Metric.php'. Would make things way easier to handle. Something like: <source lang="php"> $metricsDir = $dir . 'metrics/'; $names = preg_match_all( "(\w+)Metric\.php", scandir( $metricsDir ) ); </source> Then iterates over the $names array: <source lang="php"> foreach( $names as $name ) { $metric = "{$name}Metric"; $wgAutoloadClasses[$metric] = $metricsDir . "{$metric}.php"; $wgMetricAPIModules[strtolower($metric)] = $metric; } </source> _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
