r100134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100133‎ | r100134 | r100135 >
Date:17:50, 18 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Kill unused maintenance script (probably rotten and seriously out of date also)
Modified paths:
  • /trunk/phase3/maintenance/language/function-list.php (deleted) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/function-list.php
@@ -1,62 +0,0 @@
2 -<?php
3 -/**
4 - * This program is free software; you can redistribute it and/or modify
5 - * it under the terms of the GNU General Public License as published by
6 - * the Free Software Foundation; either version 2 of the License, or
7 - * (at your option) any later version.
8 - *
9 - * This program is distributed in the hope that it will be useful,
10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 - * GNU General Public License for more details.
13 - *
14 - * You should have received a copy of the GNU General Public License along
15 - * with this program; if not, write to the Free Software Foundation, Inc.,
16 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 - * http://www.gnu.org/copyleft/gpl.html
18 - *
19 - * @file
20 - * @ingroup MaintenanceLanguage
21 - */
22 -
23 -define( 'MEDIAWIKI', 1 );
24 -define( 'NOT_REALLY_MEDIAWIKI', 1 );
25 -
26 -class Language { }
27 -
28 -foreach ( glob( 'Language*.php' ) as $file ) {
29 - if ( $file != 'Language.php' ) {
30 - require_once( $file );
31 - }
32 -}
33 -
34 -$removedFunctions = array( 'date', 'time', 'timeanddate', 'formatMonth', 'formatDay',
35 - 'getMonthName', 'getMonthNameGen', 'getMonthAbbreviation', 'getWeekdayName',
36 - 'userAdjust', 'dateFormat', 'timeSeparator', 'timeDateSeparator', 'timeBeforeDate',
37 - 'monthByLatinNumber', 'getSpecialMonthName',
38 -
39 - 'commafy'
40 -);
41 -
42 -$numRemoved = 0;
43 -$total = 0;
44 -$classes = get_declared_classes();
45 -ksort( $classes );
46 -foreach ( $classes as $class ) {
47 - if ( !preg_match( '/^Language/', $class ) || $class == 'Language' || $class == 'LanguageConverter' ) {
48 - continue;
49 - }
50 -
51 - print "$class\n";
52 - $methods = get_class_methods( $class );
53 - print_r( $methods );
54 -
55 - if ( !count( array_diff( $methods, $removedFunctions ) ) ) {
56 - print "removed\n";
57 - $numRemoved++;
58 - }
59 - $total++;
60 - print "\n";
61 -}
62 -
63 -print "$numRemoved will be removed out of $total\n";

Status & tagging log