Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -35,19 +35,18 @@ |
36 | 36 | ); |
37 | 37 | |
38 | 38 | # Load global constants |
39 | | -require( "FlaggedRevs.defines.php" ); |
| 39 | +require( dirname( __FILE__ ) . '/FlaggedRevs.defines.php' ); |
40 | 40 | |
41 | 41 | # Load default configuration variables |
42 | | -require( "FlaggedRevs.config.php" ); |
| 42 | +require( dirname( __FILE__ ) . '/FlaggedRevs.config.php' ); |
43 | 43 | |
44 | | -# Define were classes and i18n files are located |
45 | | -require( "FlaggedRevs.setup.php" ); |
46 | | -FlaggedRevsSetup::defineSourcePaths( |
47 | | - $wgAutoloadClasses, |
48 | | - $wgExtensionMessagesFiles, |
49 | | - $wgExtensionAliasesFiles |
50 | | -); |
| 44 | +# Define were PHP files and i18n files are located |
| 45 | +require( dirname( __FILE__ ) . '/FlaggedRevs.setup.php' ); |
| 46 | +FlaggedRevsSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles ); |
51 | 47 | |
| 48 | +# Define JS/CSS modules and file locations |
| 49 | +FlaggedRevsUISetup::defineResourceModules( $wgResourceModules ); |
| 50 | + |
52 | 51 | # Define user rights |
53 | 52 | $wgAvailableRights[] = 'review'; # review pages to basic quality levels |
54 | 53 | $wgAvailableRights[] = 'validate'; # review pages to all quality levels |
— | — | @@ -76,9 +75,6 @@ |
77 | 76 | FlaggedRevsUISetup::defineLogBasicDescription( $wgLogNames, $wgLogHeaders, $wgFilterLogTypes ); |
78 | 77 | FlaggedRevsUISetup::defineLogActionHandlers( $wgLogActions, $wgLogActionsHandlers ); |
79 | 78 | |
80 | | -# JS/CSS modules and message bundles used by JS scripts |
81 | | -FlaggedRevsUISetup::defineResourceModules( $wgResourceModules ); |
82 | | - |
83 | 79 | # AJAX functions |
84 | 80 | FlaggedRevsUISetup::defineAjaxFunctions( $wgAjaxExportList ); |
85 | 81 | |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.setup.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Class containing basic setup functions for a FlaggedRevs environment. |
| 4 | + * Class containing basic setup functions. |
5 | 5 | * This class depends on config variables in LocalSettings.php. |
6 | 6 | * Note: avoid FlaggedRevs class calls here for performance (like load.php). |
7 | 7 | */ |
— | — | @@ -27,17 +27,14 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | | - * Register FlaggedRevs source code paths. |
| 31 | + * Register source code paths. |
32 | 32 | * This function must NOT depend on any config vars. |
33 | 33 | * |
34 | 34 | * @param $classes Array $wgAutoloadClasses |
35 | 35 | * @param $messagesFiles Array $wgExtensionMessagesFiles |
36 | | - * @param $aliasesFiles Array $wgExtensionAliasesFiles |
37 | 36 | * @return void |
38 | 37 | */ |
39 | | - public static function defineSourcePaths( |
40 | | - array &$classes, array &$messagesFiles, array &$aliasesFiles |
41 | | - ) { |
| 38 | + public static function defineSourcePaths( array &$classes, array &$messagesFiles ) { |
42 | 39 | $dir = dirname( __FILE__ ); |
43 | 40 | |
44 | 41 | # Basic directory layout |
— | — | @@ -84,7 +81,7 @@ |
85 | 82 | ### Presentation classes ### |
86 | 83 | # Main i18n file and special page alias file |
87 | 84 | $messagesFiles['FlaggedRevs'] = "$langDir/FlaggedRevs.i18n.php"; |
88 | | - $aliasesFiles['FlaggedRevs'] = "$langDir/FlaggedRevs.alias.php"; |
| 85 | + $messagesFiles['FlaggedRevsAliases'] = "$langDir/FlaggedRevs.alias.php"; |
89 | 86 | # UI setup, forms, and HTML elements |
90 | 87 | $classes['FlaggedRevsUISetup'] = "$frontendDir/FlaggedRevsUI.setup.php"; |
91 | 88 | $classes['FlaggablePageView'] = "$frontendDir/FlaggablePageView.php"; |