cvs: pear /HTML_QuickForm/QuickForm select.php
| From: | Bertrand Mansion | Date: | Tue, 18 Jun 2002 11:29:32 +0000 |
| Subject: | cvs: pear /HTML_QuickForm/QuickForm select.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4676@lists.php.net to get a copy of this message | ||
mansion Tue Jun 18 07:29:32 2002 EDT
Modified files:
/pear/HTML_QuickForm/QuickForm select.php
Log:
Important change in the API: loadArray now takes arrays key-value, not value-key anymore. This is
more logical.
Index: pear/HTML_QuickForm/QuickForm/select.php
diff -u pear/HTML_QuickForm/QuickForm/select.php:1.10 pear/HTML_QuickForm/QuickForm/select.php:1.11
--- pear/HTML_QuickForm/QuickForm/select.php:1.10 Fri Jun 14 15:20:26 2002
+++ pear/HTML_QuickForm/QuickForm/select.php Tue Jun 18 07:29:32 2002
@@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: select.php,v 1.10 2002/06/14 19:20:26 jrust Exp $
+// $Id: select.php,v 1.11 2002/06/18 11:29:32 mansion Exp $
require_once('DB.php');
require_once('HTML/QuickForm/element.php');
@@ -91,7 +91,7 @@
*/
function apiVersion()
{
- return 2.0;
+ return 2.3;
} //end func apiVersion
// }}}
@@ -328,7 +328,8 @@
$this->setSelected($values);
}
foreach ($arr as $key => $val) {
- $this->addOption($key, $val);
+ // Warning: new API since release 2.3
+ $this->addOption($val, $key);
}
return true;
} // end func loadArray
@@ -548,4 +549,4 @@
// }}}
} //end class HTML_QuickForm_select
-?>
+?>
\ No newline at end of file