Ecomwise_Forcelogin - Version 1.0.2

Version Notes

1.0.2

Download this release

Release Info

Developer EcomwiseTeam
Extension Ecomwise_Forcelogin
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Ecomwise/Base/Model/ExtensionsLicencer/Observer.php CHANGED
@@ -158,19 +158,7 @@ class Ecomwise_Base_Model_ExtensionsLicencer_Observer {
158
  }
159
 
160
  private function getIpAddress(){
161
- $ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');
162
- foreach ($ip_keys as $key){
163
- if (array_key_exists($key, $_SERVER) === true){
164
- foreach (explode(',', $_SERVER[$key]) as $ip){
165
- $ip = trim($ip);
166
- if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){
167
- return $ip;
168
- }
169
- }
170
- }
171
- }
172
-
173
- return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
174
  }
175
 
176
  private function getFrequency(){
158
  }
159
 
160
  private function getIpAddress(){
161
+ return isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : "";
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
 
164
  private function getFrequency(){
app/code/community/Ecomwise/Base/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ecomwise_Base>
5
- <version>1.0.0</version>
6
  </Ecomwise_Base>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Ecomwise_Base>
5
+ <version>1.0.1</version>
6
  </Ecomwise_Base>
7
  </modules>
8
  <global>
app/code/community/Ecomwise/Forcelogin/Model/Observer.php CHANGED
@@ -14,8 +14,10 @@ class Ecomwise_Forcelogin_Model_Observer extends Varien_Object{
14
  && Mage::app()->getRequest()->getModuleName() !== 'admin'
15
  && Mage::app()->getRequest()->getModuleName() !== 'api'
16
  && Mage::app()->getRequest()->getControllerName() !== 'account') {
17
- $session = Mage::getSingleton("customer/session");
18
- $session->setBeforeAuthUrl(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'home');
 
 
19
  Mage::app()->getResponse()
20
  ->setRedirect(Mage::helper('adminhtml')
21
  ->getUrl("customer/account/login", array('_type' => 'direct_link')));
14
  && Mage::app()->getRequest()->getModuleName() !== 'admin'
15
  && Mage::app()->getRequest()->getModuleName() !== 'api'
16
  && Mage::app()->getRequest()->getControllerName() !== 'account') {
17
+ $session = Mage::getSingleton("customer/session");
18
+
19
+ $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl());
20
+
21
  Mage::app()->getResponse()
22
  ->setRedirect(Mage::helper('adminhtml')
23
  ->getUrl("customer/account/login", array('_type' => 'direct_link')));
app/code/community/Ecomwise/Forcelogin/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ecomwise_Forcelogin>
5
- <version>1.0.1</version>
6
  </Ecomwise_Forcelogin>
7
 
8
  </modules>
2
  <config>
3
  <modules>
4
  <Ecomwise_Forcelogin>
5
+ <version>1.0.2</version>
6
  </Ecomwise_Forcelogin>
7
 
8
  </modules>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ecomwise_Forcelogin</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Ecomwise_Forcelogin</summary>
10
  <description>Ecomwise_Forcelogin</description>
11
- <notes>1.0.1</notes>
12
  <authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
13
- <date>2014-05-29</date>
14
- <time>15:05:38</time>
15
- <contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="05a3c4eaccc4d0ea3dfcb5c954fbfa0d"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="3eb70b9f2f5d52fb54335ad34ae4ebba"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="Forcelogin"><dir name="Block"><dir name="System"><dir name="Config"><file name="Version.php" hash="e5ea1ca5d03c0d3fce4f91144c35c05c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="529c0c5b3186eae81d6ee9a3fb900214"/></dir><dir name="Model"><file name="Observer.php" hash="40c979628682913861e6f2417dfba10c"/></dir><dir name="etc"><file name="config.xml" hash="d507b5d878792ccf777653cff2254767"/><file name="system.xml" hash="b82e942c9a5283d127120cd558753a9e"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ecomwise_Base.xml" hash=""/><file name="Ecomwise_Forcelogin.xml" hash=""/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ecomwise_Forcelogin</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Ecomwise_Forcelogin</summary>
10
  <description>Ecomwise_Forcelogin</description>
11
+ <notes>1.0.2</notes>
12
  <authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
13
+ <date>2014-11-19</date>
14
+ <time>09:44:40</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="e5ce78f2d1de491159194d5c26fa8338"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4233a2cbfb1c2b8a5de6ca8911955195"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="Forcelogin"><dir name="Block"><dir name="System"><dir name="Config"><file name="Version.php" hash="e5ea1ca5d03c0d3fce4f91144c35c05c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="529c0c5b3186eae81d6ee9a3fb900214"/></dir><dir name="Model"><file name="Observer.php" hash="fb304f4ebf0e4e54399cfd153f141387"/></dir><dir name="etc"><file name="config.xml" hash="59703a720b173e6eac5517e605ec04e0"/><file name="system.xml" hash="b82e942c9a5283d127120cd558753a9e"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ecomwise_Base.xml" hash=""/><file name="Ecomwise_Forcelogin.xml" hash=""/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
18
  </package>