Commit f1f77248 authored by Donal McMullan's avatar Donal McMullan
Browse files

Fix for xmlrpc auth on upgraded (0.7.4 -> 0/8) Maharas

parent b71458e4
......@@ -515,13 +515,22 @@ class PluginAuthXmlrpc extends PluginAuth {
'help' => true
);
/**
* empty($peer->appname) would ALWAYS return true, because the property doesn't really
* exist. When we try to get $peer->appname, we're actually calling the peer class's
* __get overloader. Unfortunately, the 'empty' function seems to just check for the
* existence of the property - it doesn't call the overloader. Bug or feature?
*/
$tmpappname = $peer->appname;
$elements['appname'] = array(
'type' => 'select',
'title' => get_string('application','auth'),
'collapseifoneoption' => true,
'multiple' => false,
'options' => $apparray,
'defaultvalue' => empty($peer->appname)? key($apparray) : $peer->appname,
'defaultvalue' => empty($tmpappname)? key($apparray) : $tmpappname,
'help' => true
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment