1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

Fix for Menu-Manager visibility setting not saving. Fixes e107::getForm()->userclass() method not functioning as intended.

This commit is contained in:
Cameron
2015-06-02 14:25:39 -07:00
parent 879174ea03
commit f938cc320f
5 changed files with 46 additions and 12 deletions

View File

@@ -1790,16 +1790,34 @@ class e_form
*/
function userclass($name, $curval=255, $type=null, $options=null)
{
switch ($type)
if(!empty($options))
{
if(is_array($options))
{
$opt = $options;
}
else
{
parse_str($options,$opt);
}
}
else
{
$opt = array();
}
$optlist = vartrue($opt['options'],null);
switch ($type)
{
case 'checkbox':
return e107::getUserClass()->uc_checkboxes($name,$curval,$options,null,false);
return e107::getUserClass()->uc_checkboxes($name, $curval, $optlist, null,false);
break;
case 'dropdown':
default:
return e107::getUserClass()->uc_dropdown($name,$curval,$options);
return e107::getUserClass()->uc_dropdown($name, $curval, $optlist, $opt);
break;
}