@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $zip = new ZipArchive; |
| 27 | 27 | if ($zip->open($archive) === true) { |
| 28 | - $zip->extractTo($destination . DS); |
|
| 28 | + $zip->extractTo($destination.DS); |
|
| 29 | 29 | $zip->close(); |
| 30 | 30 | return true; |
| 31 | 31 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function getCityByIp($ip) |
| 25 | 25 | { |
| 26 | - if(!$this->isFileExists()){ |
|
| 26 | + if (!$this->isFileExists()) { |
|
| 27 | 27 | return null; |
| 28 | 28 | } |
| 29 | 29 | $SxGeo = new GeoIP_SxGeo($this->local_file); |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function __construct() |
| 19 | 19 | { |
| 20 | - $this->local_dir = Mage::getBaseDir('var') . DS . 'geoip'; |
|
| 21 | - $this->local_file = $this->local_dir . DS . 'SxGeoCity.dat'; |
|
| 22 | - $this->local_archive = $this->local_dir . DS . 'SxGeoCity_utf8.zip'; |
|
| 20 | + $this->local_dir = Mage::getBaseDir('var').DS.'geoip'; |
|
| 21 | + $this->local_file = $this->local_dir.DS.'SxGeoCity.dat'; |
|
| 22 | + $this->local_archive = $this->local_dir.DS.'SxGeoCity_utf8.zip'; |
|
| 23 | 23 | $this->remote_archive = 'http://sypexgeo.net/files/SxGeoCity_utf8.zip'; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -17,15 +17,15 @@ |
||
| 17 | 17 | public function render(Varien_Data_Form_Element_Abstract $element) |
| 18 | 18 | { |
| 19 | 19 | if ($curl = curl_init()) { |
| 20 | - curl_setopt($curl, CURLOPT_URL, 'http://www.mygento.ru/extension/module/index/name/' . $this->_name . '/version/' . Mage::getConfig()->getNode('modules/' . $this->_full . '/version')); |
|
| 20 | + curl_setopt($curl, CURLOPT_URL, 'http://www.mygento.ru/extension/module/index/name/'.$this->_name.'/version/'.Mage::getConfig()->getNode('modules/'.$this->_full.'/version')); |
|
| 21 | 21 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
| 22 | 22 | $data = json_decode(curl_exec($curl)); |
| 23 | 23 | curl_close($curl); |
| 24 | 24 | } |
| 25 | - $info = '<fieldset class="config' . (!$data->result ? ' success-msg' : ' error-msg') . '" style="padding-left:30px;">' . |
|
| 26 | - '<img src="//www.mygento.ru/media/favicon/default/favicon.png" width="16" height="16" />' . |
|
| 27 | - $this->__('Mygento GeoIP version: %s', Mage::getConfig()->getNode('modules/' . $this->_full . '/version')); |
|
| 28 | - $info.='<a style="float:right" target="_blank" href="' . $this->_url . '">' . ($data->result ? $this->__('Check for update') . ' [' . $data->version . ']' : $this->__('Module page')) . '</a></fieldset>'; |
|
| 25 | + $info = '<fieldset class="config'.(!$data->result ? ' success-msg' : ' error-msg').'" style="padding-left:30px;">'. |
|
| 26 | + '<img src="//www.mygento.ru/media/favicon/default/favicon.png" width="16" height="16" />'. |
|
| 27 | + $this->__('Mygento GeoIP version: %s', Mage::getConfig()->getNode('modules/'.$this->_full.'/version')); |
|
| 28 | + $info .= '<a style="float:right" target="_blank" href="'.$this->_url.'">'.($data->result ? $this->__('Check for update').' ['.$data->version.']' : $this->__('Module page')).'</a></fieldset>'; |
|
| 29 | 29 | return $info; |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -32,6 +32,6 @@ |
||
| 32 | 32 | } else { |
| 33 | 33 | $date = '-'; |
| 34 | 34 | } |
| 35 | - return '<div id="sync_update_date">' . $date . '</div>'; |
|
| 35 | + return '<div id="sync_update_date">'.$date.'</div>'; |
|
| 36 | 36 | } |
| 37 | 37 | } |