Changeset 517:7a334cf98e87 for inc/admin
- Timestamp:
- 07/06/11 08:58:51 (14 years ago)
- Branch:
- formfilters
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.filter.php
r506 r517 169 169 $ret .= $filter->getFormLine(); 170 170 } 171 $form_combo[$filter-> desc]=$filter->id;171 $form_combo[$filter->name]=$filter->id; 172 172 $count++; 173 173 } … … 237 237 */ 238 238 abstract class Filter { 239 public $id; ///< <b>string</b> field id (local to fieldset) 240 public $desc; ///< <b>string</b> field description 241 protected $request_param; ///< <b>string</b> resulting parameter array key 242 protected $enabled; ///< <b>string</b> true if filter is enabled 243 protected $values; ///< <b>array</b> possible filter values 244 public $field_id; ///< <b>string</b> field id (global to the page) 239 public $id; ///<b>string</b> field id (local to fieldset) 240 public $name; ///<b>string</b> filter name 241 public $desc; ///<b>string</b> field description 242 protected $request_param; ///<b>string</b> resulting parameter array key 243 protected $enabled; ///<b>string</b> true if filter is enabled 244 protected $values; ///<b>array</b> possible filter values 245 public $field_id; ///<b>string</b> field id (global to the page) 245 246 246 247 /** … … 250 251 @param form_prefix <b>string</b> form prefix to use for parameters 251 252 */ 252 public function __construct ($id,$ desc,$request_param) {253 public function __construct ($id,$name,$desc,$request_param) { 253 254 $this->id = $id; 255 $this->name=$name; 254 256 $this->desc = $desc; 255 257 $this->request_param = $request_param; … … 413 415 protected $extra; 414 416 415 public function __construct($id,$ desc,$request_param,$options,$extra=array()) {416 parent::__construct($id,$ desc,$request_param);417 public function __construct($id,$name,$desc,$request_param,$options,$extra=array()) { 418 parent::__construct($id,$name,$desc,$request_param); 417 419 $this->options = $options; 418 420 $this->extra = $extra; … … 496 498 protected $options; 497 499 498 public function __construct($id,$ desc,$request_param,$options,$extra=array()) {499 parent::__construct($id,$ desc,$request_param);500 public function __construct($id,$name,$desc,$request_param,$options,$extra=array()) { 501 parent::__construct($id,$name,$desc,$request_param); 500 502 $this->options = $options; 501 503 $this->values=array(); … … 508 510 public function add() { 509 511 parent::add(); 510 $this->values []=$options[0];512 $this->values=current($this->options); 511 513 } 512 514 … … 527 529 protected $max; 528 530 529 public function __construct($id,$ desc,$request_param,$size,$max) {530 parent::__construct($id,$ desc,$request_param);531 public function __construct($id,$name,$desc,$request_param,$size,$max) { 532 parent::__construct($id,$name,$desc,$request_param); 531 533 $this->options = $options; 532 534 $this->values=array();
Note: See TracChangeset
for help on using the changeset viewer.