Dotclear


Ignore:
Timestamp:
09/16/13 13:28:17 (12 years ago)
Author:
Dsls
Branch:
actionsreloaded
Children:
1999:a0ed28c2da5a, 2037:cdcd97549428
Message:

RIP admin/comments_actions.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcaction.php

    r1903 r1905  
    3838     /** @var array list of url parameters (usually $_POST) */ 
    3939     protected $from; 
     40     /** @var string form field name for "entries" (usually "entries") */ 
     41     protected $field_entries; 
    4042      
    4143     /** @var string title for checkboxes list, if displayed */ 
     
    6365          $this->entries = array(); 
    6466          $this->from = new ArrayObject($_POST); 
     67          $this->field_entries = 'entries'; 
    6568     } 
    6669      
     
    8891                    $this->combo[$k] = array_merge ($this->combo[$k],$a); 
    8992               } elseif ($a instanceof formSelectOption) { 
    90                     $values = $a->value; 
     93                    $values = array($a->value); 
    9194                    $this->combo[$k] = $a->value; 
    9295               } else { 
    93                     $values = $a; 
     96                    $values = array($a); 
    9497                    $this->combo[$k] = $a; 
    9598               } 
     
    135138          $ret = ''; 
    136139          foreach  ($this->entries as $id->$v) { 
    137                $ret .= form::hidden('entries[]',$id); 
     140               $ret .= form::hidden($this->field_entries.'[]',$id); 
    138141          } 
    139142          return $ret; 
     
    206209          $redir_args = array_merge($params,$this->redir_args); 
    207210          if ($with_selected_entries) { 
    208                $redir_args['entries'] = array_keys($this->entries); 
     211               $redir_args[$this->field_entries] = array_keys($this->entries); 
    209212          } 
    210213          return $this->uri.'?'.http_build_query($redir_args); 
     
    282285               $ret .=  
    283286                    '<tr><td>'. 
    284                     form::checkbox(array('entries[]'),$id,true,'','').'</td>'. 
     287                    form::checkbox(array($this->field_entries.'[]'),$id,true,'','').'</td>'. 
    285288                    '<td>'.   $title.'</td></tr>'; 
    286289          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map