/[drupal]/contributions/modules/ipaper/ipaper.module
ViewVC logotype

Diff of /contributions/modules/ipaper/ipaper.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.9, Mon Jun 16 00:19:40 2008 UTC revision 1.1.2.10, Tue Jun 17 05:35:37 2008 UTC
# Line 717  function _ipaper_request($request_url, $ Line 717  function _ipaper_request($request_url, $
717      return $data;      return $data;
718    }    }
719    else{    else{
   
     //I haven't yet figured out how to upload files via drupal_http_request  
     drupal_set_message("CURL is not enabled.", 'error');  
     return;  
   
     $data = NULL;  
720      $headers = array();      $headers = array();
721      if ($params['file']){      $data = NULL;
722        $headers = array('Content-Type' => 'multipart/form-data');      if ($method == "POST"){
723          require_once drupal_get_path('module', 'ipaper') .'/multipart.inc';
724          $boundary = 'A0sFSD';
725          $headers = array("Content-Type" => "multipart/form-data; boundary=$boundary");
726          $data = multipart_encode($boundary, $params);
727      }      }
728      $request = drupal_http_request($request_url, $headers, $method, http_build_query($params));      $request = drupal_http_request($request_url, $headers, $method, $data);
729      if ($request->error)      if ($request->error)
730        watchdog("ipaper", "Request failed - ". $request->error .' - '. http_build_query($params));        watchdog("ipaper", "Request failed - ". $request->error .' - '. http_build_query($params));
731        drupal_set_message($request->data);
732      return $request->data;      return $request->data;
733    }    }
734    

Legend:
Removed from v.1.1.2.9  
changed lines
  Added in v.1.1.2.10

  ViewVC Help
Powered by ViewVC 1.1.2