Index: trunk/extensions/CollabWatchlist/CollabWatchlist.php |
— | — | @@ -29,6 +29,16 @@ |
30 | 30 | $wgAutoloadClasses['CategoryTreeManip'] = $wgCollabWatchlistIncludes . 'CategoryTreeManip.php'; |
31 | 31 | $wgAutoloadClasses['CollabWatchlistEditor'] = $wgCollabWatchlistIncludes . 'CollabWatchlistEditor.php'; |
32 | 32 | |
| 33 | +$wgResourceModules['ext.CollabWatchlist'] = array( |
| 34 | + 'scripts' => array( 'js/CollabWatchlist.js' ), |
| 35 | + |
| 36 | + // ResourceLoader needs to know where your files are; specify your |
| 37 | + // subdir relative to "/extensions" (or $wgExtensionAssetsPath) |
| 38 | + 'localBasePath' => dirname( __FILE__ ), |
| 39 | + 'remoteExtPath' => 'CollabWatchlist', |
| 40 | + 'position' => 'top', |
| 41 | +); |
| 42 | + |
33 | 43 | $wgSpecialPages['Collabwatchlist'] = 'SpecialCollabWatchlist'; # Let MediaWiki know about your new special page. |
34 | 44 | $wgSpecialPageGroups['Collabwatchlist'] = 'other'; |
35 | 45 | |
Index: trunk/extensions/CollabWatchlist/includes/CategoryTreeManip.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | /** |
24 | 24 | * Constructor |
25 | 25 | */ |
26 | | - function __construct( $id = NULL, $name = NULL, $root = NULL, $parents = array() ) { |
| 26 | + function __construct( $id = null, $name = null, $root = null, $parents = array() ) { |
27 | 27 | $this->id = $id; |
28 | 28 | $this->name = $name; |
29 | 29 | if ( !is_null( $root ) ) { |
Index: trunk/extensions/CollabWatchlist/includes/CollabWatchlistChangesList.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | */ |
108 | 108 | public static function newFromUser( &$user ) { |
109 | 109 | $sk = $user->getSkin(); |
110 | | - $list = NULL; |
| 110 | + $list = null; |
111 | 111 | if ( wfRunHooks( 'FetchChangesList', array( &$user, &$sk, &$list ) ) ) { |
112 | 112 | return new CollabWatchlistChangesList( $sk, $user ); |
113 | 113 | } else { |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | * (non-PHPdoc) |
132 | 132 | * @see includes/EnhancedChangesList#insertHistLink($s, $rc, $title, $params, $sep) |
133 | 133 | */ |
134 | | - protected function insertHistLink( &$s, &$rc, $title, $params = array(), $sep = NULL ) { |
| 134 | + protected function insertHistLink( &$s, &$rc, $title, $params = array(), $sep = null ) { |
135 | 135 | // No history |
136 | 136 | } |
137 | 137 | |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | /** |
220 | 220 | * Build a drop-down box for selecting a collaborative watchlist |
221 | 221 | * This method optionally adds javascript for changing a tag selector |
222 | | - * depending on the selected review list |
| 222 | + * depending on the selected review list. |
223 | 223 | * |
224 | 224 | * @param $glWlIdAndName Mixed: The result from getCollabWatchlistIdAndName() |
225 | 225 | * @param $selected Mixed: Reviewlist which should be pre-selected |
— | — | @@ -230,18 +230,9 @@ |
231 | 231 | * @return string |
232 | 232 | */ |
233 | 233 | public static function collabWatchlistSelector( $glWlIdAndName, $selected = '', $all = null, $element_name = 'collabwatchlist', $label = null, $element_id = 'collabwatchlist', $tagElementIdBase = null ) { |
234 | | - global $wgScriptPath, $wgJsMimeType; |
| 234 | + global $wgOut; |
| 235 | + $wgOut->addModules( 'ext.CollabWatchlist' ); |
235 | 236 | $ret = ''; |
236 | | - if ( isset( $tagElementIdBase ) ) { |
237 | | - $jsPath = "$wgScriptPath/extensions/CollabWatchlist/js"; |
238 | | - $ret .= Xml::element( 'script', |
239 | | - array( |
240 | | - 'type' => $wgJsMimeType, |
241 | | - 'src' => "$jsPath/CollabWatchlist.js", |
242 | | - ), |
243 | | - '', false |
244 | | - ); |
245 | | - } |
246 | 237 | $options = array(); |
247 | 238 | |
248 | 239 | // Godawful hack... we'll be frequently passed selected namespaces |