Index: trunk/extensions/Survey/Survey.php |
— | — | @@ -91,6 +91,7 @@ |
92 | 92 | $wgHooks['UnitTestsList'][] = 'SurveyHooks::registerUnitTests'; |
93 | 93 | $wgHooks['ParserFirstCallInit'][] = 'SurveyHooks::onParserFirstCallInit'; |
94 | 94 | $wgHooks['ArticleViewHeader'][] = 'SurveyHooks::onArticleViewHeader'; |
| 95 | +$wgHooks['AdminLinks'][] = 'SurveyHooks::addToAdminLinks'; |
95 | 96 | |
96 | 97 | $wgAvailableRights[] = 'surveyadmin'; |
97 | 98 | $wgAvailableRights[] = 'surveysubmit'; |
Index: trunk/extensions/Survey/Survey.hooks.php |
— | — | @@ -169,4 +169,20 @@ |
170 | 170 | return true; |
171 | 171 | } |
172 | 172 | |
| 173 | + /** |
| 174 | + * Adds a link to Admin Links page. |
| 175 | + * |
| 176 | + * @since 0.1 |
| 177 | + * |
| 178 | + * @return true |
| 179 | + */ |
| 180 | + public static function addToAdminLinks( &$admin_links_tree ) { |
| 181 | + $section = new ALSection( 'Survey' ); |
| 182 | + $row = new ALRow( 'smw' ); |
| 183 | + $row->addItem( AlItem::newFromSpecialPage( 'Surveys' ) ); |
| 184 | + $section->addRow( $row ); |
| 185 | + $admin_links_tree->addSection( $section, 'Survey' ); |
| 186 | + return true; |
| 187 | + } |
| 188 | + |
173 | 189 | } |