define('PLUG_DISABLED', 0);
define('PLUG_ACTIVE', 1);
define('PLUG_LOCK', 2);
+define('PLUG_SET', 4);
/** Recursive stripslashes.
*
/** The plugin status (disabled, available, active) */
var $status = PLUG_DISABLED;
-
+
/** Is the plugin allowed with respect to a given write permission on a page ?
*
* @param $wperms
*/
function declareParam($key, $val)
{
- $this->params[$key] = $val;
+ $this->params[$key]['value'] = $val;
}
*/
function getParamValue($key)
{
- return isset($this->params[$key]) ? $this->params[$key] : '';
+ return isset($this->params[$key]['value']) ? $this->params[$key]['value'] : '';
}
*/
function setParamValue($key, $val)
{
- if (isset($this->params[$key])) {
- $this->params[$key] = $val;
- } else {
+ if (isset($this->params[$key]['value'])) {
+ $this->params[$key]['value'] = $val;
}
}
$this->status = $plugentry['status'];
foreach ($plugentry['params'] as $key => $val)
{
- $this->setParamValue($key, $val);
+ $this->setParamValue($key, $val['value']);
}
}