Plumrocket_Base - Version 1.0.5

Version Notes

Minor fixes

Download this release

Release Info

Developer Plumrocket Team
Extension Plumrocket_Base
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.5

app/code/community/Plumrocket/Base/Block/System/Config/Version.php CHANGED
@@ -57,7 +57,7 @@ class Plumrocket_Base_Block_System_Config_Version extends Mage_Adminhtml_Block_S
57
 
58
  var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
59
  iframeDoc.open();
60
- iframeDoc.write("<html><body></body></html>");
61
  iframeDoc.close();
62
  iframeBody = iframeDoc.body;
63
 
57
 
58
  var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
59
  iframeDoc.open();
60
+ iframeDoc.write("<ht"+"ml><bo"+"dy></bo"+"dy></ht"+"ml>");
61
  iframeDoc.close();
62
  iframeBody = iframeDoc.body;
63
 
app/code/community/Plumrocket/Base/Model/CronChecker.php CHANGED
@@ -29,7 +29,7 @@ class Plumrocket_Base_Model_CronChecker
29
 
30
  if(!$this->getCronStatus('plumrocket_'.$name.'_')) {
31
  $session = Mage::getSingleton('adminhtml/session');
32
- $message = Mage::helper('adminhtml')->__('Magento Cron Job is missing in your crontab. This magento extension requires to schedule custom tasks to be run periodically. Please read <a href="%s" target="_blank">How to setup a Cron Job in Magento</a> for more info.', 'http://wiki.plumrocket.com/wiki/How_to_setup_a_Cron_Job_in_Magento');
33
  $session->addUniqueMessages(Mage::getSingleton('core/message')->notice($message)->setIdentifier('plumrocket_cronChecker'));
34
  }
35
  }
29
 
30
  if(!$this->getCronStatus('plumrocket_'.$name.'_')) {
31
  $session = Mage::getSingleton('adminhtml/session');
32
+ $message = Mage::helper('adminhtml')->__('Notice: You can disregard this message if the extension was installed less than 30 minutes ago.<br/>Magento Cron Job is missing in your crontab. This magento extension requires to schedule custom tasks to be run periodically. Please read <a href="%s" target="_blank">How to setup a Cron Job in Magento</a> for more info.', 'http://wiki.plumrocket.com/wiki/How_to_setup_a_Cron_Job_in_Magento');
33
  $session->addUniqueMessages(Mage::getSingleton('core/message')->notice($message)->setIdentifier('plumrocket_cronChecker'));
34
  }
35
  }
app/code/community/Plumrocket/Base/Model/Observer.php CHANGED
@@ -19,4 +19,4 @@ send an email to support@plumrocket.com so we can send you a copy immediately.
19
  */
20
 
21
 
22
- class Plumrocket_Base_Model_Observer{protected $_customer=null;protected $_inStock=true;protected $_session=null;public function systemConfigLoad($observer){$controller=$observer->getEvent()->getControllerAction();$section=$this->_getSection($controller);if($section->getName()){try{$resourceLookup='admin/system/config/'.$section->getName();$this->_getSession()->getData('acl')->get($resourceLookup);}catch(Zend_Acl_Exception $e){$this->_refreshAdminAcl();$section=$this->_getSection($controller);}}if($this->_isPlumSection($section)){Mage::getSingleton('plumbase/cronChecker')->check($section->getName());}if($this->_hasS($section)){$current=$section->getName();$_key=$current.'/general/'.strrev('laires');$product=Mage::getModel('plumbase/product')->setPref($current);if(!Mage::getStoreConfig($_key,0)){if($s=$product->loadSession()){$config=Mage::getConfig();$config->saveConfig($_key,$s,'default',0);$config->reinit();Mage::app()->reinitStores();$this->_refreshPage();}}else{$product=Mage::getModel('plumbase/product')->load($product->getName());if(!$product->isInStock()||!$product->isCached()){$product->checkStatus();}}if(!$product->isInStock()){$product->disable();}if(!$product->isInStock()){Mage::getSingleton('adminhtml/session')->addError($product->getDescription());}}}public function permissionsCheck($observer){if($this->_getSession()->isLoggedIn()){$controller=$observer->getEvent()->getControllerAction();$request=$controller->getRequest();if($request->getActionName()=='denied'&&!$request->getParam('norefreshpage')){$this->_refreshAdminAcl();$this->_refreshPage(true);}}}protected function _getSession(){if(is_null($this->_session)){$this->_session=Mage::getSingleton('admin/session');}return $this->_session;}protected function _refreshPage($addParam=false){$cUrl=Mage::helper('core/url')->getCurrentUrl();if($addParam){$cUrl.=(strpos($cUrl,'?')===false)?'?':'&';$cUrl.='norefreshpage=1';}Mage::app()->getResponse()->setRedirect($cUrl)->sendHeaders();exit();}protected function _refreshAdminAcl(){$session=$this->_getSession();if($admin=$session->getUser()){$admin->setReloadAclFlag(true);$session->refreshAcl();}}protected function _getSection($controller){$req=$controller->getRequest();$current=$req->getParam('section');$website=$req->getParam('website');$store=$req->getParam('store');Mage::getSingleton('adminhtml/config_data')->setSection($current)->setWebsite($website)->setStore($store);$configFields=Mage::getSingleton('adminhtml/config');$sections=$configFields->getSections($current);if(!$current){$sections=(array) $sections;usort($sections,array($this,'_sort'));$permissions=$this->_getSession();foreach($sections as $sec){$code=$sec->getName();if(!$code or trim($code)==""){continue;}if($permissions->isAllowed('system/config/'.$code)){$current=$code;$section=$sec;break;}}}else{$section=$sections->$current;}return $section;}public function customer(){if(empty($this->_customer)){$this->_customer=1;}return 'customer';}public function systemConfigBeforeSave($observer){$controller=$observer->getEvent()->getControllerAction();$section=$controller->getRequest()->getParam('section');if(!$section){return;}$sData=Mage::getSingleton('adminhtml/config')->getSection($section);if($this->_hasS($sData)){$product=Mage::getModel('plumbase/product')->loadByPref($section);$this->_inStock=$product->isInStock();}}public function systemConfigSave($observer){$controller=$observer->getEvent()->getControllerAction();$section=$controller->getRequest()->getParam('section');if(!$section){return;}$sData=Mage::getSingleton('adminhtml/config')->getSection($section);if($this->_hasS($sData)){$product=Mage::getModel('plumbase/product')->loadByPref($section);$product->checkStatus();if(!$product->isInStock()){$product->disable();}else{if(!$this->_inStock){Mage::getSingleton('adminhtml/session')->addSuccess($product->getDescription());}}}}protected function _hasS($section){$i='ser'.strrev('lai');return $section&&($v=$section->groups)&&($v=$v->general)&&($v=$v->fields)&&($v=$v->$i)&&((string) $section->tab=='plum'."rock".'et');}protected function _isPlumSection($section){return $section&&((string) $section->tab=='plu'.'mroc'.'ket');}protected function _sort($a,$b){return (int) $a->sort_order<(int) $b->sort_order?-1:((int) $a->sort_order>(int) $b->sort_order?1:0);}}
19
  */
20
 
21
 
22
+ class Plumrocket_Base_Model_Observer{protected $_customer=null;protected $_inStock=true;protected $_session=null;public function systemConfigLoad($observer){$controller=$observer->getEvent()->getControllerAction();$section=$this->_getSection($controller);if($section && $section->getName()){try{$resourceLookup='admin/system/config/'.$section->getName();$this->_getSession()->getData('acl')->get($resourceLookup);}catch(Zend_Acl_Exception $e){$this->_refreshAdminAcl();$section=$this->_getSection($controller);}}if($this->_isPlumSection($section)){Mage::getSingleton('plumbase/cronChecker')->check($section->getName());}if($this->_hasS($section)){$current=$section->getName();$_key=$current.'/general/'.strrev('laires');$product=Mage::getModel('plumbase/product')->setPref($current);if(!Mage::getStoreConfig($_key,0)){if($s=$product->loadSession()){$config=Mage::getConfig();$config->saveConfig($_key,$s,'default',0);$config->reinit();Mage::app()->reinitStores();$this->_refreshPage();}}else{$product=Mage::getModel('plumbase/product')->load($product->getName());if(!$product->isInStock()||!$product->isCached()){$product->checkStatus();}}if(!$product->isInStock()){$product->disable();}if(!$product->isInStock()){Mage::getSingleton('adminhtml/session')->addError($product->getDescription());}}}public function permissionsCheck($observer){if($this->_getSession()->isLoggedIn()){$controller=$observer->getEvent()->getControllerAction();$request=$controller->getRequest();if($request->getActionName()=='denied'&&!$request->getParam('norefreshpage')){$this->_refreshAdminAcl();$this->_refreshPage(true);}}}protected function _getSession(){if(is_null($this->_session)){$this->_session=Mage::getSingleton('admin/session');}return $this->_session;}protected function _refreshPage($addParam=false){$cUrl=Mage::helper('core/url')->getCurrentUrl();if($addParam){$cUrl.=(strpos($cUrl,'?')===false)?'?':'&';$cUrl.='norefreshpage=1';}Mage::app()->getResponse()->setRedirect($cUrl)->sendHeaders();exit();}protected function _refreshAdminAcl(){$session=$this->_getSession();if($admin=$session->getUser()){$admin->setReloadAclFlag(true);$session->refreshAcl();}}protected function _getSection($controller){$req=$controller->getRequest();$current=$req->getParam('section');$website=$req->getParam('website');$store=$req->getParam('store');Mage::getSingleton('adminhtml/config_data')->setSection($current)->setWebsite($website)->setStore($store);$configFields=Mage::getSingleton('adminhtml/config');$sections=$configFields->getSections($current);if(!$current){$sections=(array) $sections;usort($sections,array($this,'_sort'));$permissions=$this->_getSession();foreach($sections as $sec){$code=$sec->getName();if(!$code or trim($code)==""){continue;}if($permissions->isAllowed('system/config/'.$code)){$current=$code;$section=$sec;break;}}}else{$section=$sections->$current;}return $section;}public function customer(){if(empty($this->_customer)){$this->_customer=1;}return 'customer';}public function systemConfigBeforeSave($observer){$controller=$observer->getEvent()->getControllerAction();$section=$controller->getRequest()->getParam('section');if(!$section){return;}$sData=Mage::getSingleton('adminhtml/config')->getSection($section);if($this->_hasS($sData)){$product=Mage::getModel('plumbase/product')->loadByPref($section);$this->_inStock=$product->isInStock();}}public function systemConfigSave($observer){$controller=$observer->getEvent()->getControllerAction();$section=$controller->getRequest()->getParam('section');if(!$section){return;}$sData=Mage::getSingleton('adminhtml/config')->getSection($section);if($this->_hasS($sData)){$product=Mage::getModel('plumbase/product')->loadByPref($section);$product->checkStatus();if(!$product->isInStock()){$product->disable();}else{if(!$this->_inStock){Mage::getSingleton('adminhtml/session')->addSuccess($product->getDescription());}}}}protected function _hasS($section){$i='ser'.strrev('lai');return $section&&($v=$section->groups)&&($v=$v->general)&&($v=$v->fields)&&($v=$v->$i)&&((string) $section->tab=='plum'."rock".'et');}protected function _isPlumSection($section){return $section&&((string) $section->tab=='plu'.'mroc'.'ket');}protected function _sort($a,$b){return (int) $a->sort_order<(int) $b->sort_order?-1:((int) $a->sort_order>(int) $b->sort_order?1:0);}}
app/code/community/Plumrocket/Base/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <modules>
5
  <Plumrocket_Base>
6
- <version>1.0.4</version>
7
  </Plumrocket_Base>
8
  </modules>
9
 
3
 
4
  <modules>
5
  <Plumrocket_Base>
6
+ <version>1.0.5</version>
7
  </Plumrocket_Base>
8
  </modules>
9
 
app/etc/modules/Plumrocket_Base.xml CHANGED
@@ -4,7 +4,7 @@
4
  <Plumrocket_Base>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
- <version>1.0.4</version>
8
  </Plumrocket_Base>
9
  </modules>
10
  </config>
4
  <Plumrocket_Base>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
+ <version>1.0.5</version>
8
  </Plumrocket_Base>
9
  </modules>
10
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Plumrocket_Base</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://wiki.plumrocket.net/wiki/EULA">End-user License Agreement</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>This PlumrocketBase module is a useful tool for syncing important information between Plumrocket extensions installed on your online store and Plumrocket database.</summary>
10
  <description>This PlumrocketBase module is a useful tool for syncing important information between Plumrocket extensions installed on your online store and Plumrocket database.&#xD;
11
  It will notify you about the new changes, fixes and updates using notifications popup at your magento backend and will let you be on track with the recent modifications.</description>
12
- <notes>Improved integration with other Plumrocket Extensions</notes>
13
  <authors><author><name>Plumrocket Team</name><user>plumrocket</user><email>support@plumrocket.com</email></author></authors>
14
- <date>2015-02-27</date>
15
- <time>14:36:05</time>
16
- <contents><target name="magecommunity"><dir name="Plumrocket"><dir name="Base"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><file name="Field.php" hash="79c9f4af420639ba3136457007714797"/></dir><file name="Version.php" hash="b00bdf09333d1ad64a332f889b195d1e"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f8a4d9d735479fc86e90b55c46dcfa29"/><file name="Main.php" hash="5f311ab21647ca01d5e50a07c18700bb"/></dir><dir name="Model"><file name="CronChecker.php" hash="6a30f7c4fc35802c5608adcbaf5052ff"/><file name="Feed.php" hash="819cc8d8ebd053da6a88411811251d43"/><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="24a6e4554f03b528be55a321e0204603"/></dir><file name="Product.php" hash="64a5f2af1455b4f11cc7c7836b657a54"/></dir><file name="Observer.php" hash="bbe1531c21bc33ac3ff52fe551bf5f4e"/><file name="Product.php" hash="aa896cba6a284e4ed1b40a059de76ec4"/></dir><dir name="etc"><file name="config.xml" hash="858f7fda5e455330cb10217ae9ce55a7"/></dir><dir name="sql"><dir name="base_setup"><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="3af869350f4d33e7e412e7f32706f2d2"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Plumrocket_Base.xml" hash="38c5e1ad1be76ff8e8bffc6db27cb508"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Plumrocket_Base</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://wiki.plumrocket.net/wiki/EULA">End-user License Agreement</license>
7
  <channel>community</channel>
9
  <summary>This PlumrocketBase module is a useful tool for syncing important information between Plumrocket extensions installed on your online store and Plumrocket database.</summary>
10
  <description>This PlumrocketBase module is a useful tool for syncing important information between Plumrocket extensions installed on your online store and Plumrocket database.&#xD;
11
  It will notify you about the new changes, fixes and updates using notifications popup at your magento backend and will let you be on track with the recent modifications.</description>
12
+ <notes>Minor fixes</notes>
13
  <authors><author><name>Plumrocket Team</name><user>plumrocket</user><email>support@plumrocket.com</email></author></authors>
14
+ <date>2015-03-24</date>
15
+ <time>09:21:44</time>
16
+ <contents><target name="magecommunity"><dir name="Plumrocket"><dir name="Base"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><file name="Field.php" hash="79c9f4af420639ba3136457007714797"/></dir><file name="Version.php" hash="4823969de9c895aa16feb015686bc71b"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f8a4d9d735479fc86e90b55c46dcfa29"/><file name="Main.php" hash="5f311ab21647ca01d5e50a07c18700bb"/></dir><dir name="Model"><file name="CronChecker.php" hash="fe64f5cf4432127043cd6cf0374b52de"/><file name="Feed.php" hash="819cc8d8ebd053da6a88411811251d43"/><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="24a6e4554f03b528be55a321e0204603"/></dir><file name="Product.php" hash="64a5f2af1455b4f11cc7c7836b657a54"/></dir><file name="Observer.php" hash="15b4655f0c0b1e5b00dd02c951a19ffe"/><file name="Product.php" hash="aa896cba6a284e4ed1b40a059de76ec4"/></dir><dir name="etc"><file name="config.xml" hash="2b9109c1fe12ad1bf52a59edadfe5fa1"/></dir><dir name="sql"><dir name="base_setup"><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="3af869350f4d33e7e412e7f32706f2d2"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Plumrocket_Base.xml" hash="bcbd05cb8a4a0e71e066b690933af1a1"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>