Index: branches/REL1_18/extensions/Gadgets/Gadgets_body.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * ArticleSaveComplete hook handler. |
20 | | - * |
| 20 | + * |
21 | 21 | * @param $article Article |
22 | 22 | * @param $user User |
23 | 23 | * @param $text String: New page text |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | public static function getPreferences( $user, &$preferences ) { |
58 | 58 | $gadgets = Gadget::loadStructuredList(); |
59 | 59 | if (!$gadgets) return true; |
60 | | - |
| 60 | + |
61 | 61 | $options = array(); |
62 | 62 | $default = array(); |
63 | 63 | foreach( $gadgets as $section => $thisSection ) { |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | $options = array_merge( $options, $available ); |
81 | 81 | } |
82 | 82 | } |
83 | | - |
| 83 | + |
84 | 84 | $preferences['gadgets-intro'] = |
85 | 85 | array( |
86 | 86 | 'type' => 'info', |
— | — | @@ -91,8 +91,8 @@ |
92 | 92 | 'raw' => 1, |
93 | 93 | 'rawrow' => 1, |
94 | 94 | ); |
95 | | - |
96 | | - $preferences['gadgets'] = |
| 95 | + |
| 96 | + $preferences['gadgets'] = |
97 | 97 | array( |
98 | 98 | 'type' => 'multiselect', |
99 | 99 | 'options' => $options, |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | 'prefix' => 'gadget-', |
103 | 103 | 'default' => $default, |
104 | 104 | ); |
105 | | - |
| 105 | + |
106 | 106 | return true; |
107 | 107 | } |
108 | 108 | |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | */ |
131 | 131 | public static function beforePageDisplay( $out ) { |
132 | 132 | global $wgUser; |
133 | | - |
| 133 | + |
134 | 134 | wfProfileIn( __METHOD__ ); |
135 | 135 | |
136 | 136 | $gadgets = Gadget::loadList(); |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | |
171 | 171 | /** |
172 | 172 | * Adds one legacy script to output. |
173 | | - * |
| 173 | + * |
174 | 174 | * @param $page String: Unprefixed page title |
175 | 175 | * @param $out OutputPage |
176 | 176 | */ |
— | — | @@ -354,8 +354,8 @@ |
355 | 355 | * @return Boolean: Whether this gadget has resources that can be loaded via ResourceLoader |
356 | 356 | */ |
357 | 357 | public function hasModule() { |
358 | | - return count( $this->styles ) |
359 | | - + ( $this->supportsResourceLoader() ? count( $this->scripts ) : 0 ) |
| 358 | + return count( $this->styles ) |
| 359 | + + ( $this->supportsResourceLoader() ? count( $this->scripts ) : 0 ) |
360 | 360 | > 0; |
361 | 361 | } |
362 | 362 | |
— | — | @@ -506,12 +506,13 @@ |
507 | 507 | return $gadgets; |
508 | 508 | } |
509 | 509 | |
510 | | - $g = wfMsgForContentNoTrans( "gadgets-definition" ); |
511 | | - if ( wfEmptyMsg( "gadgets-definition", $g ) ) { |
| 510 | + $g = wfMessage( "gadgets-definition" )->inContentLanguage(); |
| 511 | + if ( !$g->exists() ) { |
512 | 512 | $gadgets = false; |
513 | 513 | wfProfileOut( __METHOD__ ); |
514 | 514 | return $gadgets; |
515 | 515 | } |
| 516 | + $g = $g->plain(); |
516 | 517 | } else { |
517 | 518 | $g = $forceNewText; |
518 | 519 | } |
Property changes on: branches/REL1_18/extensions/Gadgets/Gadgets_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
519 | 520 | Merged /trunk/extensions/Gadgets/Gadgets_body.php:r97887,100573,100689,100692 |
Index: branches/REL1_18/extensions/CheckUser/maintenance/purgeOldData.php |
— | — | @@ -46,9 +46,9 @@ |
47 | 47 | break; // all cleared |
48 | 48 | } |
49 | 49 | // Record the start and end timestamp for the set |
50 | | - $blockStart = $res->fetchObject()->$ts_column; |
| 50 | + $blockStart = $dbw->addQuotes( $res->fetchObject()->$ts_column ); |
51 | 51 | $res->seek( $res->numRows() - 1 ); |
52 | | - $blockEnd = $res->fetchObject()->$ts_column; |
| 52 | + $blockEnd = $dbw->addQuotes( $res->fetchObject()->$ts_column ); |
53 | 53 | $res->free(); |
54 | 54 | |
55 | 55 | // Do the actual delete... |
Index: branches/REL1_18/extensions/Ratings/Ratings.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | // Only initialize the extension when all dependencies are present. |
38 | 38 | if ( ! defined( 'Validator_VERSION' ) ) { |
39 | | - die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:SubPageList">SubPageList</a>.<br />' ); |
| 39 | + die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Ratings">Ratings</a>.<br />' ); |
40 | 40 | } |
41 | 41 | |
42 | 42 | define( 'Ratings_VERSION', '0.1 alpha' ); |
Index: branches/REL1_18/extensions/AbuseFilter/AbuseFilter.hooks.php |
— | — | @@ -10,18 +10,19 @@ |
11 | 11 | // Load vars |
12 | 12 | $vars = new AbuseFilterVariableHolder; |
13 | 13 | |
14 | | - // Cache article object so we can share a parse operation |
15 | | - $title = $editor->mTitle; |
16 | | - $articleCacheKey = $title->getNamespace() . ':' . $title->getText(); |
17 | | - AFComputedVariable::$articleCache[$articleCacheKey] = $editor->mArticle; |
18 | | - |
19 | 14 | // Check for null edits. |
20 | 15 | $oldtext = ''; |
21 | 16 | |
22 | 17 | if ( $editor->mArticle->exists() ) { |
23 | | - $oldtext = $editor->mArticle->getContent(); |
| 18 | + // Make sure we load the latest text saved in database (bug 31656) |
| 19 | + $oldtext = $editor->mArticle->getRevision()->getRawText(); |
24 | 20 | } |
25 | 21 | |
| 22 | + // Cache article object so we can share a parse operation |
| 23 | + $title = $editor->mTitle; |
| 24 | + $articleCacheKey = $title->getNamespace() . ':' . $title->getText(); |
| 25 | + AFComputedVariable::$articleCache[$articleCacheKey] = $editor->mArticle; |
| 26 | + |
26 | 27 | if ( strcmp( $oldtext, $text ) == 0 ) { |
27 | 28 | // Don't trigger for null edits. |
28 | 29 | return true; |
Property changes on: branches/REL1_18/extensions |
___________________________________________________________________ |
Modified: svn:mergeinfo |
29 | 30 | Merged /trunk/extensions:r97887,100573,100689,100692 |