]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - maintenance/language/function-list.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / maintenance / language / function-list.php
1 <?php
2 /**
3  * @file
4  * @ingroup MaintenanceLanguage
5  */
6
7 define( 'MEDIAWIKI', 1 );
8 define( 'NOT_REALLY_MEDIAWIKI', 1 );
9
10 class Language { }
11 foreach ( glob( 'Language*.php' ) as $file ) {
12         if ( $file != 'Language.php' ) {
13                 require_once( $file );
14         }
15 }
16
17 $removedFunctions = array( 'date', 'time', 'timeanddate', 'formatMonth', 'formatDay',
18         'getMonthName', 'getMonthNameGen', 'getMonthAbbreviation', 'getWeekdayName',
19         'userAdjust', 'dateFormat', 'timeSeparator', 'timeDateSeparator', 'timeBeforeDate',
20         'monthByLatinNumber', 'getSpecialMonthName',
21
22         'commafy'
23 );
24
25 $numRemoved = 0;
26 $total = 0;
27 $classes = get_declared_classes();
28 ksort( $classes );
29 foreach ( $classes as $class ) {
30         if ( !preg_match( '/^Language/', $class ) || $class == 'Language' || $class == 'LanguageConverter' ) {
31                 continue;
32         }
33
34         print "$class\n";
35         $methods = get_class_methods( $class );
36         print_r( $methods );
37
38         if ( !count( array_diff( $methods, $removedFunctions ) ) ) {
39                 print "removed\n";
40                 $numRemoved++;
41         }
42         $total++;
43         print "\n";
44 }
45
46 print "$numRemoved will be removed out of $total\n";
47
48