Changeset 1905:d72d24250853 for inc
- Timestamp:
- 09/16/13 13:28:17 (12 years ago)
- Branch:
- actionsreloaded
- Children:
- 1999:a0ed28c2da5a, 2037:cdcd97549428
- Location:
- inc
- Files:
-
- 1 added
- 3 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 } -
inc/admin/lib.pager.php
r1670 r1905 257 257 $pager->html_next = $this->html_next; 258 258 $pager->var_page = 'page'; 259 259 $comments = array(); 260 if (isset($_REQUEST['comments'])) { 261 foreach ($_REQUEST['comments'] as $v) { 262 $comments[(integer)$v]=true; 263 } 264 } 260 265 $html_block = 261 266 '<table><caption class="hidden">'.__('Comments and trackbacks list').'</caption><tr>'. … … 279 284 while ($this->rs->fetch()) 280 285 { 281 echo $this->commentLine( );286 echo $this->commentLine(isset($comments[$this->rs->comment_id])); 282 287 } 283 288 … … 288 293 } 289 294 290 private function commentLine( )295 private function commentLine($checked) 291 296 { 292 297 global $author, $status, $sortby, $order, $nb_per_page; … … 336 341 $res .= 337 342 '<td class="nowrap">'. 338 form::checkbox(array('comments[]'),$this->rs->comment_id, '','','',0).'</td>'.343 form::checkbox(array('comments[]'),$this->rs->comment_id,$checked,'','',0).'</td>'. 339 344 '<td class="nowrap" abbr="'.__('Type and author').'" scope="raw">'. 340 345 '<a href="'.$comment_url.'" title="'.$comment_title.'">'. -
inc/prepend.php
r1806 r1905 65 65 $__autoload['dcUrlHandlers'] = dirname(__FILE__).'/public/lib.urlhandlers.php'; 66 66 $__autoload['dcPostsActionsPage'] = dirname(__FILE__).'/admin/actions/class.dcactionposts.php'; 67 $__autoload['dcCommentsActionsPage'] = dirname(__FILE__).'/admin/actions/class.dcactioncomments.php'; 67 68 $__autoload['dcActionsPage'] = dirname(__FILE__).'/admin/actions/class.dcaction.php'; 68 69
Note: See TracChangeset
for help on using the changeset viewer.