Skip to content

Commit fb143e4

Browse files
committed
Content type fix
1 parent 3863136 commit fb143e4

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

includes/classes/AmazonFeed.php

+21-11
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ class AmazonFeed extends AmazonFeedsCore{
2828
protected $response;
2929
protected $feedContent;
3030
protected $feedMD5;
31-
31+
3232
/**
3333
* AmazonFeed submits a Feed to Amazon.
34-
*
34+
*
3535
* The parameters are passed to the parent constructor, which are
3636
* in turn passed to the AmazonCore constructor. See it for more information
3737
* on these parameters and common methods.
38-
* @param string $s [optional] <p>Name for the store you want to use.
39-
* This parameter is optional if only one store is defined in the config file.</p>
4038
* @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
4139
* This defaults to <b>FALSE</b>.</p>
4240
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
4341
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
42+
* @internal param string $s [optional] <p>Name for the store you want to use.
43+
* This parameter is optional if only one store is defined in the config file.</p>
4444
*/
45-
public function __construct($s = null, $mock = false, $m = null, $config = null){
46-
parent::__construct($s, $mock, $m, $config);
45+
public function __construct($mock = false, $m = null, $config = null){
46+
parent::__construct($m, $config);
4747
include($this->env);
4848

4949
$this->options['Action'] = 'SubmitFeed';
@@ -293,16 +293,18 @@ protected function parseXML($xml){
293293

294294
$this->log("Successfully submitted feed #".$this->response['FeedSubmissionId'].' ('.$this->response['FeedType'].')');
295295
}
296-
296+
297297
/**
298298
* Generates array for Header.
299-
*
299+
*
300300
* This method creates the Header array to use with cURL. It contains the Content MD5.
301301
* @return array
302302
*/
303303
protected function genHeader(){
304-
$return[0] = "Content-MD5:".$this->feedMD5;
305-
return $return;
304+
return [
305+
"Content-Type: text/xml",
306+
"Content-MD5:" . $this->feedMD5,
307+
];
306308
}
307309

308310
/**
@@ -325,7 +327,15 @@ public function getResponse(){
325327
}
326328
}
327329

330+
/**
331+
*
332+
* Returns currently set feed content
333+
* @return mixed
334+
*/
335+
public function getFeedContent(){
336+
return $this->feedContent;
337+
}
328338

329339

330340
}
331-
?>
341+
?>

0 commit comments

Comments
 (0)