}\r
\r
// retreive any metadata\r
- $meta = NucleusPlugin::getOptionMeta($info->oextra);\r
+ $meta = NucleusPlugin::getOptionMeta($result['oextra']);\r
\r
// if the option is readonly or hidden it may not be saved\r
if ( array_key_exists('access', $meta)\r
'context' => $result['ocontext'],\r
'plugid' => $result['opid'],\r
'optionname' => $result['oname'],\r
- 'contextid' => $contextid,\r
- 'value' => &$value);\r
+ 'contextid' => $contextid,\r
+ 'value' => &$value);\r
$manager->notify('PrePluginOptionsUpdate', $data);\r
\r
// delete and insert its fields of table in database\r
$query = "INSERT INTO %s (oid, ocontextid, ovalue) VALUES (%d, %d, %s);";\r
$query = sprintf($query, sql_table('plugin_option'), (integer) $oid, (integer) $contextid, DB::quoteValue($value));\r
DB::execute($query);\r
+ \r
+ // clear option value cache if the plugin object is already loaded\r
+ $plugin=& $manager->pidLoaded($result['opid']);\r
+ if ( $plugin )\r
+ {\r
+ $plugin->clearOptionValueCache();\r
+ }\r
+ \r
+ continue;\r
}\r
}\r
- // clear option value cache if the plugin object is already loaded\r
- if ( is_object($info) )\r
- {\r
- $plugin=& $manager->pidLoaded($result['opid']);\r
- if ( $plugin )\r
- {\r
- $plugin->clearOptionValueCache();\r
- }\r
- }\r
+ continue;\r
}\r
return;\r
}\r