minewhat - Version 1.0.16

Version Notes

MineWhat magento plugin

Download this release

Release Info

Developer MineWhat Inc.
Extension minewhat
Version 1.0.16
Comparing to
See all releases


Code changes from version 1.0.15 to 1.0.16

app/code/community/MineWhat/Insights/controllers/ApiController.php CHANGED
@@ -25,15 +25,20 @@ class MineWhat_Insights_ApiController extends Mage_Core_Controller_Front_Action
25
  return false;
26
  }
27
 
28
- $authHeader = $this->getRequest()->getHeader('authorization');
 
 
 
 
 
29
 
30
  if (!$authHeader) {
31
  Mage::log('Unable to extract authorization header from request', null, 'minewhat.log');
32
  // Internal server error
33
  $this->getResponse()
34
- ->setBody(json_encode(array('status' => 'error', 'message' => 'Internal server error')))
35
- ->setHttpResponseCode(500)
36
- ->setHeader('Content-type', 'application/json', true);
37
  return false;
38
  }
39
 
25
  return false;
26
  }
27
 
28
+ $authHeader = $this->getRequest()->getHeader('mwauth');
29
+
30
+ // fallback
31
+ if (!$authHeader || strlen($authHeader) == 0) {
32
+ $authHeader = $this->getRequest()->getParam('mwauth');
33
+ }
34
 
35
  if (!$authHeader) {
36
  Mage::log('Unable to extract authorization header from request', null, 'minewhat.log');
37
  // Internal server error
38
  $this->getResponse()
39
+ ->setBody(json_encode(array('status' => 'error', 'message' => 'Internal server error, Authorization header not found')))
40
+ ->setHttpResponseCode(500)
41
+ ->setHeader('Content-type', 'application/json', true);
42
  return false;
43
  }
44
 
app/code/community/MineWhat/Insights/etc/system.xml CHANGED
@@ -44,7 +44,7 @@
44
  <show_in_store>1</show_in_store>
45
  </base_script>
46
  <api_key translate="label">
47
- <label>Api Key</label>
48
  <frontend_type>text</frontend_type>
49
  <sort_order>20</sort_order>
50
  <show_in_default>1</show_in_default>
44
  <show_in_store>1</show_in_store>
45
  </base_script>
46
  <api_key translate="label">
47
+ <label>Domain Key</label>
48
  <frontend_type>text</frontend_type>
49
  <sort_order>20</sort_order>
50
  <show_in_default>1</show_in_default>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>minewhat</name>
4
- <version>1.0.15</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">osl</license>
7
  <channel>community</channel>
@@ -10,8 +10,8 @@
10
  <description>MineWhat Insights</description>
11
  <notes>MineWhat magento plugin</notes>
12
  <authors><author><name>MineWhat Inc.</name><user>MineWhat</user><email>plugins@minewhat.com</email></author></authors>
13
- <date>2014-10-13</date>
14
- <time>12:33:03</time>
15
  <contents><target name="magecommunity"><dir name="MineWhat"><dir name="Insights"><dir name="Block"><dir name="Base"><file name="Script.php" hash="dd44e43a5954e82cfa5cf47921642624"/></dir><dir name="Event"><dir name="Catalog"><dir name="Product"><file name="View.php" hash="41eb512f4f77a8e127253cf246587f0c"/></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Index.php" hash="fafaf6953262ea2b0bc3092d538c30d1"/></dir><dir name="Onepage"><file name="Success.php" hash="3113839e3b8e2a3f9b75e21f26e7909f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="c9284d372a18c6db27dec077c04296ff"/></dir><dir name="Model"><file name="Observer.php" hash="8f8ffe64147205aebc15670bc819ccb5"/></dir><dir name="controllers"><file name="ApiController.php" hash="486db1b0ab4919ccbc1b8c10c730adc4"/><file name=".DS_Store" hash="bd846b4e5462712bd0f45cffeb689332"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f1fb655aac4dc7f71cadb6c7a7e816f8"/><file name="config.xml" hash="b4443479201149d5ee72c95ca6ffaae5"/><file name="system.xml" hash="d35bf488b0be559ca5cba14633d40b77"/></dir><file name=".DS_Store" hash="3036b74de2dd23100e10bef959e8151e"/></dir><file name=".DS_Store" hash="abac802fc3edbab84baea3833903cfd2"/></dir></target><target name="mageetc"><dir name="modules"><file name="MineWhat_Insights.xml" hash="8d2f076cbfcc14688ed800f622869d4b"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="minewhat"><dir name="insights"><dir name="base"><file name="script.phtml" hash="fe16e289984308941fb830bc97e7cad2"/></dir><dir name="event"><dir name="catalog"><dir name="product"><file name="view.phtml" hash="f4a801140203b524d44a23ac83e5873a"/></dir></dir><dir name="checkout"><dir name="cart"><file name="index.phtml" hash="16cf404c9684e5839270fb0931e8fb3b"/></dir><dir name="onepage"><file name="success.phtml" hash="2e57c97e161ae46db821daba8f421aa5"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="minewhat_insights.xml" hash="42a313f2e0ee3792f814abec37227ee0"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="minewhat"><dir name="insights"><dir name="base"><file name="script.phtml" hash="fe16e289984308941fb830bc97e7cad2"/></dir><dir name="event"><dir name="catalog"><dir name="product"><file name="view.phtml" hash="f4a801140203b524d44a23ac83e5873a"/></dir></dir><dir name="checkout"><dir name="cart"><file name="index.phtml" hash="16cf404c9684e5839270fb0931e8fb3b"/></dir><dir name="onepage"><file name="success.phtml" hash="d65f509768987584e0ea8e85745c1ffe"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="minewhat_insights.xml" hash="42a313f2e0ee3792f814abec37227ee0"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.5</min><max>6.0.0</max></php></required></dependencies>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>minewhat</name>
4
+ <version>1.0.16</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">osl</license>
7
  <channel>community</channel>
10
  <description>MineWhat Insights</description>
11
  <notes>MineWhat magento plugin</notes>
12
  <authors><author><name>MineWhat Inc.</name><user>MineWhat</user><email>plugins@minewhat.com</email></author></authors>
13
+ <date>2014-10-27</date>
14
+ <time>18:33:03</time>
15
  <contents><target name="magecommunity"><dir name="MineWhat"><dir name="Insights"><dir name="Block"><dir name="Base"><file name="Script.php" hash="dd44e43a5954e82cfa5cf47921642624"/></dir><dir name="Event"><dir name="Catalog"><dir name="Product"><file name="View.php" hash="41eb512f4f77a8e127253cf246587f0c"/></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Index.php" hash="fafaf6953262ea2b0bc3092d538c30d1"/></dir><dir name="Onepage"><file name="Success.php" hash="3113839e3b8e2a3f9b75e21f26e7909f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="c9284d372a18c6db27dec077c04296ff"/></dir><dir name="Model"><file name="Observer.php" hash="8f8ffe64147205aebc15670bc819ccb5"/></dir><dir name="controllers"><file name="ApiController.php" hash="486db1b0ab4919ccbc1b8c10c730adc4"/><file name=".DS_Store" hash="bd846b4e5462712bd0f45cffeb689332"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f1fb655aac4dc7f71cadb6c7a7e816f8"/><file name="config.xml" hash="b4443479201149d5ee72c95ca6ffaae5"/><file name="system.xml" hash="d35bf488b0be559ca5cba14633d40b77"/></dir><file name=".DS_Store" hash="3036b74de2dd23100e10bef959e8151e"/></dir><file name=".DS_Store" hash="abac802fc3edbab84baea3833903cfd2"/></dir></target><target name="mageetc"><dir name="modules"><file name="MineWhat_Insights.xml" hash="8d2f076cbfcc14688ed800f622869d4b"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="minewhat"><dir name="insights"><dir name="base"><file name="script.phtml" hash="fe16e289984308941fb830bc97e7cad2"/></dir><dir name="event"><dir name="catalog"><dir name="product"><file name="view.phtml" hash="f4a801140203b524d44a23ac83e5873a"/></dir></dir><dir name="checkout"><dir name="cart"><file name="index.phtml" hash="16cf404c9684e5839270fb0931e8fb3b"/></dir><dir name="onepage"><file name="success.phtml" hash="2e57c97e161ae46db821daba8f421aa5"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="minewhat_insights.xml" hash="42a313f2e0ee3792f814abec37227ee0"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="minewhat"><dir name="insights"><dir name="base"><file name="script.phtml" hash="fe16e289984308941fb830bc97e7cad2"/></dir><dir name="event"><dir name="catalog"><dir name="product"><file name="view.phtml" hash="f4a801140203b524d44a23ac83e5873a"/></dir></dir><dir name="checkout"><dir name="cart"><file name="index.phtml" hash="16cf404c9684e5839270fb0931e8fb3b"/></dir><dir name="onepage"><file name="success.phtml" hash="d65f509768987584e0ea8e85745c1ffe"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="minewhat_insights.xml" hash="42a313f2e0ee3792f814abec37227ee0"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.5</min><max>6.0.0</max></php></required></dependencies>