Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.php |
— | — | @@ -92,7 +92,9 @@ |
93 | 93 | |
94 | 94 | $wgHooks['UserSaveOptions'][] = 'SWLHooks::onUserSaveOptions'; |
95 | 95 | |
| 96 | +$wgHooks['AdminLinks'][] = 'SWLHooks::addToAdminLinks'; |
96 | 97 | |
| 98 | + |
97 | 99 | $moduleTemplate = array( |
98 | 100 | 'localBasePath' => dirname( __FILE__ ), |
99 | 101 | 'remoteBasePath' => $egSWLScriptPath |
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php |
— | — | @@ -259,4 +259,23 @@ |
260 | 260 | return true; |
261 | 261 | } |
262 | 262 | |
| 263 | + /** |
| 264 | + * Adds a link to Admin Links page. |
| 265 | + * |
| 266 | + * @since 0.1 |
| 267 | + * |
| 268 | + * @return true |
| 269 | + */ |
| 270 | + public static function addToAdminLinks( &$admin_links_tree ) { |
| 271 | + $displaying_data_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_browsesearch' ) ); |
| 272 | + |
| 273 | + // Escape if SMW hasn't added links. |
| 274 | + if ( is_null( $displaying_data_section ) ) return true; |
| 275 | + $smw_docu_row = $displaying_data_section->getRow( 'smw' ); |
| 276 | + |
| 277 | + $smw_docu_row->addItem( AlItem::newFromSpecialPage( 'WatchlistConditions' ) ); |
| 278 | + |
| 279 | + return true; |
| 280 | + } |
| 281 | + |
263 | 282 | } |
\ No newline at end of file |