Example #1
0
 public function xfer($uri, $vars = array(), $files = array(), $mustbeposted = false)
 {
     foreach ($this->exchanger_params as $name => $value) {
         if ($this->parm->is_paramname_ok($name)) {
             $this->parm->set_param($name, $value);
         }
     }
     if (!$this->parm->param_isset('format')) {
         $this->set_param('format', $this->default_format);
     }
     return parent::xfer($uri, $vars, $files, $mustbeposted);
 }
Example #2
0
 public function nohooks__xfer($hook_object, $vars, $files = array(), $mustbeposted = false)
 {
     if (!$mustbeposted) {
         return parent::xfer($vars, $files, $mustbeposted);
     }
     $temp_url = $this->url;
     $url_params = array();
     if (isset($vars['title'])) {
         $url_params['title'] = 'title=' . urlencode(str_replace(' ', '_', $vars['title']));
         unset($vars['title']);
     }
     if (isset($vars['action'])) {
         $url_params['action'] = 'action=' . urlencode($vars['action']);
         unset($vars['action']);
     }
     $url_paramstring = implode('&', $url_params);
     if (!empty($url_paramstring)) {
         $this->url .= "?" . $url_paramstring;
     }
     $result = parent::xfer($vars, $files, $mustbeposted);
     $this->url = $temp_url;
     return $result;
 }