* 'wiki' : MediaWiki syntax.
* 'text' : Text with tabs.
Default output is 'wiki'
- --noredundant : do NOT calculate redundant (takes some time)
-
-
END;
}
}
-/** FIXME: This takes an obscene amount of time */
-if(isset($options['noredundant'])) {
- function redundant(&$arr) { return 'NC'; }
-} else {
- function redundant(&$arr) {
- global $wgAllMessagesEn;
-
- $redundant = 0;
- foreach(array_keys($arr) as $key) {
- if ( ! array_key_exists( $key, $wgAllMessagesEn) )
- ++$redundant;
- }
- return $redundant;
+function redundant(&$arr) {
+ global $wgAllMessagesEn;
+
+ $redundant = 0;
+ foreach(array_keys($arr) as $key) {
+ if ( @$wgAllMessagesEn[$key] === null )
+ ++$redundant;
}
+ return $redundant;
}
// Select an output engine