Index: trunk/extensions/SideBarMenu/SideBarMenu.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | const SBM_CONTROLS_SHOW = 'controls.show'; |
11 | 11 | const SBM_CONTROLS_HIDE = 'controls.hide'; |
12 | 12 | const SBM_JS_ANIMATE = 'js.animate'; |
13 | | -const SBM_EDIT_LINK = 'edit'; |
| 13 | +const SBM_EDIT_LINK = 'editlink'; |
14 | 14 | |
15 | 15 | |
16 | 16 | //default settings |
Index: trunk/extensions/SideBarMenu/SideBarMenu.hooks.php |
— | — | @@ -3,7 +3,6 @@ |
4 | 4 | class SideBarMenuHooks |
5 | 5 | { |
6 | 6 | |
7 | | - |
8 | 7 | public static function init(Parser &$parser){ |
9 | 8 | $parser->setHook('sidebarmenu','SideBarMenuHooks::renderFromTag'); |
10 | 9 | return true; |
— | — | @@ -89,7 +88,7 @@ |
90 | 89 | $config[SBM_CONTROLS_SHOW] = array_key_exists(SBM_CONTROLS_SHOW, $args) ? $args[SBM_CONTROLS_SHOW] : (isset($wgSideBarMenuConfig[SBM_CONTROLS_SHOW]) ? $wgSideBarMenuConfig[SBM_CONTROLS_SHOW] : '['.wfMsg('showtoc').']'); |
91 | 90 | $config[SBM_CONTROLS_HIDE] = array_key_exists(SBM_CONTROLS_HIDE, $args) ? $args[SBM_CONTROLS_HIDE] : (isset($wgSideBarMenuConfig[SBM_CONTROLS_HIDE]) ? $wgSideBarMenuConfig[SBM_CONTROLS_HIDE] : '['.wfMsg('hidetoc').']'); |
92 | 91 | $config[SBM_JS_ANIMATE] = array_key_exists(SBM_JS_ANIMATE, $args) ? $args[SBM_JS_ANIMATE] : $wgSideBarMenuConfig[SBM_JS_ANIMATE]; |
93 | | - $config[SBM_EDIT_LINK] = array_key_exists(SBM_EDIT_LINK, $args) ? $args[SBM_EDIT_LINK] : $wgSideBarMenuConfig[SBM_EDIT_LINK]; |
| 92 | + $config[SBM_EDIT_LINK] = array_key_exists(SBM_EDIT_LINK, $args) ? filter_var($args[SBM_EDIT_LINK], FILTER_VALIDATE_BOOLEAN) : $wgSideBarMenuConfig[SBM_EDIT_LINK]; |
94 | 93 | return $config; |
95 | 94 | } |
96 | 95 | } |