diff --git a/app/code/community/Doofinder/Feed/Block/Adminhtml/Log/View.php b/app/code/community/Doofinder/Feed/Block/Adminhtml/Log/View.php
index 5545ea3f..026e7269 100644
--- a/app/code/community/Doofinder/Feed/Block/Adminhtml/Log/View.php
+++ b/app/code/community/Doofinder/Feed/Block/Adminhtml/Log/View.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Adminhtml_Log_View extends Mage_Adminhtml_Block_Widget_Grid
diff --git a/app/code/community/Doofinder/Feed/Block/Adminhtml/Map/Additional.php b/app/code/community/Doofinder/Feed/Block/Adminhtml/Map/Additional.php
index ce3c8f5c..da251c5d 100644
--- a/app/code/community/Doofinder/Feed/Block/Adminhtml/Map/Additional.php
+++ b/app/code/community/Doofinder/Feed/Block/Adminhtml/Map/Additional.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Adminhtml_Map_Additional extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Integration.php b/app/code/community/Doofinder/Feed/Block/Integration.php
index 91fd890b..aead92c2 100644
--- a/app/code/community/Doofinder/Feed/Block/Integration.php
+++ b/app/code/community/Doofinder/Feed/Block/Integration.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Integration extends Mage_Core_Block_Abstract
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Buttons/Generate.php b/app/code/community/Doofinder/Feed/Block/Settings/Buttons/Generate.php
index 5a0819be..18c6d09e 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Buttons/Generate.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Buttons/Generate.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Buttons_Generate extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Buttons/ViewLog.php b/app/code/community/Doofinder/Feed/Block/Settings/Buttons/ViewLog.php
index e64b8320..f4dbe1c1 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Buttons/ViewLog.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Buttons/ViewLog.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Buttons_ViewLog extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Crondescription.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Crondescription.php
index e2822eb0..0f757dcd 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Crondescription.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Crondescription.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_CronDescription extends Doofinder_Feed_Block_Settings_Panel_Description
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Datetime.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Datetime.php
index 5adde072..f85f9f5a 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Datetime.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Datetime.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_Datetime extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Description.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Description.php
index 96e3617d..727b9917 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Description.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Description.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_Description extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/File.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/File.php
index 70dfb0be..86b6ab95 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/File.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/File.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_File extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Layerdescription.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Layerdescription.php
index e9897d89..598c524c 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Layerdescription.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Layerdescription.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_LayerDescription extends Doofinder_Feed_Block_Settings_Panel_Description
diff --git a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Message.php b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Message.php
index 9245c382..40be1ae5 100644
--- a/app/code/community/Doofinder/Feed/Block/Settings/Panel/Message.php
+++ b/app/code/community/Doofinder/Feed/Block/Settings/Panel/Message.php
@@ -6,7 +6,7 @@
/**
* @category blocks
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Block_Settings_Panel_Message extends Mage_Adminhtml_Block_System_Config_Form_Field
diff --git a/app/code/community/Doofinder/Feed/Helper/Data.php b/app/code/community/Doofinder/Feed/Helper/Data.php
index 20d19294..8636a08d 100644
--- a/app/code/community/Doofinder/Feed/Helper/Data.php
+++ b/app/code/community/Doofinder/Feed/Helper/Data.php
@@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Data helper for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Data extends Mage_Core_Helper_Abstract
@@ -404,14 +404,18 @@ public function getStoreConfig($storeCode = '', $withPassword = true) {
* Process xml filename
* @param string $name = 'doofinder-{store_code}.xml'
* @param string $code = 'default'
- * @param boolean $withPassword = true
+ * @param string|boolean $password = true
* @return bool
*/
- private function _processXmlName($name = 'doofinder-{store_code}.xml', $code = 'default', $withPassword = true) {
+ private function _processXmlName($name = 'doofinder-{store_code}.xml', $code = 'default', $password = true) {
$pattern = '/\{\s*store_code\s*\}/';
+ if ($password === true) {
+ $password = Mage::getStoreConfig('doofinder_cron/feed_settings/password', $storeCode);
+ }
+
$replacement = $code;
- if ($withPassword && ($password = Mage::getStoreConfig('doofinder_cron/feed_settings/password', $code))) {
+ if ($password && strlen($password)) {
$replacement .= '-' . $password;
}
@@ -419,6 +423,39 @@ private function _processXmlName($name = 'doofinder-{store_code}.xml', $code = '
return $newName;
}
+ /**
+ * Change feed file password
+ *
+ * @param string $storeCode
+ * @param string $oldPassword
+ * @param string $newPassword
+ */
+ public function changeXmlPassword($storeCode, $oldPassword, $newPassword) {
+ $xmlName = Mage::getStoreConfig('doofinder_cron/schedule_settings/name', $storeCode);
+ $dir = $this->getFeedDirectory();
+
+ $oldFilepath = $dir . DS . $this->_processXmlName($xmlName, $storeCode, $oldPassword);
+ $newFilename = $this->_processXmlName($xmlName, $storeCode, $newPassword);
+ $newFilepath = $dir . DS . $newFilename;
+
+ if (file_exists($oldFilepath)) {
+ if (!file_exists($newFilepath) && !rename($oldFilepath, $newFilepath)) {
+ throw new \Magento\Framework\Exception\LocalizedException(__(
+ 'Feed file could not be renamed accordingly to new %s value because file permission issues or file with name %s already exists.',
+ $this->getData('field_config/label'),
+ $newFilename
+ ));
+ }
+
+ $process = Mage::getModel('doofinder_feed/cron')->load($storeCode, 'store_code');
+ if ($process->getId()) {
+ $process
+ ->setLastFeedName($newFilename)
+ ->save();
+ }
+ }
+ }
+
/**
* Create cron expr string
* @param string $time
diff --git a/app/code/community/Doofinder/Feed/Helper/Log.php b/app/code/community/Doofinder/Feed/Helper/Log.php
index b7e94b40..60e05d17 100644
--- a/app/code/community/Doofinder/Feed/Helper/Log.php
+++ b/app/code/community/Doofinder/Feed/Helper/Log.php
@@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Log helper for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Log extends Mage_Core_Helper_Abstract
diff --git a/app/code/community/Doofinder/Feed/Helper/Tax.php b/app/code/community/Doofinder/Feed/Helper/Tax.php
index bc4d0c61..1f9a903f 100644
--- a/app/code/community/Doofinder/Feed/Helper/Tax.php
+++ b/app/code/community/Doofinder/Feed/Helper/Tax.php
@@ -6,13 +6,13 @@
/**
* @category Helpers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Tax helper for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Helper_Tax extends Mage_Tax_Helper_Data
diff --git a/app/code/community/Doofinder/Feed/Model/Adminhtml/System/Config/Backend/Cron.php b/app/code/community/Doofinder/Feed/Model/Adminhtml/System/Config/Backend/Cron.php
index 9881a5e0..bd306381 100644
--- a/app/code/community/Doofinder/Feed/Model/Adminhtml/System/Config/Backend/Cron.php
+++ b/app/code/community/Doofinder/Feed/Model/Adminhtml/System/Config/Backend/Cron.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Adminhtml_System_Config_Backend_Cron extends Mage_Core_Model_Config_Data {
diff --git a/app/code/community/Doofinder/Feed/Model/Config.php b/app/code/community/Doofinder/Feed/Model/Config.php
index 115dfc00..5ef57f8b 100644
--- a/app/code/community/Doofinder/Feed/Model/Config.php
+++ b/app/code/community/Doofinder/Feed/Model/Config.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Config model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Config extends Mage_Core_Model_Config_Data
diff --git a/app/code/community/Doofinder/Feed/Model/Cron.php b/app/code/community/Doofinder/Feed/Model/Cron.php
index d6659476..e74adf12 100644
--- a/app/code/community/Doofinder/Feed/Model/Cron.php
+++ b/app/code/community/Doofinder/Feed/Model/Cron.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Cron extends Mage_Core_Model_Abstract {
diff --git a/app/code/community/Doofinder/Feed/Model/Generator.php b/app/code/community/Doofinder/Feed/Model/Generator.php
index bfe80262..bfe13718 100644
--- a/app/code/community/Doofinder/Feed/Model/Generator.php
+++ b/app/code/community/Doofinder/Feed/Model/Generator.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Generator model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
if (!defined('DS'))
diff --git a/app/code/community/Doofinder/Feed/Model/Log.php b/app/code/community/Doofinder/Feed/Model/Log.php
index 6a7ed359..4234d11f 100644
--- a/app/code/community/Doofinder/Feed/Model/Log.php
+++ b/app/code/community/Doofinder/Feed/Model/Log.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Log extends Mage_Core_Model_Abstract {
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Abstract.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Abstract.php
index c32b87e9..152caccc 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Abstract.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Abstract.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Abstract Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Abstract extends Varien_Object
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Associated.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Associated.php
index ffa78507..790f3a79 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Associated.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Associated.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Associated Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Associated
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Bundle.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Bundle.php
index 762c8e10..5b73348a 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Bundle.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Bundle.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Bundle Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Bundle
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Configurable.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Configurable.php
index a27c037c..baef27e6 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Configurable.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Configurable.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Configurable Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Configurable
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Downloadable.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Downloadable.php
index 11795e9e..18327217 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Downloadable.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Downloadable.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Downloadable Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Downloadable
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Grouped.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Grouped.php
index a65451a7..1c4d7066 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Grouped.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Grouped.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Grouped Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Grouped
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Simple.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Simple.php
index 5d2b7935..9a088f5a 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Simple.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Simple.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Simple Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Simple
diff --git a/app/code/community/Doofinder/Feed/Model/Map/Product/Virtual.php b/app/code/community/Doofinder/Feed/Model/Map/Product/Virtual.php
index f60ae4c2..f6c5f9af 100644
--- a/app/code/community/Doofinder/Feed/Model/Map/Product/Virtual.php
+++ b/app/code/community/Doofinder/Feed/Model/Map/Product/Virtual.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Virtual Product Map Model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Map_Product_Virtual
diff --git a/app/code/community/Doofinder/Feed/Model/Mysql4/Cron.php b/app/code/community/Doofinder/Feed/Model/Mysql4/Cron.php
index 7b5bb791..7a7ce2f1 100644
--- a/app/code/community/Doofinder/Feed/Model/Mysql4/Cron.php
+++ b/app/code/community/Doofinder/Feed/Model/Mysql4/Cron.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Mysql4_Cron extends Mage_Core_Model_Mysql4_Abstract {
diff --git a/app/code/community/Doofinder/Feed/Model/Mysql4/Cron/Collection.php b/app/code/community/Doofinder/Feed/Model/Mysql4/Cron/Collection.php
index 80c51354..00dbb69a 100644
--- a/app/code/community/Doofinder/Feed/Model/Mysql4/Cron/Collection.php
+++ b/app/code/community/Doofinder/Feed/Model/Mysql4/Cron/Collection.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Mysql4_Cron_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
diff --git a/app/code/community/Doofinder/Feed/Model/Mysql4/Log.php b/app/code/community/Doofinder/Feed/Model/Mysql4/Log.php
index eb18c00a..b6e039a0 100644
--- a/app/code/community/Doofinder/Feed/Model/Mysql4/Log.php
+++ b/app/code/community/Doofinder/Feed/Model/Mysql4/Log.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
diff --git a/app/code/community/Doofinder/Feed/Model/Mysql4/Log/Collection.php b/app/code/community/Doofinder/Feed/Model/Mysql4/Log/Collection.php
index 451786eb..39d3a449 100644
--- a/app/code/community/Doofinder/Feed/Model/Mysql4/Log/Collection.php
+++ b/app/code/community/Doofinder/Feed/Model/Mysql4/Log/Collection.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
diff --git a/app/code/community/Doofinder/Feed/Model/Observers/Feed.php b/app/code/community/Doofinder/Feed/Model/Observers/Feed.php
index 55a838cf..c23e7a0f 100644
--- a/app/code/community/Doofinder/Feed/Model/Observers/Feed.php
+++ b/app/code/community/Doofinder/Feed/Model/Observers/Feed.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Observers_Feed
@@ -129,7 +129,9 @@ public function generateFeed($observer)
$collection = Mage::getModel('doofinder_feed/cron')->getCollection();
$collection
->addFieldToFilter('status', array('in' => array($helper::STATUS_PENDING, $helper::STATUS_RUNNING)))
- ->addFieldToFilter('next_iteration', array('lteq' => Mage::getModel('core/date')->date('Y-m-d H:i:s')))
+ ->addFieldToFilter('next_iteration', array(
+ 'lteq' => $helper->getScheduledAt(array(date('H') + $helper->getTimezoneOffset(), date('i'), date('s')))
+ ))
->setOrder('next_iteration', 'asc');
$collection->getSelect()->limit(1);
diff --git a/app/code/community/Doofinder/Feed/Model/Observers/Logs.php b/app/code/community/Doofinder/Feed/Model/Observers/Logs.php
index 51d91053..d6d81bd0 100644
--- a/app/code/community/Doofinder/Feed/Model/Observers/Logs.php
+++ b/app/code/community/Doofinder/Feed/Model/Observers/Logs.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Observers_Logs
diff --git a/app/code/community/Doofinder/Feed/Model/Observers/Schedule.php b/app/code/community/Doofinder/Feed/Model/Observers/Schedule.php
index 66a74fc8..cf1a4efb 100644
--- a/app/code/community/Doofinder/Feed/Model/Observers/Schedule.php
+++ b/app/code/community/Doofinder/Feed/Model/Observers/Schedule.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Observers_Schedule
diff --git a/app/code/community/Doofinder/Feed/Model/Resource/Mysql4/Setup.php b/app/code/community/Doofinder/Feed/Model/Resource/Mysql4/Setup.php
index 6d44f247..c7696927 100644
--- a/app/code/community/Doofinder/Feed/Model/Resource/Mysql4/Setup.php
+++ b/app/code/community/Doofinder/Feed/Model/Resource/Mysql4/Setup.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {
diff --git a/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Map/Additional.php b/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Map/Additional.php
index fac611f6..0a3e9aec 100644
--- a/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Map/Additional.php
+++ b/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Map/Additional.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_System_Config_Backend_Map_Additional extends Mage_Adminhtml_Model_System_Config_Backend_Serialized
diff --git a/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Password.php b/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Password.php
index 9f7110c5..cde3f586 100644
--- a/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Password.php
+++ b/app/code/community/Doofinder/Feed/Model/System/Config/Backend/Password.php
@@ -4,8 +4,7 @@ class Doofinder_Feed_Model_System_Config_Backend_Password extends Mage_Core_Mode
{
protected function _beforeSave()
{
- if (!preg_match('/^[a-zA-Z0-9_-]*$/', $this->getValue()))
- {
+ if (!preg_match('/^[a-zA-Z0-9_-]*$/', $this->getValue())) {
$config = $this->getFieldConfig();
throw new Exception(Mage::helper('doofinder_feed')->__(
@@ -16,4 +15,38 @@ protected function _beforeSave()
return parent::_beforeSave();
}
+
+ protected function _afterSave()
+ {
+ if ($this->isValueChanged()) {
+ foreach ($this->getStoreCodes() as $storeCode) {
+ Mage::helper('doofinder_feed')->changeXmlPassword($storeCode, $this->getOldValue(), $this->getValue());
+ }
+ }
+
+ return parent::_afterSave();
+ }
+
+ /**
+ * List all store codes in current scope
+ *
+ * @return string[]
+ */
+ protected function getStoreCodes()
+ {
+ $currentStoreCode = $this->getStoreCode();
+ $codes = array();
+
+ // Create stores codes array
+ if ($currentStoreCode) {
+ $codes[] = $currentStoreCode;
+ } else {
+ $stores = Mage::app()->getStores();
+ foreach ($stores as $store) {
+ $codes[] = $store->getCode();
+ }
+ }
+
+ return $codes;
+ }
}
diff --git a/app/code/community/Doofinder/Feed/Model/System/Config/Reset.php b/app/code/community/Doofinder/Feed/Model/System/Config/Reset.php
index 18bc2067..af5f2ff4 100644
--- a/app/code/community/Doofinder/Feed/Model/System/Config/Reset.php
+++ b/app/code/community/Doofinder/Feed/Model/System/Config/Reset.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_System_Config_Reset extends Mage_Core_Model_Config_Data
diff --git a/app/code/community/Doofinder/Feed/Model/System/Config/Source/Product/Attributes.php b/app/code/community/Doofinder/Feed/Model/System/Config/Source/Product/Attributes.php
index c5ee6ae2..09f99a0d 100644
--- a/app/code/community/Doofinder/Feed/Model/System/Config/Source/Product/Attributes.php
+++ b/app/code/community/Doofinder/Feed/Model/System/Config/Source/Product/Attributes.php
@@ -6,7 +6,7 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_Model_System_Config_Source_Product_Attributes
diff --git a/app/code/community/Doofinder/Feed/Model/Tools.php b/app/code/community/Doofinder/Feed/Model/Tools.php
index 37ef7d48..9fca0411 100644
--- a/app/code/community/Doofinder/Feed/Model/Tools.php
+++ b/app/code/community/Doofinder/Feed/Model/Tools.php
@@ -6,13 +6,13 @@
/**
* @category Models
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Tools model for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_Model_Tools extends Varien_Object
diff --git a/app/code/community/Doofinder/Feed/controllers/DoofinderFeedFeedController.php b/app/code/community/Doofinder/Feed/controllers/DoofinderFeedFeedController.php
index f6751b84..eb8a186d 100644
--- a/app/code/community/Doofinder/Feed/controllers/DoofinderFeedFeedController.php
+++ b/app/code/community/Doofinder/Feed/controllers/DoofinderFeedFeedController.php
@@ -6,7 +6,7 @@
/**
* @category controllers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_DoofinderFeedFeedController extends Mage_Adminhtml_Controller_Action
diff --git a/app/code/community/Doofinder/Feed/controllers/DoofinderFeedLogController.php b/app/code/community/Doofinder/Feed/controllers/DoofinderFeedLogController.php
index 8cb0be76..73063f85 100644
--- a/app/code/community/Doofinder/Feed/controllers/DoofinderFeedLogController.php
+++ b/app/code/community/Doofinder/Feed/controllers/DoofinderFeedLogController.php
@@ -6,7 +6,7 @@
/**
* @category controllers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
class Doofinder_Feed_DoofinderFeedLogController extends Mage_Adminhtml_Controller_Action
diff --git a/app/code/community/Doofinder/Feed/controllers/FeedController.php b/app/code/community/Doofinder/Feed/controllers/FeedController.php
index 4d9a1e95..3dc3efd4 100644
--- a/app/code/community/Doofinder/Feed/controllers/FeedController.php
+++ b/app/code/community/Doofinder/Feed/controllers/FeedController.php
@@ -6,13 +6,13 @@
/**
* @category controllers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Feed controller for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_FeedController extends Mage_Core_Controller_Front_Action
diff --git a/app/code/community/Doofinder/Feed/controllers/IndexController.php b/app/code/community/Doofinder/Feed/controllers/IndexController.php
index 49941afa..5b0afff3 100644
--- a/app/code/community/Doofinder/Feed/controllers/IndexController.php
+++ b/app/code/community/Doofinder/Feed/controllers/IndexController.php
@@ -6,13 +6,13 @@
/**
* @category controllers
* @package Doofinder_Feed
- * @version 1.8.2
+ * @version 1.8.3
*/
/**
* Index controller for Doofinder Feed
*
- * @version 1.8.2
+ * @version 1.8.3
* @package Doofinder_Feed
*/
class Doofinder_Feed_IndexController extends Mage_Core_Controller_Front_Action
diff --git a/app/code/community/Doofinder/Feed/etc/config.xml b/app/code/community/Doofinder/Feed/etc/config.xml
index 60a2b745..46b061e9 100644
--- a/app/code/community/Doofinder/Feed/etc/config.xml
+++ b/app/code/community/Doofinder/Feed/etc/config.xml
@@ -3,7 +3,7 @@
- 1.8.2
+ 1.8.3
diff --git a/package.json b/package.json
index c3a2f1ef..98fedbfe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "doofinder-for-magento",
- "version": "1.8.2",
+ "version": "1.8.3",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.5.0",
diff --git a/var/connect/Doofinder_Feed.xml b/var/connect/Doofinder_Feed.xml
index a399118a..7b6de121 100644
--- a/var/connect/Doofinder_Feed.xml
+++ b/var/connect/Doofinder_Feed.xml
@@ -1,5 +1,5 @@
<_>
- 7bnDvbWvMVB3xxOG
+ jX3L51RAqrocWI8N
Doofinder_Feed
community
@@ -49,9 +49,9 @@ You can get more info and create your account visiting the Doofinder site:
http://www.doofinder.com
Open Software License (OSL 3.0)
http://opensource.org/licenses/osl-3.0.php
- 1.8.2
+ 1.8.3
stable
- Fixed bug.
+ Fixed bugs in cron (timezone and password protection).
Carlos Escribano Rey
@@ -80,7 +80,7 @@ http://www.doofinder.com
-
+
diff --git a/var/connect/package.xml b/var/connect/package.xml
index 74a6085e..b687ac2d 100644
--- a/var/connect/package.xml
+++ b/var/connect/package.xml
@@ -1,7 +1,7 @@
Doofinder_Feed
- 1.8.2
+ 1.8.3
stable
Open Software License (OSL 3.0)
community
@@ -48,11 +48,11 @@ Doofinder is fast and innovative. With no doubt, it is the best search engine fo
You can get more info and create your account visiting the Doofinder site:
http://www.doofinder.com
- Fixed bug.
+ Fixed bugs in cron (timezone and password protection).
Carlos Escribano Reydoofindercarlos@doofinder.com
- 2017-03-03
-
-
+ 2017-03-21
+
+
5.4.06.0.0