/**
  * Constructor
  */
 public function __construct(&$request)
 {
     # overwrite action parameter
     $_REQUEST['action'] = 'submit';
     # and call parent
     parent::__construct($request);
 }
 public function __construct($options = array())
 {
     // basically we want to map filenames to session keys here somehow
     global $wgMaxUploadFiles;
     $this->mDestFiles = array();
     for ($i = 0; $i < $wgMaxUploadFiles; $i++) {
         $this->mDestFiles[$i] = $options['destfile' . $i];
     }
     $this->mSessionKeys = array();
     foreach ($options as $k => $v) {
         if (preg_match("@^sessionkey@", $k)) {
             $this->mSessionKeys[$k] = $v;
         }
     }
     parent::__construct($options);
 }