Changeset 517:7a334cf98e87
- Timestamp:
- 07/06/11 08:58:51 (14 years ago)
- Branch:
- formfilters
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/comments.php
r506 r517 74 74 75 75 $authorFilter = new textFilter( 76 'author',__('Author'), 'q_author',20,255);76 'author',__('Author'), __('Author'),'q_author',20,255); 77 77 $filterSet 78 78 ->addFilter(new comboFilter( 79 'status',__('Status'), 'comment_status', $status_combo))79 'status',__('Status'), __('Status'), 'comment_status', $status_combo)) 80 80 ->addFilter(new booleanFilter( 81 'type',__('Type'), 'comment_trackback', $type_combo))81 'type',__('Type'), __('Type'), 'comment_trackback', $type_combo)) 82 82 ->addFilter($authorFilter) 83 83 ->addFilter(new textFilter( 84 'ip',__('IP address'), 'comment_ip',20,39));84 'ip',__('IP address'), __('IP address'), 'comment_ip',20,39)); 85 85 86 86 $core->callBehavior('adminCommentsFilters',$filterSet); -
admin/posts.php
r509 r517 152 152 $filterSet 153 153 ->addFilter(new comboFilter( 154 'users',__('Author'), 'user_id', $users_combo))155 ->addFilter(new comboFilter( 156 'category',__('Category'), 'cat_id', $categories_combo))157 ->addFilter(new comboFilter( 158 'post_status',__('Status'), 'post_status', $status_combo))154 'users',__('Author'), __('Author'), 'user_id', $users_combo)) 155 ->addFilter(new comboFilter( 156 'category',__('Category'), __('Category'), 'cat_id', $categories_combo)) 157 ->addFilter(new comboFilter( 158 'post_status',__('Status'), __('Status'), 'post_status', $status_combo)) 159 159 ->addFilter(new booleanFilter( 160 'post_selected',__(' The post :'),'post_selected', $selected_combo))161 ->addFilter(new comboFilter( 162 'lang',__('Lang'), 'post_lang', $lang_combo))160 'post_selected',__('Selected'), __('The post : '),'post_selected', $selected_combo)) 161 ->addFilter(new comboFilter( 162 'lang',__('Lang'), __('Lang'), 'post_lang', $lang_combo)) 163 163 ->addFilter(new monthComboFilter( 164 'month',__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1)));164 'month',__('Month'),__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1))); 165 165 166 166 $core->callBehavior('adminPostsFilters',$filterSet); -
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.