Dotclear

Changeset 1807:281c64233f6d


Ignore:
Timestamp:
09/13/13 11:48:26 (12 years ago)
Author:
Dsls
Branch:
actionsreloaded
Message:

Made it possible to update $_POST internally.

File:
1 edited

Legend:

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

    r1806 r1807  
    3636     /** @var string current action, if any */ 
    3737     protected $action; 
     38     /** @var array list of url parameters (usually $_POST) */ 
     39     protected $from; 
    3840      
    3941     /** @var string title for checkboxes list, if displayed */ 
     
    5961          $this->action = ''; 
    6062          $this->cb_title = __('Title'); 
     63          $this->from = new ArrayObject($_POST); 
    6164     } 
    6265      
     
    240243     */ 
    241244     public function process() { 
    242           $from = new ArrayObject($_POST); 
    243           $this->setupRedir($from); 
    244           $this->fetchEntries($from);    
    245           if (isset($from['action'])) { 
    246                $this->action = $from['action']; 
     245 
     246          $this->setupRedir($this->from); 
     247          $this->fetchEntries($this->from);   
     248          if (isset($this->from['action'])) { 
     249               $this->action = $this->from['action']; 
    247250               try { 
    248251                    $performed=false; 
    249252                    foreach ($this->actions as $k=>$v) { 
    250                          if ($from['action']==$k) { 
     253                         if ($this->from['action']==$k) { 
    251254                              $performed = true; 
    252                               call_user_func($v,$this->core,$this,$from); 
     255                              call_user_func($v,$this->core,$this,$this->from); 
    253256                         } 
    254257                    } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map