Changeset 1905:d72d24250853 for inc/admin/actions/class.dcaction.php
- Timestamp:
- 09/16/13 13:28:17 (12 years ago)
- Branch:
- actionsreloaded
- Children:
- 1999:a0ed28c2da5a, 2037:cdcd97549428
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/actions/class.dcaction.php
r1903 r1905 38 38 /** @var array list of url parameters (usually $_POST) */ 39 39 protected $from; 40 /** @var string form field name for "entries" (usually "entries") */ 41 protected $field_entries; 40 42 41 43 /** @var string title for checkboxes list, if displayed */ … … 63 65 $this->entries = array(); 64 66 $this->from = new ArrayObject($_POST); 67 $this->field_entries = 'entries'; 65 68 } 66 69 … … 88 91 $this->combo[$k] = array_merge ($this->combo[$k],$a); 89 92 } elseif ($a instanceof formSelectOption) { 90 $values = $a->value;93 $values = array($a->value); 91 94 $this->combo[$k] = $a->value; 92 95 } else { 93 $values = $a;96 $values = array($a); 94 97 $this->combo[$k] = $a; 95 98 } … … 135 138 $ret = ''; 136 139 foreach ($this->entries as $id->$v) { 137 $ret .= form::hidden( 'entries[]',$id);140 $ret .= form::hidden($this->field_entries.'[]',$id); 138 141 } 139 142 return $ret; … … 206 209 $redir_args = array_merge($params,$this->redir_args); 207 210 if ($with_selected_entries) { 208 $redir_args[ 'entries'] = array_keys($this->entries);211 $redir_args[$this->field_entries] = array_keys($this->entries); 209 212 } 210 213 return $this->uri.'?'.http_build_query($redir_args); … … 282 285 $ret .= 283 286 '<tr><td>'. 284 form::checkbox(array( 'entries[]'),$id,true,'','').'</td>'.287 form::checkbox(array($this->field_entries.'[]'),$id,true,'','').'</td>'. 285 288 '<td>'. $title.'</td></tr>'; 286 289 }
Note: See TracChangeset
for help on using the changeset viewer.