Index: trunk/extensions/Citation/Citation.php |
— | — | @@ -4,28 +4,30 @@ |
5 | 5 | # There is a <citation>author=Manske M ||title="The best paper ever" ||journal=''Biochemistry'' ||volume='''5''', 11</citation> citation here! |
6 | 6 | |
7 | 7 | |
8 | | -$wgHooks['ParserBeforeTidy'][] = 'citation_hooker' ; |
| 8 | +$wgHooks['ParserBeforeTidy'][] = 'citation_hooker'; |
9 | 9 | $wgHooks['ParserClearState'][] = 'citation_clear_state'; |
10 | 10 | |
11 | 11 | $wgExtensionFunctions[] = "wfCitation"; |
12 | 12 | |
13 | | -function wfCitation () { |
| 13 | +function wfCitation() { |
14 | 14 | global $wgParser ; |
15 | | - $wgParser->setHook ( "citation" , 'parse_citation' ) ; |
| 15 | + $wgParser->setHook( "citation" , 'parse_citation' ) ; |
16 | 16 | $wgParser->isMainParser = true ; |
17 | 17 | } |
18 | 18 | |
19 | | -$wgCitationCache = array () ; |
| 19 | +$wgCitationCache = array() ; |
20 | 20 | $wgCitationCounter = 1 ; |
21 | 21 | $wgCitationRunning = false ; |
22 | 22 | |
23 | | -function citation_hooker ( $parser , $text ) { |
| 23 | +function citation_hooker( $parser , $text ) { |
24 | 24 | global $wgCitationCache , $wgCitationCounter , $wgCitationRunning ; |
25 | | - if ( $wgCitationRunning ) return ; |
26 | | - if ( count ( $wgCitationCache ) == 0 ) return ; |
27 | | - if ( !isset ( $parser->isMainParser ) ) return ; |
| 25 | + if( $wgCitationRunning ) return ; |
| 26 | + if( count( $wgCitationCache ) == 0 ) |
| 27 | + return false; |
| 28 | + if( !isset( $parser->isMainParser ) ) |
| 29 | + return false; |
28 | 30 | $ret = "" ; |
29 | | - foreach ( $wgCitationCache AS $num => $entry ) { |
| 31 | + foreach( $wgCitationCache AS $num => $entry ) { |
30 | 32 | $x = "<li>" . $entry . " <a href='#citeback{$num}'>↑</a></li>\n" ; |
31 | 33 | $ret .= $x ; |
32 | 34 | } |
— | — | @@ -36,60 +38,62 @@ |
37 | 39 | |
38 | 40 | function citation_clear_state() { |
39 | 41 | global $wgCitationCache, $wgCitationCounter, $wgCitationRunning; |
40 | | - $wgCitationCache = array () ; |
| 42 | + $wgCitationCache = array(); |
41 | 43 | $wgCitationCounter = 1 ; |
42 | | - $wgCitationRunning = false ; |
| 44 | + $wgCitationRunning = false; |
| 45 | + |
| 46 | + return false; |
43 | 47 | } |
44 | 48 | |
45 | | -function parse_citation ( $text , $params , $parser ) { |
| 49 | +function parse_citation( $text , $params , $parser ) { |
46 | 50 | global $wgCitationRunning ; |
47 | | - if ( $wgCitationRunning ) return ; |
| 51 | + if( $wgCitationRunning ) return ; |
48 | 52 | $ret = "" ; |
49 | 53 | $attheend = false ; |
50 | | - $res = array () ; |
51 | | - $res2 = array () ; |
| 54 | + $res = array() ; |
| 55 | + $res2 = array() ; |
52 | 56 | $href = "" ; |
53 | | - $a = explode ( "||" , $text ) ; |
| 57 | + $a = explode( "||" , $text ) ; |
54 | 58 | |
55 | | - foreach ( $a AS $line ) { |
56 | | - $data = explode ( "=" , $line , 2 ) ; |
57 | | - while ( count ( $data ) < 2 ) $data[] = "" ; |
58 | | - $key = urlencode ( trim ( strtolower ( array_shift ( $data ) ) ) ) ; |
59 | | - $value = array_shift ( $data ) ; |
| 59 | + foreach( $a AS $line ) { |
| 60 | + $data = explode( "=" , $line , 2 ) ; |
| 61 | + while( count( $data ) < 2 ) $data[] = "" ; |
| 62 | + $key = urlencode( trim( strtolower( array_shift( $data ) ) ) ) ; |
| 63 | + $value = array_shift( $data ) ; |
60 | 64 | |
61 | 65 | // Parsed now : "$key" = "$value" |
62 | | - if ( substr ( $value , 0 , 3 ) == "{{{" ) {} // Unset variable, ignore |
63 | | - else if ( $key == "attheend" ) $attheend = true ; |
64 | | - else if ( $key == "href" ) $href = $value ; |
65 | | - else if ( $value != "" ) { |
66 | | - $x = array ( "key" => $key , "value" => $value ) ; |
| 66 | + if( substr( $value , 0 , 3 ) == "{{{" ) {} // Unset variable, ignore |
| 67 | + else if( $key == "attheend" ) $attheend = true ; |
| 68 | + else if( $key == "href" ) $href = $value ; |
| 69 | + else if( $value != "" ) { |
| 70 | + $x = array( "key" => $key , "value" => $value ) ; |
67 | 71 | $res[] = $x ; |
68 | 72 | $res2[$key] = $value ; |
69 | 73 | } |
70 | 74 | } |
71 | 75 | |
72 | 76 | // Creating output string |
73 | | - foreach ( $res AS $item ) { |
| 77 | + foreach( $res AS $item ) { |
74 | 78 | $key = $item["key"] ; |
75 | 79 | $value = $item["value"] ; |
76 | | - $key2 = urldecode ( $key ) ; |
77 | | - if ( strtolower ( substr ( $key2 , 0 , 3 ) ) == "if:" ) { |
78 | | - $key2 = trim ( substr ( $key2 , 3 ) ) ; |
79 | | - $key = urlencode ( $key2 ) ; |
| 80 | + $key2 = urldecode( $key ) ; |
| 81 | + if( strtolower( substr( $key2 , 0 , 3 ) ) == "if:" ) { |
| 82 | + $key2 = trim( substr( $key2 , 3 ) ) ; |
| 83 | + $key = urlencode( $key2 ) ; |
80 | 84 | } |
81 | | - if ( isset ( $res2[$key] ) ) $ret .= $value ; |
| 85 | + if( isset( $res2[$key] ) ) $ret .= $value ; |
82 | 86 | } |
83 | 87 | |
84 | | - if ( $href != "" ) $ret .= " [{$href}]" ; |
| 88 | + if( $href != "" ) $ret .= " [{$href}]" ; |
85 | 89 | |
86 | 90 | // Adding to footer list or showing inline |
87 | 91 | $localParser = new Parser ; |
88 | 92 | $wgCitationRunning = true ; |
89 | | - $ret = $localParser->parse ( $ret , $parser->getTitle(), $parser->getOptions(), false ) ; |
| 93 | + $ret = $localParser->parse( $ret , $parser->getTitle(), $parser->getOptions(), false ) ; |
90 | 94 | $wgCitationRunning = false ; |
91 | 95 | $ret = $ret->getText(); |
92 | 96 | |
93 | | - if ( $attheend ) { |
| 97 | + if( $attheend ) { |
94 | 98 | global $wgCitationCache , $wgCitationCounter ; |
95 | 99 | $ret = "<a name='citation{$wgCitationCounter}'></a>{$ret}" ; |
96 | 100 | $wgCitationCache[$wgCitationCounter] = $ret ; |
Index: trunk/extensions/SemanticMediaWiki/includes/SemanticToolbar/SMW_Toolbartab.php |
— | — | @@ -21,6 +21,8 @@ |
22 | 22 | 'href' => 'javascript:smw_togglemenuvisibility()' //show/hide semantic tool bar |
23 | 23 | ); |
24 | 24 | $content_actions = array_merge( $content_actions, $main_action); //add a new action |
| 25 | + |
| 26 | + return true; |
25 | 27 | } |
26 | 28 | |
27 | 29 | ?> |
\ No newline at end of file |
Index: trunk/extensions/SpecialTalk/SpecialTalk.php |
— | — | @@ -45,6 +45,8 @@ |
46 | 46 | // check existance |
47 | 47 | true |
48 | 48 | ); |
| 49 | + |
| 50 | + return true; |
49 | 51 | } |
50 | 52 | } |
51 | 53 | |
Index: trunk/extensions/Review/Review.php |
— | — | @@ -341,7 +341,7 @@ |
342 | 342 | if( !wfReviewExtensionDoesNamespaceApply ( $wgTitle->getNamespace() ) |
343 | 343 | or $wgUser->isBlocked() |
344 | 344 | or ( $action != "view" ) |
345 | | - ) return; |
| 345 | + ) return false; |
346 | 346 | |
347 | 347 | # Initialize |
348 | 348 | $do_merge = $wgRequest->getBool ( 'do_merge' , false ) ; |
Index: trunk/extensions/SisterSites/SisterSites.php |
— | — | @@ -27,6 +27,7 @@ |
28 | 28 | $out->addHtml( wfSisterList( $matches ) ); |
29 | 29 | } |
30 | 30 | } |
| 31 | + return true; |
31 | 32 | } |
32 | 33 | |
33 | 34 | function wfSisterList( $sites ) { |
Index: trunk/extensions/examples/Parser_function.php |
— | — | @@ -30,6 +30,7 @@ |
31 | 31 | # The first array element is case sensitivity, in this case it is not case sensitive |
32 | 32 | # All remaining elements are synonyms for our parser function |
33 | 33 | $magicWords['example'] = array( 0, 'example' ); |
| 34 | + return true; |
34 | 35 | } |
35 | 36 | |
36 | 37 | function wfExampleParserFunction_Render( &$parser, $param1 = '', $param2 = '' ) { |
Index: trunk/extensions/DisableSpecialPages/DisableSpecialPages.php |
— | — | @@ -35,6 +35,7 @@ |
36 | 36 | if( $title && !efDspWhitelisted( $title ) && isset( $list[ $title->getText() ] ) ) |
37 | 37 | unset( $list[ $title->getText() ] ); |
38 | 38 | } |
| 39 | + return true; |
39 | 40 | } |
40 | 41 | |
41 | 42 | function efDspOldMethod() { |
— | — | @@ -44,6 +45,7 @@ |
45 | 46 | if( $title && !efDspWhitelisted( $title ) && isset( $wgSpecialPages[ $title->getText() ] ) ) |
46 | 47 | SpecialPage::removePage( $title->getText() ); |
47 | 48 | } |
| 49 | + return true; |
48 | 50 | } |
49 | 51 | |
50 | 52 | function efDspMakeTitle( $page ) { |
Index: trunk/extensions/Tasks/Tasks.php |
— | — | @@ -419,6 +419,7 @@ |
420 | 420 | function wfTasksExtensionPreventOtherActiveTabs( &$skin, &$prevent_active_tabs ) { # Checked for HTML and MySQL insertion attacks |
421 | 421 | global $action; |
422 | 422 | $prevent_active_tabs = ( $action == 'tasks' ); |
| 423 | + return true; |
423 | 424 | } |
424 | 425 | |
425 | 426 | /** |
Index: trunk/extensions/FarmNotice/FarmNotice.class.php |
— | — | @@ -29,6 +29,8 @@ |
30 | 30 | $extra = $this->fetchNotice(); |
31 | 31 | if( $extra ) |
32 | 32 | $notice = $extra . $notice; |
| 33 | + |
| 34 | + return true; |
33 | 35 | } |
34 | 36 | |
35 | 37 | function fetchNotice() { |
— | — | @@ -125,6 +127,7 @@ |
126 | 128 | $wgMemc->delete( $this->getLocalCacheKey() ); |
127 | 129 | } |
128 | 130 | } |
| 131 | + return true; |
129 | 132 | } |
130 | 133 | |
131 | 134 | function getSourceUrl( $lang ) { |
Index: trunk/extensions/NewUserNotif/NewUserNotif.php |
— | — | @@ -34,6 +34,8 @@ |
35 | 35 | $user =& $wgUser; |
36 | 36 | $notifier = new NewUserNotifier(); |
37 | 37 | $notifier->execute( $user ); |
| 38 | + |
| 39 | + return true; |
38 | 40 | } |
39 | 41 | |
40 | 42 | class NewUserNotifier { |
Index: trunk/extensions/FootNote/Footnote.php |
— | — | @@ -51,8 +51,8 @@ |
52 | 52 | |
53 | 53 | wfDebug("insert_endnotes:\n<<<$text>>>\n"); |
54 | 54 | |
55 | | - if( $footnoteRecursionGuard ) return; |
56 | | - if( count( $footnoteNotes ) == 0 ) return ; |
| 55 | + if( $footnoteRecursionGuard ) return false; |
| 56 | + if( count( $footnoteNotes ) == 0 ) return false; |
57 | 57 | |
58 | 58 | $ret = "" ; |
59 | 59 | foreach( $footnoteNotes AS $num => $entry ) { |
— | — | @@ -67,6 +67,8 @@ |
68 | 68 | /* Clear global array after rendering */ |
69 | 69 | $footnoteNotes = array(); |
70 | 70 | $footnoteCount = 1 ; |
| 71 | + |
| 72 | + return true; |
71 | 73 | } |
72 | 74 | |
73 | 75 | function parse_footnote( $text, $params, &$parser ) { |
Index: trunk/extensions/Nogomatch/Nogomatch.php |
— | — | @@ -16,4 +16,5 @@ |
17 | 17 | |
18 | 18 | function wfNogomatchHook( &$title ) { |
19 | 19 | wfDebugLog( 'nogomatch', $title->getText(), false ); |
| 20 | + return true; |
20 | 21 | } |
Index: trunk/extensions/Watchers/Watchers.php |
— | — | @@ -62,11 +62,11 @@ |
63 | 63 | global $wgTitle; |
64 | 64 | if( $wgTitle->isTalkPage() ) { |
65 | 65 | # No talk pages please |
66 | | - return; |
| 66 | + return false; |
67 | 67 | } |
68 | 68 | if( $wgTitle->getNamespace() < 0 ) { |
69 | 69 | # No special pages please |
70 | | - return; |
| 70 | + return false; |
71 | 71 | } |
72 | 72 | |
73 | 73 | wfWatchersAddCache(); |
— | — | @@ -79,6 +79,7 @@ |
80 | 80 | echo wfMsg('watchers_link_title'); |
81 | 81 | echo "</a></li>\n" ; |
82 | 82 | |
| 83 | + return true; |
83 | 84 | } |
84 | 85 | |
85 | 86 | /** |
Index: trunk/extensions/wikiwyg/share/MediaWiki/extensions/MediaWikiWyg.php |
— | — | @@ -75,6 +75,7 @@ |
76 | 76 | } |
77 | 77 | } |
78 | 78 | $text = $full; |
| 79 | + return true; |
79 | 80 | } |
80 | 81 | |
81 | 82 | # Not a valid entry point, skip unless MEDIAWIKI is defined |
Index: trunk/extensions/Wikidata/App.php |
— | — | @@ -45,28 +45,31 @@ |
46 | 46 | require_once("{$IP}/extensions/Wikidata/OmegaWiki/SpecialConceptMapping.php"); |
47 | 47 | |
48 | 48 | function addWikidataHeader() { |
49 | | - global $wgOut,$wgScriptPath; |
50 | | - $wgOut->addScript("<script type='text/javascript' src='{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.js'></script>"); |
51 | | - $wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.css")); |
52 | | - $wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables.css")); |
| 49 | + global $wgOut,$wgScriptPath; |
| 50 | + $wgOut->addScript("<script type='text/javascript' src='{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.js'></script>"); |
| 51 | + $wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.css")); |
| 52 | + $wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables.css")); |
| 53 | + return true; |
53 | 54 | } |
54 | 55 | |
55 | 56 | function addWikidataEditLinkTrail(&$trail) { |
56 | | - global $wgTitle; |
57 | | - $ns=Namespace::get($wgTitle->getNamespace()); |
58 | | - if($ns->getHandlerClass()=='OmegaWiki' || $ns->getHandlerClass()=='DefinedMeaning') { |
59 | | - $dc=wdGetDatasetContext(); |
60 | | - $trail="&dataset=$dc"; |
61 | | - } |
| 57 | + global $wgTitle; |
| 58 | + $ns=Namespace::get($wgTitle->getNamespace()); |
| 59 | + if($ns->getHandlerClass()=='OmegaWiki' || $ns->getHandlerClass()=='DefinedMeaning') { |
| 60 | + $dc=wdGetDatasetContext(); |
| 61 | + $trail="&dataset=$dc"; |
| 62 | + } |
| 63 | + return true; |
62 | 64 | } |
63 | 65 | |
64 | 66 | function addHistoryLinkTrail(&$trail) { |
65 | | - global $wgTitle; |
66 | | - $ns=Namespace::get($wgTitle->getNamespace()); |
67 | | - if($ns->getHandlerClass()=='OmegaWiki' || $ns->getHandlerClass()=='DefinedMeaning') { |
68 | | - $dc=wdGetDatasetContext(); |
69 | | - $trail="&dataset=$dc"; |
70 | | - } |
| 67 | + global $wgTitle; |
| 68 | + $ns=Namespace::get($wgTitle->getNamespace()); |
| 69 | + if($ns->getHandlerClass()=='OmegaWiki' || $ns->getHandlerClass()=='DefinedMeaning') { |
| 70 | + $dc=wdGetDatasetContext(); |
| 71 | + $trail="&dataset=$dc"; |
| 72 | + } |
| 73 | + return true; |
71 | 74 | } |
72 | 75 | |
73 | 76 | function initializeWikidata() { |
— | — | @@ -126,7 +129,7 @@ |
127 | 130 | 'options'=>$datasetarray |
128 | 131 | ); |
129 | 132 | |
130 | | - |
| 133 | + return true; |
131 | 134 | } |
132 | 135 | |
133 | 136 | ?> |
Index: trunk/extensions/Blahtex/Blahtex.php |
— | — | @@ -118,6 +118,8 @@ |
119 | 119 | $errmsg = $br->getErrmsg(); |
120 | 120 | wfDebug('Blahtex MathML: ' . $br->mr->mathml . "\n"); |
121 | 121 | wfDebug('Blahtex errmsg: ' . $errmsg . "\n"); |
| 122 | + |
| 123 | + return true; |
122 | 124 | } |
123 | 125 | |
124 | 126 | /** |
— | — | @@ -152,6 +154,8 @@ |
153 | 155 | } |
154 | 156 | $parser->blahtexMathtags = $mathtags; |
155 | 157 | $text = $stripped . substr( $text, $pos ); |
| 158 | + |
| 159 | + return true; |
156 | 160 | } |
157 | 161 | |
158 | 162 | /** |
— | — | @@ -162,6 +166,8 @@ |
163 | 167 | function efBlahtexParserAfterTidy( &$parser, &$text ) { |
164 | 168 | global $wgBlahtexMathContent, $wgBlahtexMathTags; |
165 | 169 | $text = strtr( $text, $parser->blahtexMathtags ); |
| 170 | + |
| 171 | + return true; |
166 | 172 | } |
167 | 173 | |
168 | 174 | class BlahtexRenderer { |