X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2FPlugin%2FSkel.php;h=19c58a8b32f8d0f41fab743e88b5e8230dbd07ba;hb=7aff44b2a3193e43aedfd7bf7fc3801bcffcf3e0;hp=f457c5d6ba308d6fd76d6e4d3bada5b177b16e36;hpb=16807ba08214124b17b1f14226be12cdd646adc1;p=diogenes.git diff --git a/include/Plugin/Skel.php b/include/Plugin/Skel.php index f457c5d..19c58a8 100644 --- a/include/Plugin/Skel.php +++ b/include/Plugin/Skel.php @@ -25,6 +25,7 @@ require_once 'Tree/Node.php'; define('PLUG_DISABLED', 0); define('PLUG_ACTIVE', 1); define('PLUG_LOCK', 2); +define('PLUG_SET', 4); /** Recursive stripslashes. * @@ -62,7 +63,7 @@ class Diogenes_Plugin_Skel { /** 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 @@ -77,7 +78,7 @@ class Diogenes_Plugin_Skel { */ function declareParam($key, $val) { - $this->params[$key] = $val; + $this->params[$key]['value'] = $val; } @@ -93,7 +94,7 @@ class Diogenes_Plugin_Skel { */ function getParamValue($key) { - return isset($this->params[$key]) ? $this->params[$key] : ''; + return isset($this->params[$key]['value']) ? $this->params[$key]['value'] : ''; } @@ -101,9 +102,8 @@ class Diogenes_Plugin_Skel { */ 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; } } @@ -136,7 +136,7 @@ class Diogenes_Plugin_Skel { $this->status = $plugentry['status']; foreach ($plugentry['params'] as $key => $val) { - $this->setParamValue($key, $val); + $this->setParamValue($key, $val['value']); } }