r114597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114596‎ | r114597 | r114598 >
Date:09:09, 29 March 2012
Author:netbrain
Status:new
Tags:
Comment:
renamed parameter edit to editlink
fixed small issue where parameter editlink was always interpreted as true
Modified paths:
  • /trunk/extensions/SideBarMenu/SideBarMenu.hooks.php (modified) (history)
  • /trunk/extensions/SideBarMenu/SideBarMenu.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SideBarMenu/SideBarMenu.php
@@ -9,7 +9,7 @@
1010 const SBM_CONTROLS_SHOW = 'controls.show';
1111 const SBM_CONTROLS_HIDE = 'controls.hide';
1212 const SBM_JS_ANIMATE = 'js.animate';
13 -const SBM_EDIT_LINK = 'edit';
 13+const SBM_EDIT_LINK = 'editlink';
1414
1515
1616 //default settings
Index: trunk/extensions/SideBarMenu/SideBarMenu.hooks.php
@@ -3,7 +3,6 @@
44 class SideBarMenuHooks
55 {
66
7 -
87 public static function init(Parser &$parser){
98 $parser->setHook('sidebarmenu','SideBarMenuHooks::renderFromTag');
109 return true;
@@ -89,7 +88,7 @@
9089 $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').']');
9190 $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').']');
9291 $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];
9493 return $config;
9594 }
9695 }