Scrolling modulepref not being set properly
| Project: | OpenSocial Shindig-Integrator |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
In the ModulePrefs XML tag, scrolling can be set to "false" or "true". For gadgets set to "false", ShindigIntegrator interprets this as true and enables scrollbars. (See http://code.google.com/apis/gadgets/docs/basic.html for an example of scrolling="true")
see shindigintegrator.module. The problem is that case TRUE evaluates to true even if $gadget->scrolling="false", because TRUE indicates that a value is set, not that that value is something in particular.
Here's something that may work, please test:
switch (strtolower($gadget->scrolling)) {
case "false" :
$info['scrolling'] = "0";
break;
case "true" :
case TRUE :
case 1:
$info['scrolling'] = "1";
break;
default : $info['scrolling'] = "0";
}
