Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -8,10 +8,9 @@ |
9 | 9 | * Global functions used everywhere |
10 | 10 | */ |
11 | 11 | |
12 | | -$dir = dirname(__FILE__) . '/'; |
13 | | -require_once $dir . 'LogPage.php'; |
14 | | -require_once $dir . 'normal/UtfNormalUtil.php'; |
15 | | -require_once $dir . 'XmlFunctions.php'; |
| 12 | +require_once dirname(__FILE__) . '/LogPage.php'; |
| 13 | +require_once dirname(__FILE__) . '/normal/UtfNormalUtil.php'; |
| 14 | +require_once dirname(__FILE__) . '/XmlFunctions.php'; |
16 | 15 | |
17 | 16 | // Hide compatibility functions from Doxygen |
18 | 17 | /// @cond |
Index: trunk/phase3/img_auth.php |
— | — | @@ -13,10 +13,9 @@ |
14 | 14 | */ |
15 | 15 | |
16 | 16 | define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); |
17 | | -$dir = dirname(__FILE__) . '/'; |
18 | | -require_once( $dir . 'includes/WebStart.php' ); |
| 17 | +require_once( dirname( __FILE__ ) . '/includes/WebStart.php' ); |
19 | 18 | wfProfileIn( 'img_auth.php' ); |
20 | | -require_once( $dir . 'includes/StreamFile.php' ); |
| 19 | +require_once( dirname( __FILE__ ) . '/includes/StreamFile.php' ); |
21 | 20 | |
22 | 21 | $perms = User::getGroupPermissions( array( '*' ) ); |
23 | 22 | if ( in_array( 'read', $perms, true ) ) { |
Index: trunk/phase3/languages/classes/LanguageZh.php |
— | — | @@ -1,8 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$dir = dirname(__FILE__) . '/'; |
5 | | -require_once( $dir . '../LanguageConverter.php' ); |
6 | | -require_once( $dir . 'LanguageZh_hans.php' ); |
| 4 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
| 5 | +require_once( dirname(__FILE__).'/LanguageZh_hans.php' ); |
7 | 6 | |
8 | 7 | /** |
9 | 8 | * @ingroup Language |
Index: trunk/phase3/languages/classes/LanguageKk.deps.php |
— | — | @@ -5,6 +5,5 @@ |
6 | 6 | // changed on a subsequent page view. |
7 | 7 | // see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html |
8 | 8 | |
9 | | -$dir = dirname(__FILE__) . '/'; |
10 | | -require_once( $dir . '../LanguageConverter.php' ); |
11 | | -require_once( $dir . 'LanguageKk_cyrl.php' ); |
| 9 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
| 10 | +require_once( dirname(__FILE__).'/LanguageKk_cyrl.php' ); |
Index: trunk/phase3/languages/classes/LanguageKk.php |
— | — | @@ -1,8 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$dir = dirname(__FILE__) . '/'; |
5 | | -require_once( $dir . '../LanguageConverter.php' ); |
6 | | -require_once( $dir . 'LanguageKk_cyrl.php' ); |
| 4 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
| 5 | +require_once( dirname(__FILE__).'/LanguageKk_cyrl.php' ); |
7 | 6 | |
8 | 7 | define( 'KK_C_UC', 'АӘБВГҒДЕЁЖЗИЙКҚЛМНҢОӨПРСТУҰҮФХҺЦЧШЩЪЫІЬЭЮЯ' ); # Kazakh Cyrillic uppercase |
9 | 8 | define( 'KK_C_LC', 'аәбвгғдеёжзийкқлмнңоөпрстуұүфхһцчшщъыіьэюя' ); # Kazakh Cyrillic lowercase |
Index: trunk/phase3/languages/classes/LanguageKu.deps.php |
— | — | @@ -5,6 +5,5 @@ |
6 | 6 | // changed on a subsequent page view. |
7 | 7 | // see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html |
8 | 8 | |
9 | | -$dir = dirname(__FILE__) . '/'; |
10 | | -require_once( $dir . '../LanguageConverter.php' ); |
11 | | -require_once( $dir . 'LanguageKu_ku.php' ); |
| 9 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
| 10 | +require_once( dirname(__FILE__).'/LanguageKu_ku.php' ); |
Index: trunk/phase3/languages/classes/LanguageSr.php |
— | — | @@ -1,9 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$dir = dirname(__FILE__) . '/'; |
5 | | -require_once( $dir . '../LanguageConverter.php' ); |
6 | | -require_once( $dir . 'LanguageSr_ec.php' ); |
7 | | -require_once( $dir . 'LanguageSr_el.php' ); |
| 4 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
| 5 | +require_once( dirname(__FILE__).'/LanguageSr_ec.php' ); |
| 6 | +require_once( dirname(__FILE__).'/LanguageSr_el.php' ); |
8 | 7 | |
9 | 8 | /** |
10 | 9 | * There are two levels of conversion for Serbian: the script level |
Index: trunk/phase3/languages/classes/LanguageZh.deps.php |
— | — | @@ -5,6 +5,5 @@ |
6 | 6 | // changed on a subsequent page view. |
7 | 7 | // see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html |
8 | 8 | |
9 | | -$dir = dirname(__FILE__) . '/'; |
10 | | -require_once( $dir . 'LanguageZh_hans.php' ); |
11 | | -require_once( $dir . '../LanguageConverter.php' ); |
\ No newline at end of file |
| 9 | +require_once( dirname(__FILE__).'/LanguageZh_hans.php' ); |
| 10 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
Index: trunk/phase3/languages/classes/LanguageSr.deps.php |
— | — | @@ -5,6 +5,5 @@ |
6 | 6 | // changed on a subsequent page view. |
7 | 7 | // see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html |
8 | 8 | |
9 | | -$dir = dirname(__FILE__) . '/'; |
10 | | -require_once( $dir . 'LanguageSr_ec.php' ); |
11 | | -require_once( $dir . '../LanguageConverter.php' ); |
| 9 | +require_once( dirname(__FILE__).'/LanguageSr_ec.php' ); |
| 10 | +require_once( dirname(__FILE__).'/../LanguageConverter.php' ); |
Index: trunk/extensions/Player/Player.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | $wgPlayerTemplates = array(); |
46 | 46 | $wgPlayerVideoResolutionDetector = NULL; |
47 | 47 | |
48 | | -require_once( $dir . 'PlayerDefaultSettings.php' ); |
| 48 | +require_once( dirname( __FILE__ ) . '/PlayerDefaultSettings.php' ); |
49 | 49 | |
50 | 50 | function playerSetup() { |
51 | 51 | global $wgParser; |
Index: trunk/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -102,6 +102,8 @@ |
103 | 103 | $wgCategoryTreePageCategoryOptions['depth'] = 0; |
104 | 104 | #$wgCategoryTreePageCategoryOptions['class'] = 'CategoryTreeInlineNode'; |
105 | 105 | |
| 106 | +$wgExtensionAliasesFiles['CategoryTree'] = dirname(__FILE__) . '/CategoryTreePage.i18n.alias.php'; |
| 107 | + |
106 | 108 | /** |
107 | 109 | * Register extension setup hook and credits |
108 | 110 | */ |
— | — | @@ -129,7 +131,6 @@ |
130 | 132 | * Register the special page |
131 | 133 | */ |
132 | 134 | $dir = dirname(__FILE__) . '/'; |
133 | | -$wgExtensionAliasesFiles['CategoryTree'] = $dir . 'CategoryTreePage.i18n.alias.php'; |
134 | 135 | $wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php'; |
135 | 136 | $wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php'; |
136 | 137 | $wgAutoloadClasses['CategoryTree'] = $dir . 'CategoryTreeFunctions.php'; |
Index: trunk/extensions/TrustedXFF/TrustedXFF.php |
— | — | @@ -10,9 +10,8 @@ |
11 | 11 | * |
12 | 12 | * For details, see http://meta.wikimedia.org/wiki/XFF_project |
13 | 13 | */ |
| 14 | +$wgTrustedXffFile = dirname(__FILE__).'/trusted-xff.cdb'; |
14 | 15 | |
15 | | -$dir = dirname(__FILE__) . '/'; |
16 | | -$wgTrustedXffFile = $dir . 'trusted-xff.cdb'; |
17 | 16 | |
18 | 17 | /** Registration */ |
19 | 18 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -23,7 +22,7 @@ |
24 | 23 | 'descriptionmsg' => 'trustedxff-desc', |
25 | 24 | 'author' => 'Tim Starling' |
26 | 25 | ); |
27 | | -$wgExtensionMessagesFiles['TrustedXFF'] = $dir . 'TrustedXFF.i18n.php'; |
| 26 | +$wgExtensionMessagesFiles['TrustedXFF'] = dirname(__FILE__) . '/TrustedXFF.i18n.php'; |
28 | 27 | $wgHooks['IsTrustedProxy'][] = 'TrustedXFF::onIsTrustedProxy'; |
29 | 28 | |
30 | 29 | class TrustedXFF { |
Index: trunk/extensions/Renameuser/SpecialRenameuser.php |
— | — | @@ -57,8 +57,8 @@ |
58 | 58 | return $rv; |
59 | 59 | } |
60 | 60 | |
61 | | -$wgAutoloadClasses['SpecialRenameuser'] = $dir . 'SpecialRenameuser_body.php'; |
62 | | -$wgAutoloadClasses['RenameUserJob'] = $dir . 'RenameUserJob.php'; |
| 61 | +$wgAutoloadClasses['SpecialRenameuser'] = dirname( __FILE__ ) . '/SpecialRenameuser_body.php'; |
| 62 | +$wgAutoloadClasses['RenameUserJob'] = dirname(__FILE__) . '/RenameUserJob.php'; |
63 | 63 | $wgSpecialPages['Renameuser'] = 'SpecialRenameuser'; |
64 | 64 | $wgSpecialPageGroups['Renameuser'] = 'users'; |
65 | 65 | $wgJobClasses['renameUser'] = 'RenameUserJob'; |
Index: trunk/extensions/BookInformation/BookInformation.php |
— | — | @@ -23,16 +23,15 @@ |
24 | 24 | 'url' => 'http://www.mediawiki.org/wiki/Extension:BookInformation', |
25 | 25 | ); |
26 | 26 | |
27 | | -$dir = dirname(__FILE__) . '/'; |
28 | | -$wgExtensionMessagesFiles['BookInformation'] = $dir . 'BookInformation.i18n.php'; |
| 27 | +$wgExtensionMessagesFiles['BookInformation'] = dirname(__FILE__) . '/BookInformation.i18n.php'; |
29 | 28 | |
30 | | -$wgAutoloadClasses['BookInformation'] = $dir . 'drivers/Worker.php'; |
31 | | -$wgAutoloadClasses['BookInformationCache'] = $dir . 'drivers/Cache.php'; |
32 | | -$wgAutoloadClasses['BookInformationDriver'] = $dir . 'drivers/Driver.php'; |
33 | | -$wgAutoloadClasses['BookInformationResult'] = $dir . 'drivers/Result.php'; |
| 29 | +$wgAutoloadClasses['BookInformation'] = dirname( __FILE__ ) . '/drivers/Worker.php'; |
| 30 | +$wgAutoloadClasses['BookInformationCache'] = dirname( __FILE__ ) . '/drivers/Cache.php'; |
| 31 | +$wgAutoloadClasses['BookInformationDriver'] = dirname( __FILE__ ) . '/drivers/Driver.php'; |
| 32 | +$wgAutoloadClasses['BookInformationResult'] = dirname( __FILE__ ) . '/drivers/Result.php'; |
34 | 33 | |
35 | | -$wgAutoloadClasses['BookInformationAmazon'] = $dir . 'drivers/Amazon.php'; |
36 | | -$wgAutoloadClasses['BookInformationIsbnDb'] = $dir . 'drivers/IsbnDb.php'; |
| 34 | +$wgAutoloadClasses['BookInformationAmazon'] = dirname( __FILE__ ) . '/drivers/Amazon.php'; |
| 35 | +$wgAutoloadClasses['BookInformationIsbnDb'] = dirname( __FILE__ ) . '/drivers/IsbnDb.php'; |
37 | 36 | |
38 | 37 | $wgExtensionFunctions[] = 'efBookInformationSetup'; |
39 | 38 | $wgHooks['BookInformation'][] = 'efBookInformation'; |
Index: trunk/extensions/geoserver/geoserver.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | $dir = dirname(__FILE__) . '/'; |
31 | 31 | $wgAutoloadClasses['WFS'] = $dir . 'WFS.php'; |
32 | 32 | |
33 | | -require_once( $dir . 'SpecialWikimaps.php' ); |
| 33 | +require_once( dirname(__FILE__) . '/SpecialWikimaps.php' ); |
34 | 34 | /** |
35 | 35 | * Called whenever a <geo> needs to be parsed |
36 | 36 | * |
Index: trunk/extensions/ConfigureWMF/ConfigureWMF.php |
— | — | @@ -30,10 +30,9 @@ |
31 | 31 | |
32 | 32 | $wgConfigureStdlogo = '$stdlogo'; |
33 | 33 | |
34 | | -$dir = dirname(__FILE__) . '/'; |
35 | | -$wgExtensionMessagesFiles['ConfigureWMF'] = $dir . 'ConfigureWMF.i18n.php'; |
36 | | -$wgAutoloadClasses['ConfigureWMF'] = $dir . 'ConfigureWMF.class.php'; |
37 | | -$wgAutoloadClasses['SpecialConfigure'] = $dir . 'ConfigureWMF.page.php'; |
| 34 | +$wgExtensionMessagesFiles['ConfigureWMF'] = dirname( __FILE__ ) . '/ConfigureWMF.i18n.php'; |
| 35 | +$wgAutoloadClasses['ConfigureWMF'] = dirname( __FILE__ ) . '/ConfigureWMF.class.php'; |
| 36 | +$wgAutoloadClasses['SpecialConfigure'] = dirname( __FILE__ ) . '/ConfigureWMF.page.php'; |
38 | 37 | |
39 | 38 | $wgSpecialPages['Configure'] = 'SpecialConfigure'; |
40 | 39 | |
Index: trunk/extensions/CheckUser/install.php |
— | — | @@ -4,11 +4,10 @@ |
5 | 5 | * Makes the required database changes for the CheckUser extension |
6 | 6 | */ |
7 | 7 | |
8 | | -$dir = dirname(__FILE__) . '/'; |
9 | 8 | require_once ( getenv('MW_INSTALL_PATH') !== false |
10 | 9 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
11 | | - : $dir . '../../maintenance/commandLine.inc' ); |
12 | | -require_once $dir . 'install.inc'; |
| 10 | + : dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' ); |
| 11 | +require_once dirname( __FILE__ ) . '/install.inc'; |
13 | 12 | |
14 | 13 | $db =& wfGetDB( DB_MASTER ); |
15 | 14 | if ( $db->tableExists( 'cu_changes' ) && !isset( $options['force'] ) ) { |
Index: trunk/extensions/CheckUser/CheckUser.php |
— | — | @@ -351,8 +351,9 @@ |
352 | 352 | |
353 | 353 | $wgSpecialPages['CheckUser'] = 'CheckUser'; |
354 | 354 | $wgSpecialPageGroups['CheckUser'] = 'users'; |
355 | | -$wgAutoloadClasses['CheckUser'] = $dir . 'CheckUser_body.php'; |
| 355 | +$wgAutoloadClasses['CheckUser'] = dirname(__FILE__) . '/CheckUser_body.php'; |
356 | 356 | |
| 357 | + |
357 | 358 | function efLoadCheckUserLink( $id, $nt, &$links ) { |
358 | 359 | global $wgUser; |
359 | 360 | if( $wgUser->isAllowed( 'checkuser' ) ) { |
Index: trunk/extensions/OpenID/OpenID.setup.php |
— | — | @@ -107,8 +107,7 @@ |
108 | 108 | |
109 | 109 | $wgExtensionFunctions[] = 'setupOpenID'; |
110 | 110 | |
111 | | -$dir = dirname(__FILE__) . '/'; |
112 | | -$wgExtensionMessagesFiles['OpenID'] = $dir . 'OpenID.i18n.php'; |
| 111 | +$wgExtensionMessagesFiles['OpenID'] = dirname(__FILE__) . '/OpenID.i18n.php'; |
113 | 112 | |
114 | 113 | $wgExtensionCredits['other'][] = array( |
115 | 114 | 'name' => 'OpenID', |
— | — | @@ -133,17 +132,17 @@ |
134 | 133 | |
135 | 134 | # Gets stored in the session, needs to be reified before our setup |
136 | 135 | $wgAutoloadClasses['Auth_OpenID_CheckIDRequest'] = OpenIDGetServerPath(); |
137 | | -$wgExtensionMessagesFiles['OpenID'] = $dir . 'OpenID.i18n.php'; |
| 136 | +$wgExtensionMessagesFiles['OpenID'] = dirname(__FILE__) . '/OpenID.i18n.php'; |
138 | 137 | # Autoload for special pages |
139 | 138 | |
140 | 139 | foreach (array('Login', 'Finish', 'Convert', 'Server', 'XRDS') as $sub) { |
141 | | - $wgAutoloadClasses['SpecialOpenID' . $sub] = $dir . 'SpecialOpenID' . $sub . '.body.php'; |
| 140 | + $wgAutoloadClasses['SpecialOpenID' . $sub] = dirname(__FILE__) . '/SpecialOpenID' . $sub . '.body.php'; |
142 | 141 | $wgSpecialPages['OpenID'.$sub] = array('SpecialOpenID'.$sub); |
143 | 142 | } |
144 | 143 | |
145 | 144 | # Autoload common parent with utility methods |
146 | 145 | |
147 | | -$wgAutoloadClasses['SpecialOpenID'] = $dir . 'SpecialOpenID.body.php'; |
| 146 | +$wgAutoloadClasses['SpecialOpenID'] = dirname(__FILE__) . '/SpecialOpenID.body.php'; |
148 | 147 | |
149 | 148 | $wgHooks['PersonalUrls'][] = 'OpenIDPersonalUrls'; |
150 | 149 | $wgHooks['UserToggles'][] = 'OpenIDUserToggles'; |
Index: trunk/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -39,6 +39,9 @@ |
40 | 40 | $wgSpecialPages['ContributionStatistics'] = 'SpecialContributionStatistics'; |
41 | 41 | $wgSpecialPages['FundraiserStatistics'] = 'SpecialFundraiserStatistics'; |
42 | 42 | |
| 43 | +// Shortcut to this extension directory |
| 44 | +$dir = dirname( __FILE__ ) . '/'; |
| 45 | + |
43 | 46 | // CutOff for fiscal year |
44 | 47 | $egContributionStatisticsFiscalYearCutOff = 'July 1'; |
45 | 48 | |
— | — | @@ -83,3 +86,4 @@ |
84 | 87 | |
85 | 88 | return $db; |
86 | 89 | } |
| 90 | + |
Index: trunk/extensions/RandomImage/RandomImage.php |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | */ |
12 | 12 | |
13 | 13 | if( defined( 'MEDIAWIKI' ) ) { |
| 14 | + |
| 15 | + $wgAutoloadClasses['RandomImage'] = dirname( __FILE__ ) . '/RandomImage.class.php'; |
14 | 16 | $wgExtensionCredits['parserhook'][] = array( |
15 | 17 | 'name' => 'RandomImage', |
16 | 18 | 'author' => 'Rob Church', |
— | — | @@ -19,10 +21,7 @@ |
20 | 22 | 'description' => 'Provides a random media picker using <tt><randomimage /></tt>', |
21 | 23 | 'descriptionmsg' => 'randomimage-desc', |
22 | 24 | ); |
23 | | - |
24 | | - $dir = dirname(__FILE__) . '/'; |
25 | | - $wgAutoloadClasses['RandomImage'] = $dir . 'RandomImage.class.php'; |
26 | | - $wgExtensionMessagesFiles['RandomImage'] = $dir . 'RandomImage.i18n.php'; |
| 25 | + $wgExtensionMessagesFiles['RandomImage'] = dirname(__FILE__) . '/RandomImage.i18n.php'; |
27 | 26 | $wgHooks['ParserAfterStrip'][] = 'RandomImage::stripHook'; |
28 | 27 | $wgExtensionFunctions[] = 'efRandomImageSetup'; |
29 | 28 | |
Index: trunk/extensions/PlayerStatsGrabber/PlayerStatsGrabber.php |
— | — | @@ -86,9 +86,8 @@ |
87 | 87 | /* |
88 | 88 | * end config |
89 | 89 | */ |
90 | | -$dir = dirname(__FILE__) . '/'; |
91 | | -$wgExtensionMessagesFiles['PlayerStatsGrabber'] = $dir . 'PlayerStatsGrabber.i18n.php'; |
92 | | -$wgAutoloadClasses['SpecialPlayerStatsGrabber'] = $dir . 'PlayerStatsGrabber_body.php'; |
| 90 | +$wgExtensionMessagesFiles['PlayerStatsGrabber'] = dirname( __FILE__ ) . '/PlayerStatsGrabber.i18n.php'; |
| 91 | +$wgAutoloadClasses['SpecialPlayerStatsGrabber'] = dirname( __FILE__ ) . '/PlayerStatsGrabber_body.php'; |
93 | 92 | $wgSpecialPages['PlayerStatsGrabber'] = array( 'SpecialPlayerStatsGrabber' ); |
94 | 93 | |
95 | 94 | $wgSpecialPageGroups['PlayerStatsGrabber'] = 'wiki'; // like Special:Statistics |
Index: trunk/extensions/FormatDates/FormatDates.php |
— | — | @@ -11,9 +11,8 @@ |
12 | 12 | |
13 | 13 | if( defined( 'MEDIAWIKI' ) ) { |
14 | 14 | |
15 | | - $dir = dirname(__FILE__) . '/'; |
16 | | - $wgAutoloadClasses['DateParser'] = $dir . 'DateParser.php'; |
17 | | - $wgAutoloadClasses['FormattableDate'] = $dir . 'FormattableDate.php'; |
| 15 | + $wgAutoloadClasses['DateParser'] = dirname( __FILE__ ) . '/DateParser.php'; |
| 16 | + $wgAutoloadClasses['FormattableDate'] = dirname( __FILE__ ) . '/FormattableDate.php'; |
18 | 17 | $wgExtensionFunctions[] = 'efFormatDates'; |
19 | 18 | |
20 | 19 | $wgExtensionCredits['parserhook'][] = array( |
Index: trunk/extensions/News/News.php |
— | — | @@ -33,8 +33,8 @@ |
34 | 34 | |
35 | 35 | $wgExtensionFunctions[] = "wfNewsExtension"; |
36 | 36 | |
37 | | -$wgAutoloadClasses['NewsRenderer'] = $dir . 'NewsRenderer.php'; |
38 | | -$wgAutoloadClasses['NewsFeedPage'] = $dir . 'NewsRenderer.php'; |
| 37 | +$wgAutoloadClasses['NewsRenderer'] = dirname( __FILE__ ) . '/NewsRenderer.php'; |
| 38 | +$wgAutoloadClasses['NewsFeedPage'] = dirname( __FILE__ ) . '/NewsRenderer.php'; |
39 | 39 | $wgHooks['ArticleFromTitle'][] = 'wfNewsArticleFromTitle'; |
40 | 40 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'wfNewsSkinTemplateOutputPageBeforeExec'; |
41 | 41 | |
Index: trunk/extensions/Makebot/Makebot.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | /** |
48 | 48 | * Register the special page |
49 | 49 | */ |
50 | | - $wgAutoloadClasses['Makebot'] = $dir . 'Makebot.class.php'; |
| 50 | + $wgAutoloadClasses['Makebot'] = dirname( __FILE__ ) . '/Makebot.class.php'; |
51 | 51 | $wgSpecialPages['Makebot'] = 'Makebot'; |
52 | 52 | $wgSpecialPageGroups['Makebot'] = 'users'; |
53 | 53 | |
Index: trunk/extensions/ExtensionDistributor/ExtensionDistributor.php |
— | — | @@ -45,10 +45,9 @@ |
46 | 46 | /******************** |
47 | 47 | * Registration |
48 | 48 | */ |
49 | | -$dir = dirname(__FILE__) . '/'; |
50 | 49 | $wgSpecialPages['ExtensionDistributor'] = 'ExtensionDistributorPage'; |
51 | | -$wgAutoloadClasses['ExtensionDistributorPage'] = $dir . 'ExtensionDistributor_body.php'; |
52 | | -$wgExtensionMessagesFiles['ExtensionDistributor'] = $dir . 'ExtensionDistributor.i18n.php'; |
| 50 | +$wgAutoloadClasses['ExtensionDistributorPage'] = dirname(__FILE__).'/ExtensionDistributor_body.php'; |
| 51 | +$wgExtensionMessagesFiles['ExtensionDistributor'] = dirname(__FILE__).'/ExtensionDistributor.i18n.php'; |
53 | 52 | |
54 | 53 | $wgExtensionCredits['specialpage'][] = array( |
55 | 54 | 'name' => 'Extension Distributor', |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -21,14 +21,13 @@ |
22 | 22 | require_once( $mvgIP . '/languages/MV_Language.php' ); |
23 | 23 | |
24 | 24 | // Register special page aliases file |
25 | | -$dir = dirname(__FILE__) . '/'; |
26 | 25 | $wgExtensionAliasesFiles['MetavidWiki'] = $mvgIP . '/languages/MV_Aliases.php'; |
27 | 26 | |
28 | 27 | $markerList = array(); |
29 | 28 | |
30 | 29 | // override special search page: |
31 | 30 | $wgSpecialPages['Search'] = 'MV_SpecialSearch'; |
32 | | -$wgAutoloadClasses['MV_SpecialSearch'] = $dir . 'specials/MV_SpecialMediaSearch.php'; |
| 31 | +$wgAutoloadClasses['MV_SpecialSearch'] = dirname( __FILE__ ) . '/specials/MV_SpecialMediaSearch.php'; |
33 | 32 | |
34 | 33 | function enableMetavid() { |
35 | 34 | global $wgExtensionFunctions, $smwgNamespacesWithSemanticLinks; |
— | — | @@ -100,55 +99,54 @@ |
101 | 100 | /**********************************************/ |
102 | 101 | /***** register autoLoad Classes: *****/ |
103 | 102 | /**********************************************/ |
104 | | - // setup autoload classes: |
105 | | - $dir = dirname(__FILE__) . '/'; |
106 | | - $wgAutoloadClasses['MV_Overlay'] = $dir . 'MV_MetavidInterface/MV_Overlay.php'; |
107 | | - $wgAutoloadClasses['MV_Component'] = $dir . 'MV_MetavidInterface/MV_Component.php'; |
| 103 | + // setup autoload classes: |
| 104 | + $wgAutoloadClasses['MV_Overlay'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_Overlay.php'; |
| 105 | + $wgAutoloadClasses['MV_Component'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_Component.php'; |
108 | 106 | |
109 | | - $wgAutoloadClasses['MV_MetavidInterface'] = $dir . 'MV_MetavidInterface/MV_MetavidInterface.php'; |
110 | | - $wgAutoloadClasses['MV_SequencePlayer'] = $dir . 'MV_MetavidInterface/MV_SequencePlayer.php'; |
111 | | - $wgAutoloadClasses['MV_SequenceTools'] = $dir . 'MV_MetavidInterface/MV_SequenceTools.php'; |
112 | | - $wgAutoloadClasses['MV_SequenceTimeline'] = $dir . 'MV_MetavidInterface/MV_SequenceTimeline.php'; |
113 | | - $wgAutoloadClasses['MV_VideoPlayer'] = $dir . 'MV_MetavidInterface/MV_VideoPlayer.php'; |
114 | | - $wgAutoloadClasses['MV_Tools'] = $dir . 'MV_MetavidInterface/MV_Tools.php'; |
115 | | - $wgAutoloadClasses['MV_Navigator'] = $dir . 'MV_MetavidInterface/MV_Navigator.php'; |
116 | | - $wgAutoloadClasses['MV_EditPageAjax'] = $dir . 'MV_MetavidInterface/MV_EditPageAjax.php'; |
| 107 | + $wgAutoloadClasses['MV_MetavidInterface'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_MetavidInterface.php'; |
| 108 | + $wgAutoloadClasses['MV_SequencePlayer'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_SequencePlayer.php'; |
| 109 | + $wgAutoloadClasses['MV_SequenceTools'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_SequenceTools.php'; |
| 110 | + $wgAutoloadClasses['MV_SequenceTimeline'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_SequenceTimeline.php'; |
| 111 | + $wgAutoloadClasses['MV_VideoPlayer'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_VideoPlayer.php'; |
| 112 | + $wgAutoloadClasses['MV_Tools'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_Tools.php'; |
| 113 | + $wgAutoloadClasses['MV_Navigator'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_Navigator.php'; |
| 114 | + $wgAutoloadClasses['MV_EditPageAjax'] = dirname( __FILE__ ) . '/MV_MetavidInterface/MV_EditPageAjax.php'; |
117 | 115 | |
118 | | - $wgAutoloadClasses['MV_CategoryPage'] = $dir . 'articlepages/MV_CategoryPage.php'; |
119 | | - $wgAutoloadClasses['MV_SequencePage'] = $dir . 'articlepages/MV_SequencePage.php'; |
120 | | - $wgAutoloadClasses['MV_StreamPage'] = $dir . 'articlepages/MV_StreamPage.php'; |
121 | | - $wgAutoloadClasses['MV_EditDataPage'] = $wgAutoloadClasses['MV_DataPage'] = $dir . 'articlepages/MV_DataPage.php'; |
122 | | - $wgAutoloadClasses['MV_EditStreamPage'] = $dir . 'MV_EditStreamPage.php'; |
| 116 | + $wgAutoloadClasses['MV_CategoryPage'] = dirname( __FILE__ ) . '/articlepages/MV_CategoryPage.php'; |
| 117 | + $wgAutoloadClasses['MV_SequencePage'] = dirname( __FILE__ ) . '/articlepages/MV_SequencePage.php'; |
| 118 | + $wgAutoloadClasses['MV_StreamPage'] = dirname( __FILE__ ) . '/articlepages/MV_StreamPage.php'; |
| 119 | + $wgAutoloadClasses['MV_EditDataPage'] = $wgAutoloadClasses['MV_DataPage'] = dirname( __FILE__ ) . '/articlepages/MV_DataPage.php'; |
| 120 | + $wgAutoloadClasses['MV_EditStreamPage'] = dirname( __FILE__ ) . '/MV_EditStreamPage.php'; |
123 | 121 | |
124 | 122 | |
125 | | - $wgAutoloadClasses['MV_Title'] = $dir . 'MV_Title.php'; |
126 | | - $wgAutoloadClasses['MV_Index'] = $dir . 'MV_Index.php'; |
127 | | - $wgAutoloadClasses['MV_ImageGallery'] = $dir . 'MV_ImageGallery.php'; |
128 | | - $wgAutoloadClasses['MV_Image'] = $dir . 'MV_Image.php'; |
129 | | - $wgAutoloadClasses['MV_Stream'] = $dir . 'MV_Stream.php'; |
130 | | - $wgAutoloadClasses['MV_StreamFile'] = $dir . 'MV_StreamFile.php'; |
| 123 | + $wgAutoloadClasses['MV_Title'] = dirname( __FILE__ ) . '/MV_Title.php'; |
| 124 | + $wgAutoloadClasses['MV_Index'] = dirname( __FILE__ ) . '/MV_Index.php'; |
| 125 | + $wgAutoloadClasses['MV_ImageGallery'] = dirname( __FILE__ ) . '/MV_ImageGallery.php'; |
| 126 | + $wgAutoloadClasses['MV_Image'] = dirname( __FILE__ ) . '/MV_Image.php'; |
| 127 | + $wgAutoloadClasses['MV_Stream'] = dirname( __FILE__ ) . '/MV_Stream.php'; |
| 128 | + $wgAutoloadClasses['MV_StreamFile'] = dirname( __FILE__ ) . '/MV_StreamFile.php'; |
131 | 129 | |
132 | | - $wgAutoloadClasses['MV_StreamImage'] = $dir . 'MV_StreamImage.php'; |
133 | | - $wgAutoloadClasses['MV_ParserCache'] = $dir . 'MV_ParserCache.php'; |
134 | | - $wgAutoloadClasses['MV_MagicWords'] = $dir . 'MV_MagicWords.php'; |
| 130 | + $wgAutoloadClasses['MV_StreamImage'] = dirname( __FILE__ ) . '/MV_StreamImage.php'; |
| 131 | + $wgAutoloadClasses['MV_ParserCache'] = dirname( __FILE__ ) . '/MV_ParserCache.php'; |
| 132 | + $wgAutoloadClasses['MV_MagicWords'] = dirname( __FILE__ ) . '/MV_MagicWords.php'; |
135 | 133 | |
136 | 134 | /**********************************************/ |
137 | 135 | /***** register special pages hooks *****/ |
138 | 136 | /**********************************************/ |
139 | | - $wgAutoloadClasses['MV_SpecialCRUDStream'] = $dir . 'specials/MV_SpecialCRUDStream.php'; |
| 137 | + $wgAutoloadClasses['MV_SpecialCRUDStream'] = dirname( __FILE__ ) . '/specials/MV_SpecialCRUDStream.php'; |
140 | 138 | $wgSpecialPages['Mv_Add_Stream'] = array( 'MV_SpecialCRUDStream' ); |
141 | 139 | |
142 | | - $wgAutoloadClasses['MV_SpecialListStreams'] = $dir . 'specials/MV_SpecialListStreams.php'; |
| 140 | + $wgAutoloadClasses['MV_SpecialListStreams'] = dirname( __FILE__ ) . '/specials/MV_SpecialListStreams.php'; |
143 | 141 | $wgSpecialPages['Mv_List_Streams'] = array( 'MV_SpecialListStreams' ); |
144 | 142 | |
145 | 143 | /* special export views */ |
146 | | - $wgAutoloadClasses['MV_SpecialExport'] = $dir . 'specials/MV_SpecialExport.php'; |
| 144 | + $wgAutoloadClasses['MV_SpecialExport'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
147 | 145 | |
148 | | - $wgAutoloadClasses['MvVideoFeed'] = $dir . 'specials/MV_SpecialExport.php'; |
149 | | - $wgAutoloadClasses['MvExportStream'] = $dir . 'specials/MV_SpecialExport.php'; |
150 | | - $wgAutoloadClasses['MvExportSequence'] = $dir . 'specials/MV_SpecialExport.php'; |
151 | | - $wgAutoloadClasses['MvExportSearch'] = $dir . 'specials/MV_SpecialExport.php'; |
152 | | - $wgAutoloadClasses['MvExportAsk'] = $dir . 'specials/MV_SpecialExport.php'; |
| 146 | + $wgAutoloadClasses['MvVideoFeed'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
| 147 | + $wgAutoloadClasses['MvExportStream'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
| 148 | + $wgAutoloadClasses['MvExportSequence'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
| 149 | + $wgAutoloadClasses['MvExportSearch'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
| 150 | + $wgAutoloadClasses['MvExportAsk'] = dirname( __FILE__ ) . '/specials/MV_SpecialExport.php'; |
153 | 151 | |
154 | 152 | $wgSpecialPages['MvVideoFeed'] = array( 'MvVideoFeed' ); |
155 | 153 | $wgSpecialPages['MvExportStream'] = array( 'MvExportStream' ); |
— | — | @@ -156,20 +154,20 @@ |
157 | 155 | $wgSpecialPages['MvExportSearch'] = array( 'MvExportSearch' ); |
158 | 156 | $wgSpecialPages['MvExportAsk'] = array( 'MvExportAsk' ); |
159 | 157 | |
160 | | - $wgAutoloadClasses['MV_SpecialMediaSearch'] = $dir . 'specials/MV_SpecialMediaSearch.php'; |
| 158 | + $wgAutoloadClasses['MV_SpecialMediaSearch'] = dirname( __FILE__ ) . '/specials/MV_SpecialMediaSearch.php'; |
161 | 159 | $wgSpecialPages['Mv_List_Streams'] = array( 'MV_SpecialListStreams' ); |
162 | 160 | |
163 | | - $wgAutoloadClasses['MediaSearch'] = $dir . 'specials/MV_SpecialMediaSearch.php'; |
| 161 | + $wgAutoloadClasses['MediaSearch'] = dirname( __FILE__ ) . '/specials/MV_SpecialMediaSearch.php'; |
164 | 162 | $wgSpecialPages['MediaSearch'] = array( 'MediaSearch' ); |
165 | 163 | $wgSpecialPages['MV_SpecialSearch'] = array( 'MV_SpecialSearch' ); |
166 | 164 | |
167 | | - $wgAutoloadClasses['MVAdmin'] = $dir . 'specials/MV_SpecialMVAdmin.php'; |
| 165 | + $wgAutoloadClasses['MVAdmin'] = dirname( __FILE__ ) . '/specials/MV_SpecialMVAdmin.php'; |
168 | 166 | $wgSpecialPages['MVAdmin'] = array( 'MVAdmin' ); |
169 | | - // require_once( $dir . 'specials/MV_SpecialCRUDStream.php'); |
170 | | - // require_once( $dir . 'specials/MV_SpecialListStreams.php'); |
171 | | - // require_once( $dir . 'specials/MV_SpecialExport.php'); |
172 | | - // require_once( $dir . 'specials/MV_SpecialMediaSearch.php'); |
173 | | - // require_once( $dir . 'specials/MV_SpecialMVAdmin.php'); |
| 167 | + // require_once( dirname(__FILE__) . '/specials/MV_SpecialCRUDStream.php'); |
| 168 | + // require_once( dirname(__FILE__) . '/specials/MV_SpecialListStreams.php'); |
| 169 | + // require_once( dirname(__FILE__) . '/specials/MV_SpecialExport.php'); |
| 170 | + // require_once( dirname(__FILE__) . '/specials/MV_SpecialMediaSearch.php'); |
| 171 | + // require_once( dirname(__FILE__) . '/specials/MV_SpecialMVAdmin.php'); |
174 | 172 | |
175 | 173 | /**********************************************/ |
176 | 174 | /***** register hooks *****/ |
— | — | @@ -222,7 +220,7 @@ |
223 | 221 | * MV_OggHandler.php handles all the re-mapping |
224 | 222 | */ |
225 | 223 | if($wgMediaHandlers['application/ogg'] == 'OggHandler'){ |
226 | | - $wgAutoloadClasses['mvOggHandler'] = $dir . 'MV_OggHandler.php'; |
| 224 | + $wgAutoloadClasses['mvOggHandler'] = dirname( __FILE__ ) . '/MV_OggHandler.php'; |
227 | 225 | $wgMediaHandlers['application/ogg']='mvOggHandler'; |
228 | 226 | $wgParserOutputHooks['OggHandler'] = array( 'mvOggHandler', 'outputHook' ); |
229 | 227 | foreach($wgHooks['LanguageGetMagic'] as & $hook_function){ |
Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php |
— | — | @@ -18,10 +18,9 @@ |
19 | 19 | 'descriptionmsg' => 'titleblacklist-desc', |
20 | 20 | ); |
21 | 21 | |
22 | | -$dir = dirname(__FILE__) . '/'; |
23 | | -$wgExtensionMessagesFiles['TitleBlacklist'] = $dir . 'TitleBlacklist.i18n.php'; |
24 | | -$wgAutoloadClasses['TitleBlacklist'] = $dir . 'TitleBlacklist.list.php'; |
25 | | -$wgAutoloadClasses['TitleBlacklistHooks'] = $dir . 'TitleBlacklist.hooks.php'; |
| 22 | +$wgExtensionMessagesFiles['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.i18n.php'; |
| 23 | +$wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php'; |
| 24 | +$wgAutoloadClasses['TitleBlacklistHooks'] = dirname( __FILE__ ) . '/TitleBlacklist.hooks.php'; |
26 | 25 | |
27 | 26 | /** @defgroup Title blacklist source types |
28 | 27 | * @{ |
Index: trunk/extensions/DumpHTML/dumpHTML.php |
— | — | @@ -55,13 +55,12 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | $IP = getenv( 'MW_INSTALL_PATH' ); |
59 | | -$dir = dirname(__FILE__) . '/'; |
60 | 59 | if ( $IP === false ) { |
61 | | - $IP = $dir . '../..'; |
| 60 | + $IP = dirname(__FILE__).'/../..'; |
62 | 61 | } |
63 | 62 | require_once( $IP."/maintenance/commandLine.inc" ); |
64 | | -require_once( $dir . "dumpHTML.inc" ); |
65 | | -require_once( $dir . "SkinOffline.php" ); |
| 63 | +require_once( dirname(__FILE__)."/dumpHTML.inc" ); |
| 64 | +require_once( dirname(__FILE__)."/SkinOffline.php" ); |
66 | 65 | |
67 | 66 | if ( version_compare( $wgVersion, '1.11.1', '<' ) ) { |
68 | 67 | echo "Error, the DumpHTML extension needs at least MediaWiki version 1.11.1 to work, you have version $wgVersion.\n"; |
Index: trunk/extensions/Cite/Cite.php |
— | — | @@ -33,11 +33,9 @@ |
34 | 34 | 'descriptionmsg' => 'cite_desc', |
35 | 35 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Cite/Cite.php' |
36 | 36 | ); |
37 | | - |
38 | | -$dir = dirname(__FILE__) . '/'; |
39 | | -$wgParserTestFiles[] = $dir . "citeParserTests.txt"; |
40 | | -$wgExtensionMessagesFiles['Cite'] = $dir . "Cite.i18n.php"; |
41 | | -$wgAutoloadClasses['Cite'] = $dir . "Cite_body.php"; |
| 37 | +$wgParserTestFiles[] = dirname( __FILE__ ) . "/citeParserTests.txt"; |
| 38 | +$wgExtensionMessagesFiles['Cite'] = dirname( __FILE__ ) . "/Cite.i18n.php"; |
| 39 | +$wgAutoloadClasses['Cite'] = dirname( __FILE__ ) . "/Cite_body.php"; |
42 | 40 | $wgSpecialPageGroups['Cite'] = 'pagetools'; |
43 | 41 | |
44 | 42 | define( 'CITE_DEFAULT_GROUP', ''); |
Index: trunk/extensions/BackAndForth/BackAndForth.php |
— | — | @@ -12,6 +12,7 @@ |
13 | 13 | die( 1 ); |
14 | 14 | } |
15 | 15 | |
| 16 | +$wgAutoloadClasses['BackAndForth'] = dirname( __FILE__ ) . '/BackAndForth.class.php'; |
16 | 17 | $wgExtensionFunctions[] = 'efBackAndForth'; |
17 | 18 | $wgExtensionCredits['other'][] = array( |
18 | 19 | 'name' => 'Back and Forth', |
— | — | @@ -23,9 +24,7 @@ |
24 | 25 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Back-and-Forth', |
25 | 26 | ); |
26 | 27 | |
27 | | -$dir = dirname(__FILE__) . '/'; |
28 | | -$wgAutoloadClasses['BackAndForth'] = $dir . 'BackAndForth.class.php'; |
29 | | -$wgExtensionMessagesFiles['BackAndForth'] = $dir . 'BackAndForth.i18n.php'; |
| 28 | +$wgExtensionMessagesFiles['BackAndForth'] = dirname(__FILE__) . '/BackAndForth.i18n.php'; |
30 | 29 | |
31 | 30 | /** |
32 | 31 | * Extension setup function |
Index: trunk/extensions/AntiSpoof/generateEquivset.php |
— | — | @@ -1,21 +1,21 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$dir = dirname(__FILE__) . '/'; |
5 | | - |
6 | 4 | require_once ( getenv('MW_INSTALL_PATH') !== false |
7 | 5 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
8 | | - : $dir . '../../maintenance/commandLine.inc' ); |
| 6 | + : dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' ); |
9 | 7 | |
| 8 | +$dir = dirname( __FILE__ ); |
| 9 | + |
10 | 10 | $endl = ' |
11 | 11 | '; |
12 | 12 | |
13 | | -$lines = file( $dir . "equivset.in" ); |
| 13 | +$lines = file( "$dir/equivset.in" ); |
14 | 14 | if ( !$lines ) { |
15 | 15 | print "Unable to open equivset.in\n"; |
16 | 16 | exit( 1 ); |
17 | 17 | } |
18 | 18 | |
19 | | -$setsFile = fopen( $dir . "equivset.txt", 'w' ); |
| 19 | +$setsFile = fopen( "$dir/equivset.txt", 'w' ); |
20 | 20 | if ( !$setsFile ) { |
21 | 21 | print "Unable to open equivset.txt for writing\n"; |
22 | 22 | exit( 1 ); |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | EOT |
33 | 33 | ); |
34 | 34 | |
35 | | -$outputFile = fopen( $dir . "equivset.php", 'w' ); |
| 35 | +$outputFile = fopen( "$dir/equivset.php", 'w' ); |
36 | 36 | if ( !$outputFile ) { |
37 | 37 | print "Unable to open equivset.php for writing\n"; |
38 | 38 | exit( 1 ); |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | EOT |
48 | 48 | ); |
49 | 49 | |
50 | | -$serializedFile = fopen( $dir . "equivset.ser", 'w' ); |
| 50 | +$serializedFile = fopen( "$dir/equivset.ser", 'w' ); |
51 | 51 | if ( !$serializedFile ) { |
52 | 52 | print "Unable to open equivset.ser for writing\n"; |
53 | 53 | exit( 1 ); |
Index: trunk/extensions/OpenSearchXml/OpenSearchXml.php |
— | — | @@ -30,11 +30,11 @@ |
31 | 31 | 'url' => 'http://www.mediawiki.org/wiki/Extension:OpenSearchXml' |
32 | 32 | ); |
33 | 33 | |
34 | | -$dir = dirname(__FILE__) . '/'; |
35 | | -$wgExtensionMessagesFiles['OpenSearchXml'] = $dir . 'OpenSearchXml.i18n.php'; |
| 34 | +$wgExtensionMessagesFiles['OpenSearchXml'] = dirname(__FILE__) . '/OpenSearchXml.i18n.php'; |
36 | 35 | |
37 | 36 | $wgAPIModules['opensearch'] = 'ApiOpenSearchXml'; |
38 | | -$wgAutoloadClasses['ApiOpenSearchXml'] = $dir . 'ApiOpenSearchXml.php'; |
| 37 | +$wgAutoloadClasses['ApiOpenSearchXml'] = |
| 38 | + dirname(__FILE__) . '/ApiOpenSearchXml.php'; |
39 | 39 | |
40 | 40 | $wgHooks['OpenSearchUrls'][] = 'efOpenSearchXmlUrls'; |
41 | 41 | |
Index: trunk/extensions/Configure/Configure.settings.php |
— | — | @@ -38,8 +38,7 @@ |
39 | 39 | return; |
40 | 40 | $this->initialized = true; |
41 | 41 | |
42 | | - $dir = dirname(__FILE__) . '/'; |
43 | | - require( $dir . 'Configure.settings-core.php' ); |
| 42 | + require( dirname( __FILE__ ) . '/Configure.settings-core.php' ); |
44 | 43 | $this->settings = $settings; |
45 | 44 | $this->arrayDefs = $arrayDefs; |
46 | 45 | $this->emptyValues = $emptyValues; |
— | — | @@ -48,7 +47,7 @@ |
49 | 48 | $this->notEditableSettings = $notEditableSettings; |
50 | 49 | $this->settingsVersion = $settingsVersion; |
51 | 50 | |
52 | | - require( $dir . 'Configure.settings-ext.php' ); |
| 51 | + require( dirname( __FILE__ ) . '/Configure.settings-ext.php' ); |
53 | 52 | $this->extensions = $extensions; |
54 | 53 | } |
55 | 54 | |
Index: trunk/extensions/Configure/manage.php |
— | — | @@ -12,14 +12,13 @@ |
13 | 13 | $optionsWithArgs = array( 'revert', 'delete' ); |
14 | 14 | define( 'EXT_CONFIGURE_NO_EXTRACT', true ); |
15 | 15 | |
16 | | -$dir = dirname(__FILE__) . '/'; |
17 | 16 | $IP = getenv( 'MW_INSTALL_PATH' ); |
18 | 17 | if ( $IP === false ) |
19 | | - $IP = $dir . '../..'; |
| 18 | + $IP = dirname( __FILE__ ) . '/../..'; |
20 | 19 | |
21 | 20 | require_once( "$IP/maintenance/commandLine.inc" ); |
22 | 21 | |
23 | | -require_once( $dir . 'manage.inc' ); |
| 22 | +require_once( dirname( __FILE__ ) . '/manage.inc' ); |
24 | 23 | |
25 | 24 | $obj = new ConfigurationManager( $options ); |
26 | 25 | $obj->run(); |
Index: trunk/extensions/Configure/migrateToDB.php |
— | — | @@ -9,14 +9,13 @@ |
10 | 10 | * @license GPLv2 or higher |
11 | 11 | */ |
12 | 12 | |
13 | | -$dir = dirname(__FILE__) . '/'; |
14 | 13 | $IP = getenv( 'MW_INSTALL_PATH' ); |
15 | 14 | if ( $IP === false ) |
16 | | - $IP = $dir . '../..'; |
| 15 | + $IP = dirname( __FILE__ ) . '/../..'; |
17 | 16 | |
18 | 17 | require_once( "$IP/maintenance/commandLine.inc" ); |
19 | 18 | |
20 | | -require_once( $dir . "migrateToDB.inc" ); |
| 19 | +require_once( dirname( __FILE__ ) . "/migrateToDB.inc" ); |
21 | 20 | |
22 | 21 | $obj = new FilesToDB( $options ); |
23 | 22 | $obj->run(); |
Index: trunk/extensions/Configure/writePHP.php |
— | — | @@ -11,14 +11,13 @@ |
12 | 12 | |
13 | 13 | $optionsWithArgs = array( 'wiki', 'version', 'file' ); |
14 | 14 | |
15 | | -$dir = dirname(__FILE__) . '/'; |
16 | 15 | $IP = getenv( 'MW_INSTALL_PATH' ); |
17 | 16 | if ( $IP === false ) |
18 | | - $IP = $dir . '../..'; |
| 17 | + $IP = dirname( __FILE__ ) . '/../..'; |
19 | 18 | |
20 | 19 | require_once( "$IP/maintenance/commandLine.inc" ); |
21 | 20 | |
22 | | -require_once( $dir . 'writePHP.inc' ); |
| 21 | +require_once( dirname( __FILE__ ) . '/writePHP.inc' ); |
23 | 22 | |
24 | 23 | $obj = new ConfigurationWriter( $options ); |
25 | 24 | $obj->run(); |
Index: trunk/extensions/LabeledSectionTransclusion/lst.php |
— | — | @@ -32,11 +32,9 @@ |
33 | 33 | 'description' => 'Adds #lst and #lstx functions and <section> tag, enables marked sections of text to be transcluded', |
34 | 34 | 'descriptionmsg' => 'lst-desc', |
35 | 35 | ); |
| 36 | +$wgParserTestFiles[] = dirname( __FILE__ ) . "/lstParserTests.txt"; |
| 37 | +$wgExtensionMessagesFiles['LabeledSectionTransclusion'] = dirname(__FILE__) . '/lst.i18n.php'; |
36 | 38 | |
37 | | -$dir = dirname(__FILE__) . '/'; |
38 | | -$wgParserTestFiles[] = $dir . "lstParserTests.txt"; |
39 | | -$wgExtensionMessagesFiles['LabeledSectionTransclusion'] = $dir . 'lst.i18n.php'; |
40 | | - |
41 | 39 | // Local settings variable |
42 | 40 | // Must be set now to avoid injection via register_globals |
43 | 41 | $wgLstLocal = null; |
Index: trunk/extensions/AjaxQueryPages/Load.php |
— | — | @@ -19,12 +19,11 @@ |
20 | 20 | 'descriptionmsg' => 'ajax-qp-desc', |
21 | 21 | ); |
22 | 22 | |
23 | | - $dir = dirname(__FILE__) . '/'; |
24 | | - $wgExtensionMessagesFiles['AjaxQueryPages'] = $dir . 'AjaxQueryPages.i18n.php'; |
| 23 | + $wgExtensionMessagesFiles['AjaxQueryPages'] = dirname(__FILE__) . '/AjaxQueryPages.i18n.php'; |
25 | 24 | |
26 | 25 | // Load hooks |
27 | | - require_once( $dir . 'Hooks.php'); |
| 26 | + require_once(dirname(__FILE__) . '/Hooks.php'); |
28 | 27 | |
29 | 28 | // Set up AJAX entry point: |
30 | | - require_once( $dir . 'Response.php'); |
| 29 | + require_once(dirname(__FILE__) . '/Response.php'); |
31 | 30 | } |
Index: trunk/extensions/Babel/Babel.php |
— | — | @@ -39,20 +39,18 @@ |
40 | 40 | $wgHooks[ 'LanguageGetMagic' ][] = 'BabelStatic::Magic'; |
41 | 41 | $wgHooks[ 'AbortNewAccount' ][] = 'BabelAutoCreate::RegisterAbort'; |
42 | 42 | |
43 | | -$dir = dirname(__FILE__) . '/'; |
44 | | - |
45 | 43 | // Register internationalisation file. |
46 | | -$wgExtensionMessagesFiles[ 'Babel' ] = $dir . 'Babel.i18n.php'; |
| 44 | +$wgExtensionMessagesFiles[ 'Babel' ] = dirname( __FILE__ ) . '/Babel.i18n.php'; |
47 | 45 | |
48 | 46 | // Register autoload classes. |
49 | | -$wgAutoloadClasses[ 'Babel' ] = $dir . 'Babel.class.php'; |
50 | | -$wgAutoloadClasses[ 'BabelStatic' ] = $dir . 'BabelStatic.class.php'; |
51 | | -$wgAutoloadClasses[ 'BabelAutoCreate' ] = $dir . 'BabelAutoCreate.class.php'; |
| 47 | +$wgAutoloadClasses[ 'Babel' ] = dirname( __FILE__ ) . '/Babel.class.php'; |
| 48 | +$wgAutoloadClasses[ 'BabelStatic' ] = dirname( __FILE__ ) . '/BabelStatic.class.php'; |
| 49 | +$wgAutoloadClasses[ 'BabelAutoCreate' ] = dirname( __FILE__ ) . '/BabelAutoCreate.class.php'; |
52 | 50 | |
53 | 51 | // Configuration setttings. |
54 | 52 | $wgBabelUseLevelZeroCategory = false; |
55 | 53 | $wgBabelUseSimpleCategories = false; |
56 | 54 | $wgBabelUseMainCategories = true; |
57 | 55 | $wgLanguageCodesFiles = array(); |
58 | | -$wgLanguageCodesFiles[ 'ISO_639_1' ] = $dir . 'codes/ISO_639_1.php'; |
59 | | -$wgLanguageCodesFiles[ 'ISO_639_3' ] = $dir . 'codes/ISO_639_3.php'; |
\ No newline at end of file |
| 56 | +$wgLanguageCodesFiles[ 'ISO_639_1' ] = dirname( __FILE__ ) . '/codes/ISO_639_1.php'; |
| 57 | +$wgLanguageCodesFiles[ 'ISO_639_3' ] = dirname( __FILE__ ) . '/codes/ISO_639_3.php'; |
\ No newline at end of file |
Index: trunk/extensions/FileSearch/FileSearch.php |
— | — | @@ -12,10 +12,9 @@ |
13 | 13 | if( defined( 'MEDIAWIKI' ) ) { |
14 | 14 | |
15 | 15 | $wgExtensionFunctions[] = 'efFileSearchSetup'; |
16 | | - $dir = dirname(__FILE__) . '/'; |
17 | | - $wgAutoloadClasses['FileSearchIndexer'] = $dir . 'FileSearchIndexer.php'; |
18 | | - $wgAutoloadClasses['Extractor'] = $dir . 'extract/Extractor.php'; |
19 | | - $wgFileSearchExtractors['TextExtractor'] = $dir . 'extract/TextExtractor.php'; |
| 16 | + $wgAutoloadClasses['FileSearchIndexer'] = dirname( __FILE__ ) . '/FileSearchIndexer.php'; |
| 17 | + $wgAutoloadClasses['Extractor'] = dirname( __FILE__ ) . '/extract/Extractor.php'; |
| 18 | + $wgFileSearchExtractors['TextExtractor'] = dirname( __FILE__ ) . '/extract/TextExtractor.php'; |
20 | 19 | |
21 | 20 | function efFileSearchSetup() { |
22 | 21 | global $wgHooks; |
Index: trunk/extensions/ConfirmAccount/SpecialConfirmAccount.php |
— | — | @@ -177,6 +177,7 @@ |
178 | 178 | return true; |
179 | 179 | } |
180 | 180 | |
| 181 | +$dir = dirname(__FILE__) . '/'; |
181 | 182 | # Request an account |
182 | 183 | $wgSpecialPages['RequestAccount'] = 'RequestAccountPage'; |
183 | 184 | $wgAutoloadClasses['RequestAccountPage'] = $dir . 'RequestAccount_body.php'; |
Index: trunk/extensions/Poem/Poem.php |
— | — | @@ -32,11 +32,9 @@ |
33 | 33 | 'description' => 'Adds <tt><poem></tt> tag for poem formatting', |
34 | 34 | 'descriptionmsg' => 'poem-desc', |
35 | 35 | ); |
| 36 | +$wgParserTestFiles[] = dirname( __FILE__ ) . "/poemParserTests.txt"; |
| 37 | +$wgExtensionMessagesFiles['Poem'] = dirname(__FILE__) . '/Poem.i18n.php'; |
36 | 38 | |
37 | | -$dir = dirname(__FILE__) . '/'; |
38 | | -$wgParserTestFiles[] = $dir . "poemParserTests.txt"; |
39 | | -$wgExtensionMessagesFiles['Poem'] = $dir . 'Poem.i18n.php'; |
40 | | - |
41 | 39 | function wfPoemExtension() { |
42 | 40 | $GLOBALS['wgParser']->setHook("poem","PoemExtension"); |
43 | 41 | return true; |
Index: trunk/extensions/GroupPermissionsManager/GroupPermissionsManager_body.php |
— | — | @@ -283,8 +283,7 @@ |
284 | 284 | */ |
285 | 285 | private function writeFile( $type ) { |
286 | 286 | //can we write the file? |
287 | | - $dir = dirname(__FILE__) . '/'; |
288 | | - if(!is_writable( $dir . "config" )) { |
| 287 | + if(!is_writable( dirname(__FILE__) . "/config" )) { |
289 | 288 | echo( "<h2>Cannot write config file, aborting</h2> |
290 | 289 | |
291 | 290 | <p>In order to use this extension, you need to make the /config subdirectory of this extension |
— | — | @@ -294,8 +293,8 @@ |
295 | 294 | die( 1 ); |
296 | 295 | } |
297 | 296 | $this->oldrev = gmdate('dmYHis'); |
298 | | - if(file_exists( $dir . 'config/GroupPermissions.php')) { |
299 | | - $r = rename( $dir . 'config/GroupPermissions.php', $dir . 'config/GroupPermissions.' . $this->oldrev . '.php'); |
| 297 | + if(file_exists(dirname(__FILE__) . '/config/GroupPermissions.php')) { |
| 298 | + $r = rename(dirname(__FILE__) . '/config/GroupPermissions.php', dirname(__FILE__) . '/config/GroupPermissions.' . $this->oldrev . '.php'); |
300 | 299 | if(!$r) { |
301 | 300 | global $wgOut; |
302 | 301 | $wgOut->addWikiText(wfMsg('grouppermissions-nooldrev')); |
— | — | @@ -398,7 +397,7 @@ |
399 | 398 | } |
400 | 399 | |
401 | 400 | $grouppermissions = str_replace( "\r\n", "\n", $grouppermissions ); |
402 | | - chdir( $dir . "config" ); |
| 401 | + chdir( dirname(__FILE__) . "/config" ); |
403 | 402 | $f = fopen( "GroupPermissions.php", 'wt' ); |
404 | 403 | if(fwrite( $f, $grouppermissions ) ) { |
405 | 404 | fclose( $f ); |
Index: trunk/extensions/GroupPermissionsManager/SortPermissions.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | if($success) { |
44 | 44 | $wgOut->addWikiText(wfMsg('grouppermissions-sp-success')); |
45 | 45 | global $wgGroupPermissions, $wgGPManagerSortTypes, $wgGPManagerSort; |
46 | | - require( $dir . '/config/SortPermissions.php'); |
| 46 | + require(dirname(__FILE__).'/config/SortPermissions.php'); |
47 | 47 | } |
48 | 48 | } |
49 | 49 | $this->makeForm(); |
— | — | @@ -132,9 +132,7 @@ |
133 | 133 | */ |
134 | 134 | private function writeFile() { |
135 | 135 | //can we write the file? |
136 | | - $dir = dirname(__FILE__) . '/'; |
137 | | - |
138 | | - if(!is_writable( $dir . "config" )) { |
| 136 | + if(!is_writable( dirname(__FILE__) . "/config" )) { |
139 | 137 | echo( "<h2>Cannot write config file, aborting</h2> |
140 | 138 | |
141 | 139 | <p>In order to use this extension, you need to make the /config subdirectory of this extension |
— | — | @@ -144,8 +142,8 @@ |
145 | 143 | die( 1 ); |
146 | 144 | } |
147 | 145 | $this->oldrev = gmdate('dmYHis'); |
148 | | - if(file_exists( $dir . 'config/SortPermissions.php')) { |
149 | | - $r = rename( $dir . 'config/SortPermissions.php', $dir . 'config/SortPermissions.' . $this->oldrev . '.php'); |
| 146 | + if(file_exists(dirname(__FILE__) . '/config/SortPermissions.php')) { |
| 147 | + $r = rename(dirname(__FILE__) . '/config/SortPermissions.php', dirname(__FILE__) . '/config/SortPermissions.' . $this->oldrev . '.php'); |
150 | 148 | if(!$r) { |
151 | 149 | global $wgOut; |
152 | 150 | $wgOut->addWikiText(wfMsg('grouppermissions-nooldrev')); |
— | — | @@ -209,7 +207,7 @@ |
210 | 208 | $sortpermissions .= "\n\$wgGPManagerSort['$key'] = array($st);"; |
211 | 209 | } |
212 | 210 | $sortpermissions = str_replace( "\r\n", "\n", $sortpermissions ); |
213 | | - chdir( $dir . 'config' ); |
| 211 | + chdir( dirname(__FILE__) . '/config' ); |
214 | 212 | $f = fopen( 'SortPermissions.php', 'wt' ); |
215 | 213 | if(!fwrite( $f, $sortpermissions ) ) { |
216 | 214 | echo('<p class="error">An error occured while writing the config/SortPermissions.php file. Check user rights and disk space then try again.</p>'); |
— | — | @@ -219,9 +217,9 @@ |
220 | 218 | fclose($f); |
221 | 219 | if($nr !== array()) { |
222 | 220 | $np = ''; |
223 | | - if(file_exists( $dir . 'config/GroupPermissions.php')) { |
224 | | - $np = file_get_contents( $dir . 'config/GroupPermissions.php'); |
225 | | - $r = rename( $dir . 'config/GroupPermissions.php', $dir . 'config/GroupPermissions.' . $this->oldrev . '.php'); |
| 221 | + if(file_exists(dirname(__FILE__) . '/config/GroupPermissions.php')) { |
| 222 | + $np = file_get_contents(dirname(__FILE__) . '/config/GroupPermissions.php'); |
| 223 | + $r = rename(dirname(__FILE__) . '/config/GroupPermissions.php', dirname(__FILE__) . '/config/GroupPermissions.' . $this->oldrev . '.php'); |
226 | 224 | if(!$r) { |
227 | 225 | global $wgOut; |
228 | 226 | $wgOut->addWikiText(wfMsg('grouppermissions-nooldrev')); |
Index: trunk/extensions/GroupPermissionsManager/GetMessages.php |
— | — | @@ -10,13 +10,12 @@ |
11 | 11 | } |
12 | 12 | |
13 | 13 | global $wgExtensionMessagesFiles; |
14 | | -$dir = dirname(__FILE__) . '/'; |
15 | | -require( $dir . 'GroupPermissionsManager.i18n.php'); |
| 14 | +require(dirname(__FILE__) . '/GroupPermissionsManager.i18n.php'); |
16 | 15 | |
17 | | -$files = scandir( $dir . 'plugins/messages'); |
| 16 | +$files = scandir(dirname(__FILE__) . '/plugins/messages'); |
18 | 17 | foreach($files as $file) { |
19 | 18 | if(preg_match('/\.i18n\.php5?$/i', $file)) { |
20 | | - $wgExtensionMessagesFiles[$file] = $dir . 'plugins/messages/' . $file; |
| 19 | + $wgExtensionMessagesFiles[$file] = dirname(__FILE__) . '/plugins/messages/' . $file; |
21 | 20 | wfLoadExtensionMessages($file); |
22 | 21 | } |
23 | 22 | } |
Index: trunk/extensions/AntiBot/AntiBot.php |
— | — | @@ -40,10 +40,8 @@ |
41 | 41 | 'description' => 'Simple framework for spambot checks and trigger payloads', |
42 | 42 | 'descriptionmsg' => 'antibot-desc', |
43 | 43 | ); |
| 44 | +$wgExtensionMessagesFiles['AntiBot'] = dirname(__FILE__) . '/AntiBot.i18n.php'; |
44 | 45 | |
45 | | -$dir = dirname(__FILE__) . '/'; |
46 | | -$wgExtensionMessagesFiles['AntiBot'] = $dir . 'AntiBot.i18n.php'; |
47 | | - |
48 | 46 | /** |
49 | 47 | * A map of payload types to callbacks |
50 | 48 | * This may be extended by plugins. |
— | — | @@ -55,7 +53,7 @@ |
56 | 54 | ); |
57 | 55 | |
58 | 56 | # Load plugins |
59 | | -foreach ( glob( $dir . 'active/*.php' ) as $file ) { |
| 57 | +foreach ( glob( dirname( __FILE__ ) . '/active/*.php' ) as $file ) { |
60 | 58 | require( $file ); |
61 | 59 | } |
62 | 60 | |
Index: trunk/extensions/EmailPage/EmailPage.php |
— | — | @@ -22,14 +22,13 @@ |
23 | 23 | $wgEmailPageAllowAllUsers = false; # Whether to allow sending to all users (the "user" group) |
24 | 24 | $wgEmailPageToolboxLink = true; # Add a link to the sidebar toolbox? |
25 | 25 | $wgEmailPageActionLink = true; # Add a link to the actions links? |
| 26 | +$wgPhpMailerClass = dirname(__FILE__).'/phpMailer_v2.1.0beta2/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/ |
26 | 27 | |
27 | | -$dir = dirname(__FILE__) . '/'; |
28 | | -$wgPhpMailerClass = $dir . 'phpMailer_v2.1.0beta2/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/ |
29 | | - |
30 | 28 | if ($wgEmailPageGroup) $wgGroupPermissions['sysop'][$wgEmailPageGroup] = true; |
31 | 29 | |
32 | 30 | if (isset($_SERVER['SERVER_ADDR'])) $wgEmailPageAllowRemoteAddr[] = $_SERVER['SERVER_ADDR']; |
33 | 31 | |
| 32 | +$dir = dirname(__FILE__) . '/'; |
34 | 33 | $wgAutoloadClasses['SpecialEmailPage'] = $dir . 'EmailPage_body.php'; |
35 | 34 | $wgExtensionMessagesFiles['EmailPage'] = $dir . 'EmailPage.i18n.php'; |
36 | 35 | $wgExtensionAliasesFiles['EmailPage'] = $dir . 'EmailPage.alias.php'; |
Index: trunk/extensions/ParserFunctions/ParserFunctions.php |
— | — | @@ -14,11 +14,10 @@ |
15 | 15 | 'descriptionmsg' => 'pfunc_desc', |
16 | 16 | ); |
17 | 17 | |
18 | | -$dir = dirname(__FILE__) . '/'; |
19 | | -$wgExtensionMessagesFiles['ParserFunctions'] = $dir . 'ParserFunctions.i18n.php'; |
| 18 | +$wgExtensionMessagesFiles['ParserFunctions'] = dirname(__FILE__) . '/ParserFunctions.i18n.php'; |
20 | 19 | $wgHooks['LanguageGetMagic'][] = 'wfParserFunctionsLanguageGetMagic'; |
21 | 20 | |
22 | | -$wgParserTestFiles[] = $dir . "funcsParserTests.txt"; |
| 21 | +$wgParserTestFiles[] = dirname( __FILE__ ) . "/funcsParserTests.txt"; |
23 | 22 | |
24 | 23 | class ExtParserFunctions { |
25 | 24 | var $mExprParser; |
— | — | @@ -543,3 +542,4 @@ |
544 | 543 | $magicWords[$word] = $trans; |
545 | 544 | return true; |
546 | 545 | } |
| 546 | + |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_setup.php |
— | — | @@ -42,11 +42,9 @@ |
43 | 43 | */ |
44 | 44 | $optionsWithArgs = array( 'b', 'user', 'password'); |
45 | 45 | |
46 | | -$dir = dirname(__FILE__) . '/'; |
47 | | - |
48 | 46 | require_once ( getenv('MW_INSTALL_PATH') !== false |
49 | 47 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
50 | | - : $dir . '../../../maintenance/commandLine.inc' ); |
| 48 | + : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' ); |
51 | 49 | require_once("$IP/maintenance/counter.php"); |
52 | 50 | |
53 | 51 | global $smwgDefaultStore; |
— | — | @@ -77,7 +75,7 @@ |
78 | 76 | |
79 | 77 | global $smwgIP; |
80 | 78 | if (! isset($smwgIP)) |
81 | | - $smwgIP = $dir . '..'; |
| 79 | + $smwgIP = dirname(__FILE__) . '/..'; |
82 | 80 | |
83 | 81 | require_once($smwgIP . '/includes/SMW_GlobalFunctions.php'); |
84 | 82 | |
Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_conceptCache.php |
— | — | @@ -14,11 +14,9 @@ |
15 | 15 | |
16 | 16 | $optionsWithArgs = array( 'concept', 'old', 's', 'e'); |
17 | 17 | |
18 | | -$dir = dirname(__FILE__) . '/'; |
19 | | - |
20 | 18 | require_once ( getenv('MW_INSTALL_PATH') !== false |
21 | 19 | ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc" |
22 | | - : $dir . '../../../maintenance/commandLine.inc' ); |
| 20 | + : dirname( __FILE__ ) . '/../../../maintenance/commandLine.inc' ); |
23 | 21 | require_once("$IP/maintenance/counter.php"); |
24 | 22 | |
25 | 23 | $output_level = array_key_exists('quiet', $options)?0: |
— | — | @@ -96,7 +94,7 @@ |
97 | 95 | |
98 | 96 | global $smwgIP; |
99 | 97 | if (! isset($smwgIP)) |
100 | | - $smwgIP = $dir . '..'; |
| 98 | + $smwgIP = dirname(__FILE__) . '/..'; |
101 | 99 | |
102 | 100 | require_once($smwgIP . '/includes/SMW_GlobalFunctions.php'); |
103 | 101 | |
Index: trunk/extensions/cldr/LanguageNames.body.php |
— | — | @@ -60,10 +60,8 @@ |
61 | 61 | private static function loadLanguage( $code ) { |
62 | 62 | if ( !isset(self::$cache[$code]) ) { |
63 | 63 | |
64 | | - $dir = dirname(__FILE__) . '/'; |
65 | | - |
66 | 64 | /** Load override for wrong or missing entries in cldr */ |
67 | | - $override = $dir . self::getOverrideFileName( $code ); |
| 65 | + $override = dirname(__FILE__) . '/' . self::getOverrideFileName( $code ); |
68 | 66 | if ( file_exists( $override ) ) { |
69 | 67 | $names = false; |
70 | 68 | require( $override ); |
— | — | @@ -72,7 +70,7 @@ |
73 | 71 | } |
74 | 72 | } |
75 | 73 | |
76 | | - $filename = $dir . self::getFileName( $code ); |
| 74 | + $filename = dirname(__FILE__) . '/' . self::getFileName( $code ); |
77 | 75 | if ( file_exists( $filename ) ) { |
78 | 76 | $names = false; |
79 | 77 | require( $filename ); |
Index: trunk/extensions/ConfirmEdit/FancyCaptcha.php |
— | — | @@ -37,6 +37,6 @@ |
38 | 38 | global $wgCaptchaSecret; |
39 | 39 | $wgCaptchaSecret = "CHANGE_THIS_SECRET!"; |
40 | 40 | |
41 | | -$dir = dirname(__FILE__) . '/'; |
42 | | -$wgExtensionMessagesFiles['FancyCaptcha'] = $dir . 'FancyCaptcha.i18n.php'; |
43 | | -$wgAutoloadClasses['FancyCaptcha'] = $dir . 'FancyCaptcha.class.php'; |
| 41 | +$wgExtensionMessagesFiles['FancyCaptcha'] = dirname(__FILE__).'/FancyCaptcha.i18n.php'; |
| 42 | +$wgAutoloadClasses['FancyCaptcha'] = dirname( __FILE__ ) . '/FancyCaptcha.class.php'; |
| 43 | + |