Index: trunk/extensions/PrivateNamespaces/PrivateNamespaces.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | /** |
28 | 28 | * A really simple extension to allow for making certain namespaces |
29 | 29 | * "private"--that is, to prevent users lacking necessary rights from |
30 | | - * reading, editing, moving, etc., any page in that namespace. It |
| 30 | + * reading, editing, moving, etc., any page in that namespace. It |
31 | 31 | * should cover transclusion, searching (though the titles will still |
32 | 32 | * be visible), diffs, Special:Export, history paging, etc. |
33 | 33 | * |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | * careful when installing new extensions as they may open up a variety |
40 | 40 | * of new ways to get around what this code aims to do. |
41 | 41 | * |
42 | | - * USAGE: |
| 42 | + * USAGE: |
43 | 43 | * Add require_once("$IP/extensions/PrivateNamespaces/PrivateNamespaces.php"); |
44 | 44 | * to your LocalSetings.php. |
45 | 45 | * |
— | — | @@ -48,14 +48,6 @@ |
49 | 49 | * |
50 | 50 | */ |
51 | 51 | |
52 | | -$wgExtensionCredits['parserhook'][] = array( |
53 | | - 'name' => 'PrivateNamespaces', |
54 | | - 'version' => '1.1', |
55 | | - 'author' => 'Daniel Cannon', |
56 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Private Namespaces', |
57 | | - 'description' => 'Allow for making certain namespaces private', |
58 | | -); |
59 | | - |
60 | 52 | /** |
61 | 53 | * An array mapping namespace ids to the right needed to view or edit |
62 | 54 | * pages in the namespace. |
— | — | @@ -65,7 +57,7 @@ |
66 | 58 | /** |
67 | 59 | * Hook userCan to perform additional validation checks. |
68 | 60 | */ |
69 | | -$wgHooks['userCan'][] = 'wfCheckIfPrivate'; |
| 61 | +$wgHooks['userCan'][] = 'wfCheckIfPrivate'; |
70 | 62 | |
71 | 63 | /** |
72 | 64 | * Hook BeforeParserFetchTemplateAndtitle to perform validation checks |
— | — | @@ -78,10 +70,10 @@ |
79 | 71 | * then the user must have the specified right in order to perform |
80 | 72 | * any action on the page. |
81 | 73 | */ |
82 | | -function wfCheckIfPrivate( $title, $user, $action, &$result) { |
| 74 | +function wfCheckIfPrivate( $title, $user, $action, &$result) { |
83 | 75 | global $wgPrivateNamespaces; |
84 | 76 | if ( in_array( $title->getNamespace(), $wgPrivateNamespaces ) ) { |
85 | | - if ( !$user->isAllowed( $wgPrivateNamespaces[ |
| 77 | + if ( !$user->isAllowed( $wgPrivateNamespaces[ |
86 | 78 | $title->getNamespace() ] ) ) { |
87 | 79 | $result = false; |
88 | 80 | return false; |
— | — | @@ -92,9 +84,9 @@ |
93 | 85 | } |
94 | 86 | |
95 | 87 | /** |
96 | | - * Prevent the transcluding of a page whose read access is prevented by |
| 88 | + * Prevent the transcluding of a page whose read access is prevented by |
97 | 89 | * $wgPrivateNamespaces. NOTE: It may still be possible for a user who |
98 | | - * has read access to a page to transclude in a public page and for that |
| 90 | + * has read access to a page to transclude in a public page and for that |
99 | 91 | * to then be cached and made visible to other users who shouldn't have |
100 | 92 | * access to the content. We should, however, be able to hope that those |
101 | 93 | * with restricted access would know better than to do so, however. |
Index: trunk/extensions/WhoIsWatching/SpecialWhoIsWatching.php |
— | — | @@ -10,12 +10,12 @@ |
11 | 11 | } |
12 | 12 | |
13 | 13 | $wgExtensionCredits['specialpage'][] = array( |
14 | | - 'version' => '0.3', |
15 | | - 'name' => 'WhoIsWatching', |
16 | | - 'author' => 'Paul Grinberg, Siebrand Mazeland', |
17 | | - 'email' => 'gri6507 at yahoo dot com', |
18 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:WhoIsWatching', |
19 | | - 'description' => 'Provides a listing of usernames watching a wiki page', |
| 14 | + 'version' => '0.3', |
| 15 | + 'name' => 'WhoIsWatching', |
| 16 | + 'author' => 'Paul Grinberg, Siebrand Mazeland', |
| 17 | + 'email' => 'gri6507 at yahoo dot com', |
| 18 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:WhoIsWatching', |
| 19 | + 'description' => 'Provides a listing of usernames watching a wiki page' |
20 | 20 | ); |
21 | 21 | |
22 | 22 | $wgAutoloadClasses['WhoIsWatching'] = dirname(__FILE__) . '/SpecialWhoIsWatching_body.php'; |
Index: trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php |
— | — | @@ -48,13 +48,8 @@ |
49 | 49 | /**********************************************/ |
50 | 50 | /***** credits (see "Special:Version") *****/ |
51 | 51 | /**********************************************/ |
52 | | - $wgExtensionCredits['specialpage'][]= array( |
53 | | - 'name' => 'Semantic Drilldown', |
54 | | - 'version' => SD_VERSION, |
55 | | - 'author' => 'Yaron Koren', |
56 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown', |
57 | | - 'description' => 'A drilldown interface for navigating through semantic data', |
58 | | - ); |
| 52 | + $wgExtensionCredits['specialpage'][]= array('name'=>'Semantic Drilldown', 'version'=>SD_VERSION, 'author'=>'Yaron Koren', |
| 53 | + 'url'=>'http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown', 'description' => 'A drilldown interface for navigating through semantic data'); |
59 | 54 | |
60 | 55 | return true; |
61 | 56 | } |
— | — | @@ -240,7 +235,7 @@ |
241 | 236 | function sdfLoadFiltersForCategory($category) { |
242 | 237 | global $sdgContLang; |
243 | 238 | $sd_props = $sdgContLang->getSpecialPropertiesArray(); |
244 | | - |
| 239 | + |
245 | 240 | $filters = array(); |
246 | 241 | $filter_names = sdfGetValuesForProperty(str_replace(' ', '_', $category), NS_CATEGORY, $sd_props[SD_SP_HAS_FILTER], true, SD_NS_FILTER); |
247 | 242 | foreach ($filter_names as $filter_name) { |
— | — | @@ -284,3 +279,5 @@ |
285 | 280 | } |
286 | 281 | return $pages; |
287 | 282 | } |
| 283 | + |
| 284 | +?> |
Index: trunk/extensions/WebStore/WebStore.php |
— | — | @@ -1,5 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | + |
4 | 5 | $wgWebStoreSettings = array( |
5 | 6 | /** |
6 | 7 | * Set this in LocalSettings.php to an array of IP ranges allowed to access |
— | — | @@ -67,11 +68,10 @@ |
68 | 69 | $wgHooks['LoadAllMessages'][] = 'WebStoreCommon::initialiseMessages'; |
69 | 70 | |
70 | 71 | $wgExtensionCredits['other'][] = array( |
71 | | - 'name' => 'WebStore', |
72 | | - 'version' => '1.1', |
73 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:WebStore', |
74 | | - 'author' => 'Tim Starling', |
| 72 | + 'name' => 'WebStore', |
| 73 | + 'author' => 'Tim Starling', |
75 | 74 | 'description' => 'Web-only (non-NFS) file storage middleware', |
76 | 75 | ); |
77 | 76 | |
78 | 77 | define( 'MW_WEBSTORE_ENABLED', 1 ); |
| 78 | + |
Index: trunk/extensions/wikiwyg/share/MediaWiki/extensions/CreatePage/SpecialCreatePage.php |
— | — | @@ -11,11 +11,10 @@ |
12 | 12 | |
13 | 13 | $wgExtensionFunctions[] = 'wfCreatePageSetup'; |
14 | 14 | $wgExtensionCredits['specialpage'][] = array( |
15 | | - 'name' => 'Create Page', |
16 | | - 'version' => '1.1', |
17 | | - 'author' => 'Bartek Lapinski', |
18 | | - 'url' => 'http://www.wikia.com', |
19 | | - 'description' => 'Allows to create a new page - with the wysiwyg editor', |
| 15 | + 'name' => 'Create Page', |
| 16 | + 'author' => 'Bartek Lapinski', |
| 17 | + 'url' => 'http://www.wikia.com' , |
| 18 | + 'description' => 'allows to create a new page - with the wysiwyg editor ' |
20 | 19 | ); |
21 | 20 | |
22 | 21 | /* special page init */ |
— | — | @@ -40,7 +39,7 @@ |
41 | 40 | 'createpage_show_cloud' => '[show category cloud]' , |
42 | 41 | 'createpage_hide_cloud' => '[hide category cloud]' , |
43 | 42 | 'createpage_alternate_creation' => 'or click $1 to use original editor' , |
44 | | - 'createpage_categories_help' => 'Categories help organize information in this wiki. Please choose from the list below or type a new one.' |
| 43 | + 'createpage_categories_help' => 'Categories help organize information in this wiki. Please choose from the list below or type a new one.' |
45 | 44 | ) |
46 | 45 | ); |
47 | 46 | SpecialPage::addPage(new SpecialPage('Createpage', '', true, 'wfCreatePageSpecial', false)); |
— | — | @@ -215,7 +214,7 @@ |
216 | 215 | <tr> |
217 | 216 | <td class=\"editpage_header\">".wfMsg ('createpage_categories')."</td> |
218 | 217 | <td> |
219 | | - <textarea name=\"category\" id=\"category\" rows=\"1\" cols=\"80\" /></textarea> |
| 218 | + <textarea name=\"category\" id=\"category\" rows=\"1\" cols=\"80\" /></textarea> |
220 | 219 | <div id=\"category_cloud_wrapper\" class=\editpage_inside\"> |
221 | 220 | <div id=\"editpage_cloud_section\" style=\"line-height: 22pt; border: 1px solid gray; padding: 15px 15px 15px 15px\"> ".$cloud_html." |
222 | 221 | </div> |
— | — | @@ -271,3 +270,5 @@ |
272 | 271 | $wgOut->setSubTitle ( wfMsg ('createpage_success_subtitle', wfMsg('createpage_'.$this->mMode) ) ) ; |
273 | 272 | } |
274 | 273 | } |
| 274 | + |
| 275 | +?> |
Index: trunk/extensions/wikiwyg/share/MediaWiki/extensions/MediaWikiWyg.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<?php |
| 2 | +<?PHP |
3 | 3 | |
4 | 4 | global $wgHooks, $wgInPageEnabled ; |
5 | 5 | if (!isset($wgInPageEnabled) || ($wgInPageEnabled == false)) { |
— | — | @@ -12,17 +12,17 @@ |
13 | 13 | |
14 | 14 | $wgExtensionFunctions[] = 'registerWikiwygExtension'; |
15 | 15 | $wgExtensionCredits['other'][] = array( |
16 | | - 'name' => 'MediaWikiWyg', |
17 | | - 'author' => '[http://svn.wikiwyg.net/code/trunk/wikiwyg/AUTHORS author list], Bartek Lapinski', |
18 | | - 'version' => '0.20', |
19 | | - 'url' => 'http://www.wikiwyg.net, http://www.wikia.com', |
20 | | - 'description' => 'Mediawiki integration of the Wikiwyg WYSIWYG wiki editor', |
| 16 | + 'name' => 'MediaWikiWyg', |
| 17 | + 'author' => 'http://svn.wikiwyg.net/code/trunk/wikiwyg/AUTHORS, Bartek Lapinski', |
| 18 | + 'version' => 0.20, |
| 19 | + 'url' => 'http://www.wikiwyg.net, http://www.wikia.com', |
| 20 | + 'description' => 'Mediawiki integration of the Wikiwyg WYSIWYG wiki editor' |
21 | 21 | ); |
22 | 22 | |
23 | 23 | function wfGetDependingOnSkin () { |
24 | 24 | $useInPageTrue = '' ; |
25 | 25 | global $wgCookiePrefix, $wgUser, $wgInPageEnabled ; |
26 | | - |
| 26 | + |
27 | 27 | /* do not forget about editor disabled from variable... */ |
28 | 28 | if (!$wgInPageEnabled || !isset ($wgInPageEnabled)) { |
29 | 29 | return 0 ; |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | $edittime = $epage->mArticle->getTimestamp(); |
354 | 354 | $newtext = $epage->mArticle->replaceSection( |
355 | 355 | $section, $text, '', $edittime ); |
356 | | - |
| 356 | + |
357 | 357 | $newtext = $epage->mArticle->preSaveTransform( $newtext ); |
358 | 358 | $oldtitle = wfMsgExt( 'currentrev', array('parseinline') ); |
359 | 359 | $newtitle = wfMsgExt( 'yourtext', array('parseinline') ); |
— | — | @@ -366,7 +366,7 @@ |
367 | 367 | |
368 | 368 | $diffdiv = '<div id="wikiDiff">' . $difftext . '</div>'; |
369 | 369 | $wgOut->addHTML ($diffdiv) ; |
370 | | - |
| 370 | + |
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
— | — | @@ -440,3 +440,5 @@ |
441 | 441 | } |
442 | 442 | |
443 | 443 | } # End if(defined MEDIAWIKI) |
| 444 | + |
| 445 | +?> |
Index: trunk/extensions/wikiwyg/share/MediaWiki/extensions/WikiwygEditing/WikiwygEditing.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<?php |
| 2 | +<?PHP |
3 | 3 | |
4 | 4 | global $wgHooks; |
5 | 5 | $wgHooks['EditPage::showEditForm:initial'][] = 'WikiwygAlternateEdit' ; |
— | — | @@ -7,11 +7,11 @@ |
8 | 8 | |
9 | 9 | $wgExtensionFunctions[] = 'registerWikiwygEditing'; |
10 | 10 | $wgExtensionCredits['other'][] = array( |
11 | | - 'name' => 'WikiwygEditing', |
12 | | - 'author' => 'Bartek Lapinski', |
13 | | - 'version' => '1.0', |
14 | | - 'url' => 'http://www.wikia.com', |
15 | | - 'description' => 'MediaWiki integration of the Wikiwyg WYSIWYG wiki editor - for full page editing', |
| 11 | + 'name' => 'WikiwygEditing' , |
| 12 | + 'author' => 'Bartek Lapinski' , |
| 13 | + 'version' => 1.0 , |
| 14 | + 'url' => 'http://www.wikia.com' , |
| 15 | + 'description' => 'Mediawiki integration of the Wikiwyg WYSIWYG wiki editor - for full page editing ' |
16 | 16 | ); |
17 | 17 | |
18 | 18 | function registerWikiwygEditing () { |
— | — | @@ -42,14 +42,14 @@ |
43 | 43 | 'wikiwyg_editing_here' => 'here' , |
44 | 44 | 'wikiwyg_editing_this' => 'this' |
45 | 45 | ) |
46 | | - ); |
| 46 | + ); |
47 | 47 | |
48 | 48 | /* in-page disabled automatically disables this loading */ |
49 | 49 | if ( wfGetDependingOnSkin () == 0 ) { |
50 | 50 | return true ; |
51 | 51 | } |
52 | 52 | if (! isset($wgWikiwygPath)) { |
53 | | - $wgWikiwygPath = $wgScriptPath . "/extensions/wikiwyg"; |
| 53 | + $wgWikiwygPath = $wgScriptPath . "/extensions/wikiwyg"; |
54 | 54 | } |
55 | 55 | if (! isset($wgWikiwygJsPath)) { |
56 | 56 | $wgWikiwygJsPath = "$wgWikiwygPath/share/MediaWiki"; |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | $nocloud_link = "<a href=\"".$fixed_art_path.$epage->mArticle->mTitle->getPrefixedUrl()."?action=edit&categoryCloud=off\" >".wfMsg ('wikiwyg_editing_this')."</a>" ; |
89 | 89 | } else { |
90 | 90 | $nocloud_link = "<a href=\"".$fixed_art_path.$epage->mArticle->mTitle->getPrefixedUrl()."?action=edit&categoryCloud=on\" >".wfMsg ('wikiwyg_editing_this')."</a>" ; |
91 | | - $subtitle_text .= wfMsg('wikiwyg_use_cloud', $nocloud_link) ; |
| 91 | + $subtitle_text .= wfMsg('wikiwyg_use_cloud', $nocloud_link) ; |
92 | 92 | } |
93 | 93 | |
94 | 94 | $wgOut->addHTML ("<div id=\"wikiwyg_cancel_form\" style=\"display:none;\"> |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $wgOut->addHTML (" |
116 | 116 | <noscript> |
117 | 117 | <style type=\"text/css\"> |
118 | | - #wpTextbox1 { |
| 118 | + #wpTextbox1 { |
119 | 119 | display: block !important ; |
120 | 120 | } |
121 | 121 | #WikiwygEditingLoadingMesg, #wikiwyg_lower_wrapper { |
— | — | @@ -176,7 +176,9 @@ |
177 | 177 | </table> |
178 | 178 | </div> |
179 | 179 | <input type=\"hidden\" name=\"wpCategoryTagCount\", id=\"category_tag_count\" value=\"$num\" /> |
180 | | - ") ; |
| 180 | + ") ; |
181 | 181 | } |
182 | 182 | return true ; |
183 | 183 | } |
| 184 | + |
| 185 | +?> |
Index: trunk/extensions/UserMerge/UserMerge.php |
— | — | @@ -11,11 +11,11 @@ |
12 | 12 | |
13 | 13 | $wgExtensionFunctions[] = 'efUserMerge'; |
14 | 14 | $wgExtensionCredits['specialpage'][] = array( |
15 | | - 'name'=>'User Merge and Delete', |
16 | | - 'url'=>'http://www.mediawiki.org/wiki/Extension:User_Merge_and_Delete', |
17 | | - 'author'=>'Tim Laqua', |
18 | | - 'description'=>"Merges references from one user to another user in the Wiki database - will also delete old users following merge. Requires 'usermerge' privileges", |
19 | | - 'version'=>'1.3', |
| 15 | + 'name'=>'User Merge and Delete', |
| 16 | + 'url'=>'http://www.mediawiki.org/wiki/Extension:User_Merge_and_Delete', |
| 17 | + 'author'=>'Tim Laqua', |
| 18 | + 'description'=>"Merges references from one user to another user in the Wiki database - will also delete old users following merge. Requires 'usermerge' privileges.", |
| 19 | + 'version'=>'1.3' |
20 | 20 | ); |
21 | 21 | |
22 | 22 | $wgAutoloadClasses['UserMerge'] = dirname(__FILE__) . '/UserMerge_body.php'; |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | foreach( $usermergeMessages as $key => $value ) { |
31 | 31 | $wgMessageCache->addMessages( $usermergeMessages[$key], $key ); |
32 | 32 | } |
33 | | - |
| 33 | + |
34 | 34 | # Add a new log type |
35 | 35 | global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions; |
36 | 36 | $wgLogTypes[] = 'usermerge'; |
— | — | @@ -38,3 +38,4 @@ |
39 | 39 | $wgLogActions['usermerge/mergeuser'] = 'usermerge-success-log'; |
40 | 40 | $wgLogActions['usermerge/deleteuser'] = 'usermerge-userdeleted-log'; |
41 | 41 | } |
| 42 | + |
Index: trunk/extensions/PurgeCache/PurgeCache.php |
— | — | @@ -8,21 +8,12 @@ |
9 | 9 | * @author Rob Church <robchur@gmail.com> |
10 | 10 | * @licence Public domain |
11 | 11 | */ |
12 | | - |
| 12 | + |
13 | 13 | if( !defined( 'MEDIAWIKI' ) ) { |
14 | 14 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
15 | 15 | exit( 1 ); |
16 | 16 | } |
17 | 17 | |
18 | | -$wgExtensionCredits['specialpage'][] = array( |
19 | | - 'name' => 'PurgeCache', |
20 | | - 'version' => '1.1', |
21 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:PurgeCache', |
22 | | - 'author' => 'Rob Church', |
23 | | - 'email' => 'robchur@gmail.com', |
24 | | - 'description' => '[[Special:PurgeCache|Special page]] used to wipe the OBJECTCACHE table', |
25 | | -); |
26 | | - |
27 | 18 | if ( !function_exists( 'extAddSpecialPage' ) ) { |
28 | 19 | require( dirname(__FILE__) . '/../ExtensionFunctions.php' ); |
29 | 20 | } |
— | — | @@ -30,3 +21,5 @@ |
31 | 22 | |
32 | 23 | $wgAvailableRights[] = 'purgecache'; |
33 | 24 | $wgGroupPermissions['developer']['purgecache'] = true; |
| 25 | + |
| 26 | + |
Index: trunk/extensions/rss/RSSNews.php |
— | — | @@ -4,13 +4,6 @@ |
5 | 5 | # Adds news from an RSS feed to your wiki |
6 | 6 | # To use, include this file from your LocalSettings.php |
7 | 7 | |
8 | | -$wgExtensionCredits['other'][] = array( |
9 | | - 'name' => 'RSSNews', |
10 | | - 'version' => '1.1', |
11 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:RSSNews', |
12 | | - 'author' => 'Jens Frank', |
13 | | - 'description' => 'Adds news from an RSS feed with the tag <nowiki><rss></nowiki>', |
14 | | -); |
15 | 8 | |
16 | 9 | $wgExtensionFunctions[] = "wfRSSFeedExtension"; |
17 | 10 | |
— | — | @@ -61,3 +54,5 @@ |
62 | 55 | $text .= "</ul></div>\n"; |
63 | 56 | return $text; |
64 | 57 | } |
| 58 | + |
| 59 | + |
Index: trunk/extensions/Vote/Vote.php |
— | — | @@ -8,30 +8,28 @@ |
9 | 9 | * @author Rob Church <robchur@gmail.com> |
10 | 10 | * Please see the LICENCE file for terms of use and redistribution |
11 | 11 | */ |
12 | | - |
| 12 | + |
13 | 13 | if( defined( 'MEDIAWIKI' ) ) { |
14 | 14 | |
15 | 15 | $wgAutoloadClasses['SpecialVote'] = dirname( __FILE__ ) . '/Vote.page.php'; |
16 | 16 | $wgSpecialPages['Vote'] = 'SpecialVote'; |
17 | 17 | $wgExtensionFunctions[] = 'efVote'; |
18 | 18 | $wgExtensionCredits['specialpage'][] = array( |
19 | | - 'name' => 'Vote', |
20 | | - 'version' => '1.1', |
21 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Vote', |
22 | | - 'author' => 'Rob Church', |
23 | | - 'description' => 'Provides simple polling capabilities', |
| 19 | + 'name' => 'Vote', |
| 20 | + 'author' => 'Rob Church', |
| 21 | + 'description' => 'Provides simple polling capabilities', |
24 | 22 | ); |
25 | | - |
| 23 | + |
26 | 24 | /** |
27 | 25 | * Users who can vote |
28 | 26 | */ |
29 | 27 | $wgGroupPermissions['user']['vote'] = true; |
30 | | - |
| 28 | + |
31 | 29 | /** |
32 | 30 | * Users who can view vote results |
33 | 31 | */ |
34 | 32 | $wgGroupPermissions['bureaucrat']['voteadmin'] = true; |
35 | | - |
| 33 | + |
36 | 34 | /** |
37 | 35 | * Extension setup function |
38 | 36 | */ |
— | — | @@ -42,7 +40,7 @@ |
43 | 41 | $wgMessageCache->addMessages( $messages, $lang ); |
44 | 42 | $wgHooks['SkinTemplateSetupPageCss'][] = 'efVoteCss'; |
45 | 43 | } |
46 | | - |
| 44 | + |
47 | 45 | /** |
48 | 46 | * Add extra CSS to the skin |
49 | 47 | */ |
— | — | @@ -59,4 +57,4 @@ |
60 | 58 | } else { |
61 | 59 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
62 | 60 | exit( 1 ) ; |
63 | | -} |
| 61 | +} |
\ No newline at end of file |
Index: trunk/extensions/Watchers/Watchers.php |
— | — | @@ -18,11 +18,9 @@ |
19 | 19 | # Integrating into the MediaWiki environment |
20 | 20 | |
21 | 21 | $wgExtensionCredits['Watchers'][] = array( |
22 | | - 'name' => 'Watchers', |
23 | | - 'version' => '1.1', |
24 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Watchers', |
25 | | - 'description' => 'An extension to show who is watching a page', |
26 | | - 'author' => 'Magnus Manske', |
| 22 | + 'name' => 'Watchers', |
| 23 | + 'description' => 'An extension to show who is watching a page.', |
| 24 | + 'author' => 'Magnus Manske' |
27 | 25 | ); |
28 | 26 | |
29 | 27 | $dir = dirname(__FILE__) . '/'; |
Index: trunk/extensions/Resign/SpecialResign.php |
— | — | @@ -11,10 +11,10 @@ |
12 | 12 | |
13 | 13 | $wgExtensionFunctions[] = 'wfSpecialResign'; |
14 | 14 | $wgExtensionCredits['specialpage'][] = array( |
| 15 | + 'author' => 'Rotem Liss', |
| 16 | + 'version' => '1.1', |
15 | 17 | 'name' => 'Resign', |
16 | | - 'version' => '1.1', |
17 | 18 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Resign', |
18 | | - 'author' => 'Rotem Liss', |
19 | 19 | 'description' => 'Gives users the ability to remove their permissions', |
20 | 20 | ); |
21 | 21 | |
Index: trunk/extensions/UserContactLinks/UserSignature.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'author' => 'Paul Grinberg', |
26 | 26 | 'email' => 'gri6507 at yahoo dot com', |
27 | 27 | 'url' => 'http://www.mediawiki.org/wiki/Extension:User_Contact_Links', |
28 | | - 'description' => 'Provides the ability to simply and consistantly add other user names using ^^^user^^^ syntax', |
| 28 | + 'description' => 'provides the ability to simply and consistantly add other user names using ^^^user^^^ syntax', |
29 | 29 | ); |
30 | 30 | |
31 | 31 | $dir = dirname(__FILE__) . '/'; |
Index: trunk/extensions/Wikidata/SpecialLanguages.php |
— | — | @@ -13,11 +13,8 @@ |
14 | 14 | |
15 | 15 | $wgExtensionFunctions[] = 'wfSpecialManageLanguages'; |
16 | 16 | $wgExtensionCredits['specialpage'][] = array( |
17 | | - 'name' => 'Language manager', |
18 | | - 'version' => '1.1', |
19 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Wikidata', |
20 | | - 'author' => 'Erik Moeller', |
21 | | - 'description' => 'Add languages, runnable by users with the \'addlanguage\' right', |
| 17 | + 'name' => 'Language manager', |
| 18 | + 'author' => 'Erik Moeller', |
22 | 19 | ); |
23 | 20 | |
24 | 21 | # Internationalisation file |
— | — | @@ -36,7 +33,7 @@ |
37 | 34 | function SpecialLanguages() { |
38 | 35 | SpecialPage::SpecialPage( 'Languages' ); |
39 | 36 | } |
40 | | - |
| 37 | + |
41 | 38 | function execute( $par ) { |
42 | 39 | global $wgOut, $wgRequest, $wgTitle, $wgUser; |
43 | 40 | $wgOut->setPageTitle(wfMsg('langman_title')); |
— | — | @@ -58,7 +55,7 @@ |
59 | 56 | } else { |
60 | 57 | $wgOut->addHTML('Adding language '.$langname.' with key '.$langiso6393.'.'); |
61 | 58 | $sql='INSERT INTO language(iso639_2,iso639_3,wikimedia_key) values('.$dbr->addQuotes($langiso6392).','.$dbr->addQuotes($langiso6393).','.$dbr->addQuotes($langwmf).')'; |
62 | | - |
| 59 | + |
63 | 60 | $dbr->query($sql); |
64 | 61 | $id=$dbr->insertId(); |
65 | 62 | $sql='INSERT INTO language_names(language_id,name_language_id,language_name) values ('.$id.',85,'.$dbr->addQuotes($langname).')'; |
— | — | @@ -123,6 +120,6 @@ |
124 | 121 | |
125 | 122 | } |
126 | 123 | } |
127 | | - |
| 124 | + |
128 | 125 | SpecialPage::addPage( new SpecialLanguages ); |
129 | 126 | } |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialConceptMapping.php |
— | — | @@ -13,11 +13,8 @@ |
14 | 14 | |
15 | 15 | $wgExtensionFunctions[] = 'wfSpecialConceptMapping'; |
16 | 16 | $wgExtensionCredits['specialpage'][] = array( |
17 | | - 'name' => 'Concept Mapping', |
18 | | - 'version' => '1.1', |
19 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:OmegaWiki', |
20 | | - 'description' => 'Create concept-mappings. Also provides a web-api', |
21 | | - 'author' => 'Kim Bruning', |
| 17 | + 'name' => 'foo', |
| 18 | + 'author' => 'Kim Bruning', |
22 | 19 | ); |
23 | 20 | |
24 | 21 | function wfSpecialConceptMapping() { |
— | — | @@ -26,7 +23,7 @@ |
27 | 24 | |
28 | 25 | global $wgMessageCache; |
29 | 26 | $wgMessageCache->addMessages(array('conceptmapping'=>'Wikidata: Concept mapping'),'en'); |
30 | | - |
| 27 | + |
31 | 28 | require_once("Wikidata.php"); |
32 | 29 | require_once("WikiDataAPI.php"); |
33 | 30 | require_once("Utilities.php"); |
— | — | @@ -59,7 +56,7 @@ |
60 | 57 | } elseif ($action=="get_associated"){ |
61 | 58 | $this->get_associated(); |
62 | 59 | } else { |
63 | | - $wgOut->addWikiText(wfMsgSc("conceptmapping_no_action_specified",$action)); |
| 60 | + $wgOut->addWikiText(wfMsgSc("conceptmapping_no_action_specified",$action)); |
64 | 61 | $wgOut->addWikiText(wfMsgSc("conceptmapping_help")); |
65 | 62 | } |
66 | 63 | } |
— | — | @@ -68,7 +65,7 @@ |
69 | 66 | |
70 | 67 | global $wgOut, $wgRequest, $wgUser; |
71 | 68 | $lang=$wgUser->getOption("language"); |
72 | | - require_once("forms.php"); |
| 69 | + require_once("forms.php"); |
73 | 70 | $wgOut->addHTML(wfMsgSc("conceptmapping_uitext")); |
74 | 71 | $sets=wdGetDataSets(); |
75 | 72 | $options = array(); |
— | — | @@ -121,9 +118,9 @@ |
122 | 119 | } |
123 | 120 | } |
124 | 121 | } |
125 | | - $wgOut->addHTML("<br>\n"); |
| 122 | + $wgOut->addHTML("<br>\n"); |
126 | 123 | } |
127 | | - if (sizeOf($mappings)>1) { |
| 124 | + if (sizeOf($mappings)>1) { |
128 | 125 | createConceptMapping($mappings); |
129 | 126 | $wgOut->addHTML(wfMsgSc("mapping_successful")); |
130 | 127 | } else { |
— | — | @@ -140,17 +137,17 @@ |
141 | 138 | return $html; |
142 | 139 | } |
143 | 140 | |
144 | | - |
| 141 | + |
145 | 142 | protected function help() { |
146 | 143 | global $wgOut; |
147 | 144 | $wgOut->addWikiText("<h2>Help</h2>"); |
148 | 145 | $wgOut->addWikiText(wfMsgSc("conceptmapping_help")); |
149 | 146 | } |
150 | | - |
| 147 | + |
151 | 148 | protected function insert() { |
152 | | - global |
| 149 | + global |
153 | 150 | $wgRequest, $wgOut; |
154 | | - |
| 151 | + |
155 | 152 | # $wgRequest->getText( 'page' ); |
156 | 153 | $sets=wdGetDataSets(); |
157 | 154 | #$requests=$wgRequest->getValues(); |
— | — | @@ -163,7 +160,7 @@ |
164 | 161 | |
165 | 162 | $dm_id_ui=$dm_id; # Only for teh purdy |
166 | 163 | if ($dm_id_ui==null) |
167 | | - $dm_id_ui="unset"; |
| 164 | + $dm_id_ui="unset"; |
168 | 165 | $wgOut->addWikiText("$name ->$dm_id_ui"); |
169 | 166 | $map[$dc]=$dm_id; |
170 | 167 | #$dbr=&wfGetDB(DB_MASTER); |
— | — | @@ -172,7 +169,7 @@ |
173 | 170 | } |
174 | 171 | |
175 | 172 | protected function get() { |
176 | | - global |
| 173 | + global |
177 | 174 | $wgOut, $wgRequest; |
178 | 175 | $concept_id=$wgRequest->getText("concept"); |
179 | 176 | $wgOut->addWikiText("<h2>".wfMsgSc("contents_of_mapping")."</h2>"); |
— | — | @@ -207,5 +204,6 @@ |
208 | 205 | } |
209 | 206 | |
210 | 207 | SpecialPage::addPage( new SpecialConceptMapping ); |
211 | | - |
| 208 | + |
212 | 209 | } |
| 210 | + |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialCopy.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | /** |
5 | 5 | * A Special Page extension to copy defined meanings between datasets. |
6 | | - * |
| 6 | + * |
7 | 7 | * Copied over from SpecialConceptMapping. |
8 | 8 | * User Interface temporarily retained (but currently flawed) |
9 | 9 | * Web API will be implemented |
— | — | @@ -18,11 +18,8 @@ |
19 | 19 | |
20 | 20 | $wgExtensionFunctions[] = 'wfSpecialCopy'; |
21 | 21 | $wgExtensionCredits['specialpage'][] = array( |
22 | | - 'name' => 'SpecialCopy', |
23 | | - 'version' => '1.1', |
24 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:OmegaWiki', |
25 | | - 'description' => 'Copy defined meanings between datasets', |
26 | | - 'author' => 'Alan Smithee', |
| 22 | + 'name' => 'SpecialCopy', |
| 23 | + 'author' => 'Alan Smithee', |
27 | 24 | ); |
28 | 25 | |
29 | 26 | function wfSpecialCopy() { |
— | — | @@ -31,7 +28,7 @@ |
32 | 29 | |
33 | 30 | global $wgMessageCache; |
34 | 31 | $wgMessageCache->addMessages(array('Copy'=>'Wikidata: Copy'),'en'); |
35 | | - |
| 32 | + |
36 | 33 | require_once("Wikidata.php"); |
37 | 34 | require_once("WikiDataAPI.php"); |
38 | 35 | require_once("Utilities.php"); |
— | — | @@ -62,7 +59,7 @@ |
63 | 60 | } elseif ($action=="help"){ |
64 | 61 | $this->help(); |
65 | 62 | } else { |
66 | | - $wgOut->addWikiText(wfMsgSc("no_action_specified",$action)); |
| 63 | + $wgOut->addWikiText(wfMsgSc("no_action_specified",$action)); |
67 | 64 | $wgOut->addWikiText(wfMsgSc("copy_help")); |
68 | 65 | } |
69 | 66 | } |
— | — | @@ -75,7 +72,7 @@ |
76 | 73 | |
77 | 74 | } |
78 | 75 | |
79 | | - /** display a helpful help message. |
| 76 | + /** display a helpful help message. |
80 | 77 | * (if desired) |
81 | 78 | */ |
82 | 79 | protected function help() { |
— | — | @@ -83,17 +80,17 @@ |
84 | 81 | $wgOut->addWikiText("<h2>Help</h2>"); |
85 | 82 | $wgOut->addWikiText(wfMsgSc("copy_help")); |
86 | 83 | } |
87 | | - |
| 84 | + |
88 | 85 | /**read in and partially validate parameters, |
89 | 86 | * then call _doCopy() |
90 | 87 | */ |
91 | 88 | protected function copy_by_param() { |
92 | | - global |
| 89 | + global |
93 | 90 | $wgRequest, $wgOut; |
94 | | - |
| 91 | + |
95 | 92 | $dmid_dirty=$wgRequest->getText("dmid"); |
96 | 93 | $dc1_dirty=$wgRequest->getText("dc1"); |
97 | | - $dc2_dirty=$wgRequest->getText("dc2"); |
| 94 | + $dc2_dirty=$wgRequest->getText("dc2"); |
98 | 95 | |
99 | 96 | $abort=false; # check all input before aborting |
100 | 97 | |
— | — | @@ -125,12 +122,12 @@ |
126 | 123 | * make sure you haven't used $wgOut before calling this! |
127 | 124 | */ |
128 | 125 | protected function autoredir() { |
129 | | - global |
| 126 | + global |
130 | 127 | $wgTitle, $wgOut, $wgRequest; |
131 | 128 | |
132 | | - $dmid_dirty=$wgRequest->getText("dmid"); |
133 | | - $dc1_dirty=$wgRequest->getText("dc1"); |
134 | | - $dc2_dirty=$wgRequest->getText("dc2"); |
| 129 | + $dmid_dirty=$wgRequest->getText("dmid"); |
| 130 | + $dc1_dirty=$wgRequest->getText("dc1"); |
| 131 | + $dc2_dirty=$wgRequest->getText("dc2"); |
135 | 132 | |
136 | 133 | # Where should we redirect to? |
137 | 134 | $meanings=getDefinedMeaningDataAssociatedByConcept($dmid_dirty, $dc1_dirty); |
— | — | @@ -148,9 +145,9 @@ |
149 | 146 | /* Using Copy.php; perform a copy of a defined meaning from one dataset to another, |
150 | 147 | provided the user has permission to do so,*/ |
151 | 148 | protected function _doCopy($dmid_dirty, $dc1_dirty, $dc2_dirty) { |
152 | | - global |
| 149 | + global |
153 | 150 | $wgCommunityEditPermission, $wgOut, $wgUser, $wgCommunity_dc; |
154 | | - |
| 151 | + |
155 | 152 | # escape parameters |
156 | 153 | $dmid=mysql_real_escape_string($dmid_dirty); |
157 | 154 | $dc1=mysql_real_escape_string($dc1_dirty); |
— | — | @@ -165,9 +162,9 @@ |
166 | 163 | # copy |
167 | 164 | CopyTools::newCopyTransaction($dc1, $dc2); |
168 | 165 | $dmc=new DefinedMeaningCopier($dmid, $dc1, $dc2); |
169 | | - $dmc->dup(); |
| 166 | + $dmc->dup(); |
170 | 167 | |
171 | | - # For purposes of current "edit copy", |
| 168 | + # For purposes of current "edit copy", |
172 | 169 | # having the dm be already_there() is ok. |
173 | 170 | # (hence commented out) |
174 | 171 | #if ($dmc->already_there() ) { |
— | — | @@ -176,8 +173,10 @@ |
177 | 174 | #} |
178 | 175 | |
179 | 176 | return true; # seems everything went ok. |
180 | | - |
| 177 | + |
181 | 178 | } |
182 | 179 | } |
183 | 180 | SpecialPage::addPage( new SpecialCopy ); |
| 181 | + |
184 | 182 | } |
| 183 | + |
Index: trunk/extensions/Wikidata/AddPrefs.php |
— | — | @@ -1,20 +1,20 @@ |
2 | 2 | <?php |
3 | | - |
| 3 | + |
4 | 4 | /** |
5 | 5 | * This allows other extensions to add their own preferences to the default preferences display |
6 | 6 | * |
7 | 7 | * Author: Austin Che <http://openwetware.org/wiki/User:Austin> |
8 | 8 | */ |
9 | | - |
| 9 | + |
10 | 10 | $wgExtensionCredits['specialpage'][] = array( |
11 | | - 'name' => 'PreferencesExtension', |
12 | | - 'version' => '2006/11/16', |
13 | | - 'author' => 'Austin Che', |
14 | | - 'url' => 'http://openwetware.org/wiki/User:Austin_J._Che/Extensions/PreferencesExtension', |
15 | | - 'description' => 'Enables extending user preferences', |
| 11 | + 'name' => 'PreferencesExtension', |
| 12 | + 'version' => '2006/11/16', |
| 13 | + 'author' => 'Austin Che', |
| 14 | + 'url' => 'http://openwetware.org/wiki/User:Austin/Extensions/PreferencesExtension', |
| 15 | + 'description' => 'Enables extending user preferences', |
16 | 16 | ); |
17 | 17 | $wgHooks['SpecialPage_initList'][] = 'wfOverridePreferences'; |
18 | | - |
| 18 | + |
19 | 19 | // constants for pref types |
20 | 20 | define('PREF_USER_T', 1); |
21 | 21 | define('PREF_TOGGLE_T', 2); |
— | — | @@ -22,23 +22,23 @@ |
23 | 23 | define('PREF_PASSWORD_T', 4); |
24 | 24 | define('PREF_INT_T', 5); |
25 | 25 | define('PREF_OPTIONS_T', 6); |
26 | | - |
| 26 | + |
27 | 27 | // each element of the following should be an array that can have keys: |
28 | 28 | // name, section, type, size, validate, load, save, html, min, max, default |
29 | 29 | if (!isset($wgExtensionPreferences)) |
30 | 30 | $wgExtensionPreferences = array(); |
31 | | - |
| 31 | + |
32 | 32 | function wfOverridePreferences(&$list) |
33 | 33 | { |
34 | 34 | // we 'override' the default preferences special page with our own |
35 | 35 | $list["Preferences"] = array("SpecialPage", "Preferences", "", true, "wfSpecialPreferencesExtension"); |
36 | 36 | return true; |
37 | 37 | } |
38 | | - |
| 38 | + |
39 | 39 | function wfSpecialPreferencesExtension() |
40 | 40 | { |
41 | 41 | require_once('SpecialPreferences.php'); |
42 | | - |
| 42 | + |
43 | 43 | // override the default preferences form |
44 | 44 | class SpecialPreferencesExtension extends PreferencesForm |
45 | 45 | { |
— | — | @@ -48,19 +48,19 @@ |
49 | 49 | // finally parent's execute function doesn't need overriding |
50 | 50 | // this leaves only two functions to override |
51 | 51 | // one for displaying the form and one for saving the values |
52 | | - |
53 | | - function savePreferences() |
| 52 | + |
| 53 | + function savePreferences() |
54 | 54 | { |
55 | 55 | // handle extension prefs first |
56 | 56 | global $wgUser, $wgRequest; |
57 | 57 | global $wgExtensionPreferences; |
58 | | - |
| 58 | + |
59 | 59 | foreach ($wgExtensionPreferences as $pref) |
60 | 60 | { |
61 | 61 | $name = isset($pref['name']) ? $pref['name'] : ""; |
62 | 62 | if (! $name) |
63 | 63 | continue; |
64 | | - |
| 64 | + |
65 | 65 | $value = $wgRequest->getVal($name); |
66 | 66 | $type = isset($pref['type']) ? $pref['type'] : PREF_USER_T; |
67 | 67 | switch ($type) |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | else |
73 | 73 | $wgUser->setOption($name, $wgRequest->getCheck("wpOp{$name}")); |
74 | 74 | break; |
75 | | - |
| 75 | + |
76 | 76 | case PREF_INT_T: |
77 | 77 | $min = isset($pref['min']) ? $pref['min'] : 0; |
78 | 78 | $max = isset($pref['max']) ? $pref['max'] : 0x7fffffff; |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | else |
82 | 82 | $wgUser->setOption($name, $this->validateIntOrNull($value, $min, $max)); |
83 | 83 | break; |
84 | | - |
| 84 | + |
85 | 85 | case PREF_PASSWORD_T: |
86 | 86 | case PREF_TEXT_T: |
87 | 87 | case PREF_USER_T: |
— | — | @@ -94,28 +94,28 @@ |
95 | 95 | break; |
96 | 96 | } |
97 | 97 | } |
98 | | - |
| 98 | + |
99 | 99 | // call parent's function which saves the normal prefs and writes to the db |
100 | 100 | parent::savePreferences(); |
101 | 101 | } |
102 | | - |
| 102 | + |
103 | 103 | function mainPrefsForm( $status , $message = '' ) |
104 | 104 | { |
105 | 105 | global $wgOut, $wgRequest, $wgUser; |
106 | 106 | global $wgExtensionPreferences; |
107 | | - |
| 107 | + |
108 | 108 | // first get original form, then hack into it new options |
109 | 109 | parent::mainPrefsForm($status, $message); |
110 | 110 | $html = $wgOut->getHTML(); |
111 | 111 | $wgOut->clearHTML(); |
112 | | - |
| 112 | + |
113 | 113 | $sections = array(); |
114 | 114 | foreach ($wgExtensionPreferences as $pref) |
115 | 115 | { |
116 | 116 | if (! isset($pref['section']) || ! $pref['section']) |
117 | 117 | continue; |
118 | 118 | $section = $pref['section']; |
119 | | - |
| 119 | + |
120 | 120 | $name = isset($pref['name']) ? $pref['name'] : ""; |
121 | 121 | $value = ""; |
122 | 122 | if ($name) |
— | — | @@ -127,33 +127,33 @@ |
128 | 128 | } |
129 | 129 | if ($value === '' && isset($pref['default'])) |
130 | 130 | $value = $pref['default']; |
131 | | - |
| 131 | + |
132 | 132 | $sectext = htmlspecialchars(wfMsg($section)); |
133 | | - $regex = "/(<fieldset>\s*<legend>\s*" . preg_quote($sectext) . |
| 133 | + $regex = "/(<fieldset>\s*<legend>\s*" . preg_quote($sectext) . |
134 | 134 | "\s*<\/legend>.*?)(<\/fieldset>)/s"; |
135 | | - |
| 135 | + |
136 | 136 | // check if $section exists in prefs yet |
137 | 137 | // cache the existence of sections |
138 | 138 | if (!isset($sections[$section])) |
139 | 139 | { |
140 | 140 | $sections[$section] = true; |
141 | | - |
| 141 | + |
142 | 142 | if (! preg_match($regex, $html, $m)) |
143 | 143 | { |
144 | 144 | // doesn't exist so add an empty section to end |
145 | 145 | $addhtml = "<fieldset><legend>$sectext</legend></fieldset>"; |
146 | 146 | $html = preg_replace("/(<div id='prefsubmit'.*)/s", "$addhtml $1", $html); |
147 | 147 | } |
148 | | - |
| 148 | + |
149 | 149 | } |
150 | | - |
| 150 | + |
151 | 151 | $type = isset($pref['type']) ? $pref['type'] : PREF_USER_T; |
152 | 152 | switch ($type) |
153 | 153 | { |
154 | 154 | case PREF_TOGGLE_T: |
155 | 155 | $addhtml = $this->getToggle($name); |
156 | 156 | break; |
157 | | - |
| 157 | + |
158 | 158 | case PREF_INT_T: |
159 | 159 | case PREF_TEXT_T: |
160 | 160 | case PREF_PASSWORD_T: |
— | — | @@ -163,10 +163,10 @@ |
164 | 164 | $type = "password"; |
165 | 165 | else |
166 | 166 | $type = "text"; |
167 | | - $addhtml = "<table>" . |
| 167 | + $addhtml = "<table>" . |
168 | 168 | $this->addRow("<label for=\"{$name}\">$caption</label>", |
169 | 169 | "<input type=\"$type\" name=\"{$name}\" value=\"{$value}\" $size />") . "</table>" ; |
170 | | - break; |
| 170 | + break; |
171 | 171 | case PREF_OPTIONS_T: |
172 | 172 | $caption = isset($pref['caption']) && $pref['caption'] ? $pref['caption'] : wfMsg($name); |
173 | 173 | $addhtml="$caption <select name=\"$name\" id=\"$name\">"; |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | $sel=''; |
179 | 179 | if(!$defaultSet && !$option) $sel="SELECTED"; |
180 | 180 | if($defaultSet && $optval==$option) $sel="SELECTED"; |
181 | | - $addhtml.="<option value=\"$option\" $sel>$optionlabel</option>"; |
| 181 | + $addhtml.="<option value=\"$option\" $sel>$optionlabel</option>"; |
182 | 182 | } |
183 | 183 | } |
184 | 184 | $addhtml.="</select>"; |
— | — | @@ -187,18 +187,18 @@ |
188 | 188 | $addhtml = preg_replace("/@VALUE@/", $value, isset($pref['html']) ? $pref['html'] : ""); |
189 | 189 | break; |
190 | 190 | } |
191 | | - |
| 191 | + |
192 | 192 | // the section exists |
193 | 193 | $html = preg_replace($regex, "$1 $addhtml $2", $html); |
194 | 194 | } |
195 | | - |
| 195 | + |
196 | 196 | $wgOut->addHTML($html); |
197 | | - |
| 197 | + |
198 | 198 | // debugging |
199 | 199 | //$wgOut->addHTML($wgUser->encodeOptions()); |
200 | 200 | } |
201 | 201 | } |
202 | | - |
| 202 | + |
203 | 203 | global $wgRequest; |
204 | 204 | $prefs = new SpecialPreferencesExtension($wgRequest); |
205 | 205 | $prefs->execute(); |
Index: trunk/extensions/timeline/Timeline.php |
— | — | @@ -14,7 +14,6 @@ |
15 | 15 | $wgExtensionFunctions[] = "wfTimelineExtension"; |
16 | 16 | $wgExtensionCredits['parserhook'][] = array( |
17 | 17 | 'name' => 'EasyTimeline', |
18 | | - 'version' => '1.1', |
19 | 18 | 'author' => 'Erik Zachte', |
20 | 19 | 'url' => 'http://meta.wikimedia.org/wiki/EasyTimeline', |
21 | 20 | 'description' => 'Timeline extension', |
Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php |
— | — | @@ -6,9 +6,9 @@ |
7 | 7 | $wgExtensionCredits['other'][] = array( |
8 | 8 | 'name' => 'Title Blacklist', |
9 | 9 | 'version' => '1.1', |
10 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:TitleBlacklist', |
| 10 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:TitleBlacklist', |
11 | 11 | 'author' => 'VasilievVV', |
12 | | - 'description' => 'Allows to forbide creation of pages with specified titles', |
| 12 | + 'description' => 'Allows to forbide creation of pages with specified titles' |
13 | 13 | ); |
14 | 14 | |
15 | 15 | $wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php'; |
Index: trunk/extensions/wikiforum/wikiforum.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | */ |
27 | 27 | if(defined('MEDIAWIKI')) { |
28 | 28 | // Defines and options |
29 | | -define('FORUM_PATH', 'extensions/wikiforum/' ); // extention path |
| 29 | +define('FORUM_PATH', 'extensions/wikiforum/' ); // extention path |
30 | 30 | define('FORUM_VERSION', '1.0.7.0'); |
31 | 31 | define('FORUM_MAX_THREAD', 50); // total number of last thread displayed on the forum page |
32 | 32 | define('FORUM_INCLUDED_NUM', 20); // number of thread directly included into the forum page |
— | — | @@ -42,14 +42,6 @@ |
43 | 43 | define('FORUM_SHOW_VIEW_COUNT', false ); // if true, the thread total view number is display into the table |
44 | 44 | define('FORUM_LASTEST_ON_TOP', false); // change the threads sort order on the main page. |
45 | 45 | |
46 | | -$wgExtensionCredits['other'][] = array( |
47 | | - 'name' => 'Wiki forum', |
48 | | - 'version' => '1.1', |
49 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Wiki_forum', |
50 | | - 'author' => 'Guillaume Blanchard', |
51 | | - 'description' => 'Wiki forum', |
52 | | -); |
53 | | - |
54 | 46 | // Extension start function |
55 | 47 | $wgExtensionFunctions[] = 'wfForum'; |
56 | 48 | |
— | — | @@ -97,7 +89,7 @@ |
98 | 90 | * @addtogroup Extensions |
99 | 91 | */ |
100 | 92 | class NewThread { |
101 | | - |
| 93 | + |
102 | 94 | /** show the form where a user can create a new thread */ |
103 | 95 | function showForm() { |
104 | 96 | global $wgOut, $wgUser, $wgRequest; |
— | — | @@ -109,10 +101,10 @@ |
110 | 102 | 'media' => 'screen,projection', |
111 | 103 | 'href' => FORUM_CSS |
112 | 104 | )); |
113 | | - |
| 105 | + |
114 | 106 | $titleObj = Title::makeTitle( NS_SPECIAL, 'Newthread' ); |
115 | 107 | $action = $titleObj->escapeLocalURL( 'action=submit' ); |
116 | | - |
| 108 | + |
117 | 109 | $title = htmlspecialchars( $wgRequest->getVal('threadTitle', '') ); |
118 | 110 | $desc = htmlspecialchars( $wgRequest->getVal('threadDescription', '') ); |
119 | 111 | |
— | — | @@ -129,7 +121,7 @@ |
130 | 122 | /** Check and save the thread in the database */ |
131 | 123 | function doSubmit() { |
132 | 124 | global $wgOut, $wgRequest, $wgParser, $wgUser, $wgContLang; |
133 | | - |
| 125 | + |
134 | 126 | $tt = $wgContLang->ucfirst(trim($wgRequest->getVal('threadTitle', ''))); |
135 | 127 | $title = Title::makeTitleSafe( NS_THREAD, $tt ); |
136 | 128 | |
— | — | @@ -200,16 +192,16 @@ |
201 | 193 | function SetSummaryMaxLength($sum=FORUM_SUM_LENGHT) { |
202 | 194 | $this->mSumLength = $sum; |
203 | 195 | } |
204 | | - |
| 196 | + |
205 | 197 | function SetForumLastestOnTop($lastest=FORUM_LASTEST_ON_TOP) { |
206 | 198 | $this->mSortOrder = $lastest ? true : false; |
207 | 199 | } |
208 | 200 | |
209 | 201 | function Generate() { |
210 | 202 | global $wgLang, $wgServer, $wgOut, $wgUserHtml, $wgRequest, $wgScriptPath; |
211 | | - |
| 203 | + |
212 | 204 | list( $limit, $offset ) = wfCheckLimits( $this->mMaxThread, 'wikiforumlimit'); |
213 | | - |
| 205 | + |
214 | 206 | $fname = 'Forum::generate'; |
215 | 207 | |
216 | 208 | if(FORUM_ALLOW_NAMESPACE) |
— | — | @@ -237,12 +229,12 @@ |
238 | 230 | "</script>\n"); |
239 | 231 | } |
240 | 232 | $wgOut->addHTML("<!-- This page was generated by WikiForum v".FORUM_VERSION." -->\n"); |
241 | | - |
| 233 | + |
242 | 234 | // Get last X modified thread |
243 | 235 | wfDebug("FORUM - START GENERATE\n"); |
244 | 236 | $dbr =& wfGetDB( DB_SLAVE ); |
245 | 237 | $cur = $dbr->tableName( 'cur' ); |
246 | | - |
| 238 | + |
247 | 239 | // FIXME : does not work with 1.5 |
248 | 240 | $sql = "SELECT cur_title, cur_comment, cur_user_text, cur_timestamp, cur_counter FROM $cur". |
249 | 241 | " WHERE cur_namespace = $ns". |
— | — | @@ -250,23 +242,23 @@ |
251 | 243 | ' ORDER BY cur_timestamp DESC'; |
252 | 244 | $res = $dbr->query( $sql . $dbr->limitResult( $limit,$offset ), $fname ); |
253 | 245 | $num = $dbr->numRows( $res ); |
254 | | - |
| 246 | + |
255 | 247 | // Generate forum's text |
256 | 248 | $text = ''; |
257 | 249 | $text .= "__NOEDITSECTION____NOTOC__\n"; |
258 | | - |
| 250 | + |
259 | 251 | if(FORUM_INCLUDE_HEADER) { |
260 | 252 | $title = Title::makeTitleSafe( NS_MEDIAWIKI, 'Forum' ); |
261 | 253 | if($title->getArticleID() != 0) // article exist |
262 | 254 | $text .= "<div class=\"wf forum_header\">{{".$wgLang->getNsText(NS_MEDIAWIKI).":Forum}}</div>\n"; |
263 | 255 | } |
264 | | - |
| 256 | + |
265 | 257 | // Link to create a thread only if current namespace is NS_THREAD |
266 | 258 | if($ns == NS_THREAD) |
267 | 259 | $text .= "<div class=\"wf create_thread\" id=\"top\">[[Special:Newthread|".WF_Msg('ThreadCreate')."]]</div>\n\n"; |
268 | 260 | |
269 | 261 | $text .= "> [{{SERVER}}{{localurl:Special:Allpages|from=&namespace=$ns}} ".WF_Msg('ThreadAll')."]\n\n"; |
270 | | - |
| 262 | + |
271 | 263 | $tab = array(); |
272 | 264 | $cnt = 0; |
273 | 265 | |
— | — | @@ -291,7 +283,7 @@ |
292 | 284 | $this->mMaxFullText = $num; |
293 | 285 | |
294 | 286 | $summary = $num - $this->mMaxFullText; |
295 | | - |
| 287 | + |
296 | 288 | $wgOut->addWikiText( $text ); |
297 | 289 | $text = ''; |
298 | 290 | |
— | — | @@ -311,14 +303,14 @@ |
312 | 304 | "<th>".WF_Msg('ThreadComment')."</th>\n". |
313 | 305 | "<th>".WF_Msg('ThreadTime')."</th>\n". |
314 | 306 | "</tr>\n" ); |
315 | | - |
| 307 | + |
316 | 308 | $col = 6; |
317 | 309 | if(FORUM_SHOW_VIEW_COUNT) |
318 | 310 | $col--; |
319 | 311 | |
320 | 312 | for( $cnt=0; $cnt<$num; $cnt++ ) { |
321 | 313 | $t = $wgLang->getNsText( $ns ); |
322 | | - if ( $t != '' ) |
| 314 | + if ( $t != '' ) |
323 | 315 | $t .= ':' ; |
324 | 316 | $t .= $tab[$cnt]->title; |
325 | 317 | |
— | — | @@ -336,13 +328,13 @@ |
337 | 329 | "<th>".WF_Msg('ThreadTime')."</th>\n". |
338 | 330 | "</tr>\n" ); |
339 | 331 | } |
340 | | - |
| 332 | + |
341 | 333 | if($cnt < $summary) { |
342 | 334 | if($cnt & 1) |
343 | 335 | $wgOut->addHTML( "<tr class=\"wf thread_row thread_list odd\">\n" ); |
344 | 336 | else |
345 | 337 | $wgOut->addHTML( "<tr class=\"wf thread_row thread_list peer\">\n" ); |
346 | | - |
| 338 | + |
347 | 339 | $wgOut->addHTML( "<td> </td><td>" ); |
348 | 340 | $wgOut->addWikiText( "[[$t|". $title->getText() ."]]", false ); |
349 | 341 | $wgOut->addHTML( "</td>\n" ); |
— | — | @@ -377,7 +369,7 @@ |
378 | 370 | "<td>". htmlspecialchars($tab[$cnt]->comment) . "</td>\n". |
379 | 371 | "<td>". $wgLang->timeanddate($tab[$cnt]->timestamp) ."</td>\n". |
380 | 372 | "</tr>\n" ); |
381 | | - |
| 373 | + |
382 | 374 | if($cnt & 1) |
383 | 375 | $wgOut->addHTML( "<tr class=\"wf thread_row thread_body odd\">\n" ); |
384 | 376 | else |
— | — | @@ -412,7 +404,7 @@ |
413 | 405 | |
414 | 406 | for( $cnt=0; $cnt<$max; $cnt++ ) { |
415 | 407 | $t = $wgLang->getNsText( $ns ); |
416 | | - if ( $t != '' ) |
| 408 | + if ( $t != '' ) |
417 | 409 | $t .= ':' ; |
418 | 410 | $t .= $tab[$cnt]->title; |
419 | 411 | |
— | — | @@ -423,7 +415,7 @@ |
424 | 416 | $text .= "|- class=\"wf thread_row\" id=\"thread_rowodd\"\n"; |
425 | 417 | else |
426 | 418 | $text .= "|- class=\"wf thread_row\" id=\"thread_rowpeer\"\n"; |
427 | | - |
| 419 | + |
428 | 420 | $text .= "| [[$t|". $title->getText() ."]] ". |
429 | 421 | "|| ". $tab[$cnt]->count." ". |
430 | 422 | "|| [[". $wgLang->getNsText( NS_USER ) .":". $tab[$cnt]->user ."|" .$tab[$cnt]->user. "]] ". |
— | — | @@ -434,7 +426,7 @@ |
435 | 427 | $text .= "|- class=\"wf thread_row\" id=\"threadincodd\"\n"; |
436 | 428 | else |
437 | 429 | $text .= "|- class=\"wf thread_row\" id=\"threadincpeer\"\n"; |
438 | | - |
| 430 | + |
439 | 431 | $text .= "| [[#".$title->getText()."|".$title->getText()."]] ". |
440 | 432 | "|| ". $tab[$cnt]->count." ". |
441 | 433 | "|| [[". $wgLang->getNsText( NS_USER ) .":". $tab[$cnt]->user ."|" .$tab[$cnt]->user. "]] ". |
— | — | @@ -442,7 +434,7 @@ |
443 | 435 | "|| ". $wgLang->timeanddate($tab[$cnt]->timestamp) ."\n"; |
444 | 436 | } |
445 | 437 | } |
446 | | - |
| 438 | + |
447 | 439 | $text .= "|}\n\n"; |
448 | 440 | } |
449 | 441 | |
— | — | @@ -458,7 +450,7 @@ |
459 | 451 | |
460 | 452 | for( $cnt=$summary; $cnt<$num; $cnt++ ) { |
461 | 453 | $t = $wgLang->getNsText( $ns ); |
462 | | - if ( $t != '' ) |
| 454 | + if ( $t != '' ) |
463 | 455 | $t .= ':' ; |
464 | 456 | $t .= $tab[$cnt]->title; |
465 | 457 | |
— | — | @@ -468,20 +460,20 @@ |
469 | 461 | $text .= "|- class=\"wf thread_row\" id=\"threadincodd\"\n"; |
470 | 462 | else |
471 | 463 | $text .= "|- class=\"wf thread_row\" id=\"threadincpeer\"\n"; |
472 | | - |
| 464 | + |
473 | 465 | $text .= "| [[#".$title->getText()."|".$title->getText()."]] ". |
474 | 466 | "|| ". $tab[$cnt]->count." ". |
475 | 467 | "|| [[". $wgLang->getNsText( NS_USER ) .":". $tab[$cnt]->user ."|" .$tab[$cnt]->user. "]] ". |
476 | 468 | "|| ". $tab[$cnt]->comment . " " . |
477 | 469 | "|| ". $wgLang->timeanddate($tab[$cnt]->timestamp) ."\n"; |
478 | 470 | } |
479 | | - |
| 471 | + |
480 | 472 | $text .= "|}\n\n"; |
481 | 473 | } |
482 | 474 | |
483 | 475 | for( $cnt=$summary; $cnt<$num; $cnt++ ) { |
484 | 476 | $t = $wgLang->getNsText( $ns ); |
485 | | - if ( $t != '' ) |
| 477 | + if ( $t != '' ) |
486 | 478 | $t .= ':' ; |
487 | 479 | $t .= $tab[$cnt]->title; |
488 | 480 | |
— | — | @@ -522,7 +514,7 @@ |
523 | 515 | |
524 | 516 | |
525 | 517 | class SpecialForum extends SpecialPage { |
526 | | - function SpecialForum() |
| 518 | + function SpecialForum() |
527 | 519 | { |
528 | 520 | SpecialPage::SpecialPage('Forum'); |
529 | 521 | SpecialPage::setListed(true); |
— | — | @@ -547,9 +539,9 @@ |
548 | 540 | global $wgRequest, $action; |
549 | 541 | |
550 | 542 | $nt = new NewThread(); |
551 | | - if ( $action == 'submit' && $wgRequest->wasPosted() ) |
| 543 | + if ( $action == 'submit' && $wgRequest->wasPosted() ) |
552 | 544 | $nt->doSubmit(); |
553 | | - else |
| 545 | + else |
554 | 546 | $nt->showForm(); |
555 | 547 | } |
556 | 548 | } |
— | — | @@ -566,3 +558,5 @@ |
567 | 559 | |
568 | 560 | |
569 | 561 | } // end if(defined('MEDIAWIKI')) |
| 562 | + |
| 563 | + |
Index: trunk/extensions/wikihiero/wikihiero.php |
— | — | @@ -27,10 +27,9 @@ |
28 | 28 | // Register MediaWiki extension |
29 | 29 | $wgExtensionFunctions[] = 'WH_Register'; |
30 | 30 | $wgExtensionCredits['parserhook'][] = array( |
31 | | - 'name' => 'WikiHiero', |
32 | | - 'version' => '1.1', |
33 | | - 'author' => 'Guillaume Blanchard', |
34 | | - 'url' => 'http://meta.wikimedia.org/wiki/WikiHiero', |
| 31 | + 'name' => 'WikiHiero', |
| 32 | + 'author' => 'Guillaume Blanchard', |
| 33 | + 'url' => 'http://meta.wikimedia.org/wiki/WikiHiero', |
35 | 34 | 'description' => 'Syntax to display hieroglyph', |
36 | 35 | ); |
37 | 36 | |
— | — | @@ -62,3 +61,4 @@ |
63 | 62 | |
64 | 63 | // If anyone needs WikiHieroHTML() etc., loader functions should be put here. |
65 | 64 | // Hopefully everyone's using the general-purpose entry point above. |
| 65 | + |
Index: trunk/extensions/UserRightsNotif/UserRightsNotif.php |
— | — | @@ -15,7 +15,6 @@ |
16 | 16 | $wgExtensionFunctions[] = 'efUserRightsNotifierSetup'; |
17 | 17 | $wgExtensionCredits['other'][] = array( |
18 | 18 | 'name' => 'User Rights Email Notification', |
19 | | - 'version' => '1.1', |
20 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:User_Rights_Email_Notification', |
21 | 20 | 'author' => 'Rob Church', |
22 | 21 | 'description' => 'Sends email notification to users upon rights changes', |
Index: trunk/extensions/Userip/Userip.php |
— | — | @@ -12,15 +12,9 @@ |
13 | 13 | if (!defined('MEDIAWIKI')) |
14 | 14 | die; |
15 | 15 | |
16 | | -$wgExtensionCredits['specialpage'][] = array( |
17 | | - 'name' => 'Userip', |
18 | | - 'version' => '1.1', |
19 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:UserIP', |
20 | | - 'author' => 'Ævar Arnfjörð Bjarmason', |
21 | | - 'description' => 'Given a username returns a list of IP addresses that user has made edits to the wiki from', |
22 | | -); |
23 | | - |
24 | 16 | if ( !function_exists( 'extAddSpecialPage' ) ) { |
25 | 17 | require( dirname(__FILE__) . '/../ExtensionFunctions.php' ); |
26 | 18 | } |
27 | 19 | extAddSpecialPage( dirname(__FILE__) . '/Userip_body.php', 'Espionage', 'Espionage' ); |
| 20 | + |
| 21 | + |
Index: trunk/extensions/UsernameBlacklist/UsernameBlacklist.php |
— | — | @@ -14,11 +14,10 @@ |
15 | 15 | $wgExtensionFunctions[] = 'efUsernameBlacklistSetup'; |
16 | 16 | $wgExtensionCredits['other'][] = array( |
17 | 17 | 'name' => 'Username Blacklist', |
18 | | - 'version' => '1.1', |
19 | 18 | 'author' => 'Rob Church', |
20 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Username_Blacklist', |
21 | 20 | 'description' => 'Restrict the creation of user accounts matching one or more regular expressions', |
22 | | - ); |
| 21 | + ); |
23 | 22 | |
24 | 23 | $wgAvailableRights[] = 'uboverride'; |
25 | 24 | $wgGroupPermissions['sysop']['uboverride'] = true; |
— | — | @@ -59,7 +58,7 @@ |
60 | 59 | return true; |
61 | 60 | } |
62 | 61 | } |
63 | | - |
| 62 | + |
64 | 63 | /** |
65 | 64 | * When the blacklist page is edited, invalidate the blacklist cache |
66 | 65 | * |
— | — | @@ -73,18 +72,18 @@ |
74 | 73 | $blacklist->invalidateCache(); |
75 | 74 | } |
76 | 75 | return true; |
77 | | - } |
78 | | - |
| 76 | + } |
| 77 | + |
79 | 78 | /** |
80 | 79 | * If editing the username blacklist page, check for validity and whine at the user. |
81 | 80 | */ |
82 | 81 | function efUsernameBlacklistValidate( $editPage, $text, $section, &$hookError ) { |
83 | 82 | if( $editPage->mTitle->getNamespace() == NS_MEDIAWIKI && |
84 | 83 | $editPage->mTitle->getDbKey() == 'Usernameblacklist' ) { |
85 | | - |
| 84 | + |
86 | 85 | $blacklist = UsernameBlacklist::fetch(); |
87 | 86 | $badLines = $blacklist->validate( $text ); |
88 | | - |
| 87 | + |
89 | 88 | if( $badLines ) { |
90 | 89 | $badList = "*<tt>" . |
91 | 90 | implode( "</tt>\n*<tt>", |
— | — | @@ -97,18 +96,18 @@ |
98 | 97 | $badList . |
99 | 98 | "</div>\n" . |
100 | 99 | "<br clear='all' />\n"; |
101 | | - |
| 100 | + |
102 | 101 | // This is kind of odd, but... :D |
103 | 102 | return true; |
104 | 103 | } |
105 | 104 | } |
106 | 105 | return true; |
107 | 106 | } |
108 | | - |
| 107 | + |
109 | 108 | class UsernameBlacklist { |
110 | | - |
111 | | - var $regex; |
112 | | - |
| 109 | + |
| 110 | + var $regex; |
| 111 | + |
113 | 112 | /** |
114 | 113 | * Trim leading spaces and asterisks from the text |
115 | 114 | * @param $text Text to trim |
— | — | @@ -117,7 +116,7 @@ |
118 | 117 | function transform( $text ) { |
119 | 118 | return trim( $text, ' *' ); |
120 | 119 | } |
121 | | - |
| 120 | + |
122 | 121 | /** |
123 | 122 | * Is the supplied text an appropriate fragment to include? |
124 | 123 | * |
— | — | @@ -127,7 +126,7 @@ |
128 | 127 | function isUsable( $text ) { |
129 | 128 | return substr( $text, 0, 1 ) == '*'; |
130 | 129 | } |
131 | | - |
| 130 | + |
132 | 131 | /** |
133 | 132 | * Attempt to fetch the blacklist from cache; build it if needs be |
134 | 133 | * |
— | — | @@ -144,7 +143,7 @@ |
145 | 144 | return $list; |
146 | 145 | } |
147 | 146 | } |
148 | | - |
| 147 | + |
149 | 148 | /** |
150 | 149 | * Build the blacklist from scratch, using the message page |
151 | 150 | * |
— | — | @@ -158,7 +157,7 @@ |
159 | 158 | return array(); |
160 | 159 | } |
161 | 160 | } |
162 | | - |
| 161 | + |
163 | 162 | /** |
164 | 163 | * Build one or more blacklist regular expressions from the input. |
165 | 164 | * If a fragment causes an error, we'll return multiple items |
— | — | @@ -171,11 +170,11 @@ |
172 | 171 | $groups = $this->fragmentsFromInput( $input ); |
173 | 172 | if( count( $groups ) ) { |
174 | 173 | $combinedRegex = '/(' . implode( '|', $groups ) . ')/u'; |
175 | | - |
| 174 | + |
176 | 175 | wfSuppressWarnings(); |
177 | 176 | $ok = ( preg_match( $combinedRegex, '' ) !== false ); |
178 | 177 | wfRestoreWarnings(); |
179 | | - |
| 178 | + |
180 | 179 | if( $ok ) { |
181 | 180 | return array( $combinedRegex ); |
182 | 181 | } else { |
— | — | @@ -189,7 +188,7 @@ |
190 | 189 | return array(); |
191 | 190 | } |
192 | 191 | } |
193 | | - |
| 192 | + |
194 | 193 | /** |
195 | 194 | * Break input down by line, remove comments, and strip to regex fragments. |
196 | 195 | * @input string |
— | — | @@ -205,7 +204,7 @@ |
206 | 205 | } |
207 | 206 | return $groups; |
208 | 207 | } |
209 | | - |
| 208 | + |
210 | 209 | /** |
211 | 210 | * Go through a set of input and return a list of lines which |
212 | 211 | * produce invalid regexes. |
— | — | @@ -227,7 +226,7 @@ |
228 | 227 | } |
229 | 228 | return $bad; |
230 | 229 | } |
231 | | - |
| 230 | + |
232 | 231 | /** |
233 | 232 | * Invalidate the blacklist cache |
234 | 233 | */ |
— | — | @@ -235,7 +234,7 @@ |
236 | 235 | global $wgMemc; |
237 | 236 | $wgMemc->delete( $this->key ); |
238 | 237 | } |
239 | | - |
| 238 | + |
240 | 239 | /** |
241 | 240 | * Match a username against the blacklist |
242 | 241 | * @param $username Username to check |
— | — | @@ -246,7 +245,7 @@ |
247 | 246 | wfSuppressWarnings(); |
248 | 247 | $match = preg_match( $regex, $username ); |
249 | 248 | wfRestoreWarnings(); |
250 | | - |
| 249 | + |
251 | 250 | if( $match ) { |
252 | 251 | return true; |
253 | 252 | } elseif( $match === false ) { |
— | — | @@ -255,7 +254,7 @@ |
256 | 255 | } |
257 | 256 | return false; |
258 | 257 | } |
259 | | - |
| 258 | + |
260 | 259 | /** |
261 | 260 | * Constructor |
262 | 261 | * Prepare the regular expression |
— | — | @@ -276,10 +275,10 @@ |
277 | 276 | $blackList = new UsernameBlacklist(); |
278 | 277 | return $blackList; |
279 | 278 | } |
280 | | - |
| 279 | + |
281 | 280 | } |
282 | | - |
| 281 | + |
283 | 282 | } else { |
284 | 283 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
285 | 284 | die( 1 ); |
286 | | -} |
| 285 | +} |
\ No newline at end of file |
Index: trunk/extensions/RenderHash/RenderHash.php |
— | — | @@ -1,13 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$wgExtensionCredits['specialpage'][] = array( |
5 | | - 'name' => 'RenderHash', |
6 | | - 'version' => '1.1', |
7 | | - 'author' => 'Brion Vibber', |
8 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:RenderHash', |
9 | | - 'description' => 'Render Hash', |
10 | | -); |
11 | | - |
12 | 4 | $wgHooks['PageRenderingHash'][] = 'renderHashAppend'; |
13 | 5 | $wgRenderHashAppend = ''; |
14 | 6 | |
— | — | @@ -23,3 +15,4 @@ |
24 | 16 | $hash .= $wgRenderHashAppend; |
25 | 17 | return true; |
26 | 18 | } |
| 19 | + |
Index: trunk/extensions/TodoTasks/SpecialTaskList.php |
— | — | @@ -5,12 +5,12 @@ |
6 | 6 | modify it under the terms of the GNU General Public License |
7 | 7 | as published by the Free Software Foundation, version 2 |
8 | 8 | of the License. |
9 | | - |
| 9 | + |
10 | 10 | This program is distributed in the hope that it will be useful, |
11 | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | 13 | GNU General Public License for more details. |
14 | | - |
| 14 | + |
15 | 15 | You should have received a copy of the GNU General Public License |
16 | 16 | along with this program; if not, write to the Free Software |
17 | 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
— | — | @@ -21,20 +21,20 @@ |
22 | 22 | $wgTodoTasksExtensionVersion = '0.9.5'; |
23 | 23 | |
24 | 24 | $wgExtensionCredits['parserhook'][] = array( |
25 | | - 'version' => $wgTodoTasksExtensionVersion, |
26 | | - 'name' => 'Todo Tasks', |
27 | | - 'author' => 'Paul Grinberg', |
28 | | - 'email' => 'gri6507 at yahoo dot com', |
29 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Todo_Tasks', |
30 | | - 'description' => 'Adds <nowiki>{{#todo:}}</nowiki> parser function for assigning tasks' |
| 25 | + 'version' => $wgTodoTasksExtensionVersion, |
| 26 | + 'name' => 'Todo Tasks', |
| 27 | + 'author' => 'Paul Grinberg', |
| 28 | + 'email' => 'gri6507 at yahoo dot com', |
| 29 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Todo_Tasks', |
| 30 | + 'description' => 'adds <nowiki>{{#todo:}}</nowiki> parser function for assigning tasks' |
31 | 31 | ); |
32 | 32 | $wgExtensionCredits['specialpage'][] = array( |
33 | | - 'name' => 'Todo Tasks', |
34 | | - 'version' => $wgTodoTasksExtensionVersion, |
35 | | - 'author' => 'Paul Grinberg', |
36 | | - 'email' => 'gri6507 at yahoo dot com', |
37 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Todo_Tasks', |
38 | | - 'description' => 'Adds a special page for reviewing tasks assignments', |
| 33 | + 'name' => 'Todo Tasks', |
| 34 | + 'version' => $wgTodoTasksExtensionVersion, |
| 35 | + 'author' => 'Paul Grinberg', |
| 36 | + 'email' => 'gri6507 at yahoo dot com', |
| 37 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Todo_Tasks', |
| 38 | + 'description' => 'Adds a special page for reviewing tasks assignments' |
39 | 39 | ); |
40 | 40 | |
41 | 41 | $wgUseProjects = true; |
— | — | @@ -55,3 +55,4 @@ |
56 | 56 | $wgHooks['EditPage::attemptSave'][] = 'todoSavePreparser'; |
57 | 57 | $wgExtensionFunctions[] = 'wfTodoParserFunction_Setup'; |
58 | 58 | $wgHooks['LanguageGetMagic'][] = 'wfTodoParserFunction_Magic'; |
| 59 | + |
Index: trunk/extensions/WiktionaryInflection/Inflection.php |
— | — | @@ -1,14 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | $wgExtensionFunctions[] = "wfInflectionExtension"; |
4 | 4 | |
5 | | -$wgExtensionCredits['other'][] = array( |
6 | | - 'name' => 'Wiktionary Inflection', |
7 | | - 'version' => '1.1', |
8 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Wiktionary_Inflection', |
9 | | - 'author' => 'rodasmith', |
10 | | - 'description' => 'Wiktionary inflection', |
11 | | -); |
12 | | - |
13 | 5 | function wfInflectionExtension() { |
14 | 6 | global $wgParser; |
15 | 7 | $wgParser->setHook("infl", "renderInflection"); |
— | — | @@ -112,3 +104,4 @@ |
113 | 105 | return "?<!-- " . $e->getMessage() . " -->"; |
114 | 106 | } |
115 | 107 | } |
| 108 | + |
Index: trunk/extensions/RDF/Rdf.php |
— | — | @@ -22,15 +22,6 @@ |
23 | 23 | */ |
24 | 24 | if (defined('MEDIAWIKI')) { |
25 | 25 | |
26 | | - $wgExtensionCredits['parserhook'][] = array( |
27 | | - 'name' => 'RDF', |
28 | | - 'version' => '1.1', |
29 | | - 'author' => 'Evan Prodromou', |
30 | | - 'email' => 'evan@wikitravel.org', |
31 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:RDF', |
32 | | - 'description' => 'RDF framework for MediaWiki', |
33 | | - ); |
34 | | - |
35 | 26 | require_once('GlobalFunctions.php'); |
36 | 27 | if (!defined('RDFAPI_INCLUDE_DIR')) { |
37 | 28 | wfDebugDieBacktrace("MwRdf: you must install RAP (RDF API for PHP) " . |
— | — | @@ -1036,3 +1027,5 @@ |
1037 | 1028 | } |
1038 | 1029 | |
1039 | 1030 | } |
| 1031 | + |
| 1032 | + |
Index: trunk/extensions/Tooltip/Tooltip.php |
— | — | @@ -3,19 +3,17 @@ |
4 | 4 | $wgExtensionFunctions[] = "wfToolTipExtension"; |
5 | 5 | $wgHooks['LanguageGetMagic'][] = 'wfTooltipParserFunction_Magic'; |
6 | 6 | $wgExtensionCredits['parserhook'][] = array( |
7 | | - 'name' => 'ToolTip', |
8 | | - 'author' => 'Paul Grinberg', |
9 | | - 'email' => 'gri6507 at yahoo dot com', |
10 | | - 'description' => 'adds <nowiki><tooltip></nowiki> and <nowiki>{{#tooltip:}}</nowiki>tag', |
11 | | - 'version' => '0.5.1', |
12 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Tooltip', |
| 7 | + 'name' => 'ToolTip', |
| 8 | + 'author' => 'Paul Grinberg', |
| 9 | + 'description' => 'adds <nowiki><tooltip></nowiki> and <nowiki>{{#tooltip:}}</nowiki>tag', |
| 10 | + 'version' => '0.5.1' |
13 | 11 | ); |
14 | 12 | |
15 | 13 | function wfToolTipExtension() { |
16 | 14 | global $wgParser; |
17 | 15 | global $wgOut; |
18 | 16 | global $wgScriptPath; |
19 | | - |
| 17 | + |
20 | 18 | $output .= <<< END |
21 | 19 | <style type="text/css"> |
22 | 20 | .xstooltip{ |
— | — | @@ -134,3 +132,5 @@ |
135 | 133 | |
136 | 134 | return $output; |
137 | 135 | } |
| 136 | + |
| 137 | +?> |
Property changes on: trunk/extensions/Tooltip/Tooltip.php |
___________________________________________________________________ |
Added: svn:eol-style |
138 | 138 | + native |
Index: trunk/extensions/Seealso/Seealso.php |
— | — | @@ -11,13 +11,6 @@ |
12 | 12 | Set system message "seealso_local" to use a localized version, e.g., to "sieheauch" |
13 | 13 | */ |
14 | 14 | |
15 | | -$wgExtensionCredits['parserhook'][] = array( |
16 | | - 'name' => 'Seealso', |
17 | | - 'version' => '1.1', |
18 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:See_also', |
19 | | - 'author' => 'Magnus Manske', |
20 | | - 'description' => 'Localised \'See also\' headings using the tag <nowiki><seealso></nowiki>', |
21 | | -); |
22 | 15 | |
23 | 16 | $wgExtensionFunctions[] = "wfSeealso"; |
24 | 17 | |
— | — | @@ -42,3 +35,5 @@ |
43 | 36 | $ret = $ret->getText(); |
44 | 37 | return $ret ; |
45 | 38 | } |
| 39 | + |
| 40 | + |
Index: trunk/extensions/UserImages/UserImages.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * @addtogroup Extensions |
9 | 9 | * @author Rob Church <robchur@gmail.com> |
10 | 10 | */ |
11 | | - |
| 11 | + |
12 | 12 | if( defined( 'MEDIAWIKI' ) ) { |
13 | 13 | |
14 | 14 | $wgAutoloadClasses['UserImagesGallery'] = dirname( __FILE__ ) . '/UserImages.class.php'; |
— | — | @@ -15,19 +15,17 @@ |
16 | 16 | |
17 | 17 | $wgExtensionCredits['parserhook'][] = array( |
18 | 18 | 'name' => 'User Image Gallery', |
19 | | - 'version' => '1.1', |
20 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:UserImages', |
21 | 19 | 'author' => 'Rob Church', |
22 | 20 | 'description' => 'Generate galleries of user-uploaded images with <code><nowiki><userimage /></nowiki></code>', |
23 | 21 | ); |
24 | | - |
| 22 | + |
25 | 23 | /** |
26 | 24 | * Set this to true to disable the parser cache for pages which |
27 | 25 | * contain a <userimages> tag; this keeps the galleries up to date |
28 | 26 | * at the cost of a performance overhead on page views |
29 | 27 | */ |
30 | 28 | $wgUserImagesNoCache = false; |
31 | | - |
| 29 | + |
32 | 30 | /** |
33 | 31 | * Extension initialisation function |
34 | 32 | */ |
— | — | @@ -38,7 +36,7 @@ |
39 | 37 | $wgMessageCache->addMessages( $messages, $lang ); |
40 | 38 | $wgParser->setHook( 'userimages', 'efUserImagesRender' ); |
41 | 39 | } |
42 | | - |
| 40 | + |
43 | 41 | /** |
44 | 42 | * Extension rendering function |
45 | 43 | * |
— | — | @@ -59,3 +57,4 @@ |
60 | 58 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
61 | 59 | exit(); |
62 | 60 | } |
| 61 | + |