Version Notes
version 1.0.2
Download this release
Release Info
Developer | Magento Core Team |
Extension | cartware_cmslock |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
app/code/community/Cartware/CmsLock/Model/Observer.php
CHANGED
@@ -55,15 +55,16 @@ class Cartware_CmsLock_Model_Observer
|
|
55 |
public function redirectIfBlockLocked($observer){
|
56 |
|
57 |
|
58 |
-
if (Mage::registry('cms_block')
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
67 |
|
68 |
}
|
69 |
|
@@ -73,16 +74,16 @@ class Cartware_CmsLock_Model_Observer
|
|
73 |
public function redirectIfPageLocked($observer){
|
74 |
|
75 |
|
76 |
-
if (Mage::registry('
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
}
|
87 |
|
88 |
|
55 |
public function redirectIfBlockLocked($observer){
|
56 |
|
57 |
|
58 |
+
if ($block = Mage::registry('cms_block')){
|
59 |
+
if($block->getIsLocked()) {
|
60 |
+
$session = Mage::getSingleton('core/session');
|
61 |
+
$session->getMessages(true);
|
62 |
+
$session->addError(Mage::helper('cartware_cmslock')->__('CMS Static Block is locked!'));
|
63 |
+
$controller = $observer->getEvent()->getControllerAction();
|
64 |
+
$controller->getRequest()->setDispatched(true);
|
65 |
+
$controller->getResponse()->setRedirect(Mage::app()->getRequest()->getServer('HTTP_REFERER'));
|
66 |
+
$controller->getResponse()->sendResponse();
|
67 |
+
}
|
68 |
|
69 |
}
|
70 |
|
74 |
public function redirectIfPageLocked($observer){
|
75 |
|
76 |
|
77 |
+
if ($page = Mage::registry('cms_block')){
|
78 |
+
if($page->getIsLocked()) {
|
79 |
+
$session = Mage::getSingleton('core/session');
|
80 |
+
$session->getMessages(true);
|
81 |
+
$session->addError(Mage::helper('cartware_cmslock')->__('CMS Page is locked!'));
|
82 |
+
$controller = $observer->getEvent()->getControllerAction();
|
83 |
+
$controller->getRequest()->setDispatched(true);
|
84 |
+
$controller->getResponse()->setRedirect(Mage::app()->getRequest()->getServer('HTTP_REFERER'));
|
85 |
+
$controller->getResponse()->sendResponse();
|
86 |
+
}
|
87 |
}
|
88 |
|
89 |
|
app/code/community/Cartware/CmsLock/etc/config.xml
CHANGED
@@ -52,7 +52,7 @@
|
|
52 |
<config>
|
53 |
<modules>
|
54 |
<Cartware_CmsLock>
|
55 |
-
<version>1.0.
|
56 |
</Cartware_CmsLock>
|
57 |
</modules>
|
58 |
<admin>
|
52 |
<config>
|
53 |
<modules>
|
54 |
<Cartware_CmsLock>
|
55 |
+
<version>1.0.2</version>
|
56 |
</Cartware_CmsLock>
|
57 |
</modules>
|
58 |
<admin>
|
package.xml
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartware_cmslock</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GPL version 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Prevent individual CMS static blocks and pages from being edited by locking them in the backend.</summary>
|
10 |
-
<description>This extensions provides functionality to prevent individual CMS static blocks / pages from being edited by users without permission.
|
11 |
-
|
12 |
-
<notes>version 1.0.1</notes>
|
13 |
<authors><author><name>Cartware GmbH - Core Team</name><user>auto-converted</user><email>info@cartware.de</email></author></authors>
|
14 |
<date>2013-08-08</date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Cartware"><dir name="CmsLock"><dir name="Block"><dir name="Adminhtml"><dir name="Block"><file name="Grid.php" hash="f5bca7b1e968d642119799d65f54b8eb"/></dir><dir name="Page"><file name="Grid.php" hash="d18a907684c82ef8b700fceb5efe5a36"/></dir><file name="Block.php" hash="da738e0281b85ff6cdcb857762610e6e"/><file name="Page.php" hash="9e0c32788dae20f2a4b3ac98f04b64c9"/></dir><file name="Abstract.php" hash="36eb42b18586abedb612309c92c08aab"/></dir><dir name="Helper"><file name="Config.php" hash="e2a01fed76a143ad9824691412ab3871"/><file name="Data.php" hash="97a91a120f7b244d234e4f6e11d3f150"/></dir><dir name="Model"><dir name="Resource"><file name="Abstract.php" hash="cbc963e9320b3c250f70aed4eca4b915"/></dir><file name="Abstract.php" hash="f00a13cfa7c470c37d44eba794548cfc"/><file name="Observer.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartware_cmslock</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GPL version 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Prevent individual CMS static blocks and pages from being edited by locking them in the backend.</summary>
|
10 |
+
<description>This extensions provides functionality to prevent individual CMS static blocks / pages from being edited by users without permission. Blocks or pages can simply be locked by ACL permitted users in the backend and are further no longer editable in the CMS section.</description>
|
11 |
+
<notes>version 1.0.2</notes>
|
|
|
12 |
<authors><author><name>Cartware GmbH - Core Team</name><user>auto-converted</user><email>info@cartware.de</email></author></authors>
|
13 |
<date>2013-08-08</date>
|
14 |
+
<time>13:55:52</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Cartware"><dir name="CmsLock"><dir name="Block"><dir name="Adminhtml"><dir name="Block"><file name="Grid.php" hash="f5bca7b1e968d642119799d65f54b8eb"/></dir><dir name="Page"><file name="Grid.php" hash="d18a907684c82ef8b700fceb5efe5a36"/></dir><file name="Block.php" hash="da738e0281b85ff6cdcb857762610e6e"/><file name="Page.php" hash="9e0c32788dae20f2a4b3ac98f04b64c9"/></dir><file name="Abstract.php" hash="36eb42b18586abedb612309c92c08aab"/></dir><dir name="Helper"><file name="Config.php" hash="e2a01fed76a143ad9824691412ab3871"/><file name="Data.php" hash="97a91a120f7b244d234e4f6e11d3f150"/></dir><dir name="Model"><dir name="Resource"><file name="Abstract.php" hash="cbc963e9320b3c250f70aed4eca4b915"/></dir><file name="Abstract.php" hash="f00a13cfa7c470c37d44eba794548cfc"/><file name="Observer.php" hash="fce8c2cd64e6cb8dca10d229866c9a9e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BlockController.php" hash="7641bd4b58b549b1ead5db8f8f50813c"/><file name="PageController.php" hash="1004c022d17866f74a9ddc3bc9685ea0"/></dir><file name="IndexController.php" hash="4916cde69a15660805ea24afd1287cd0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="550fc346379b313f27526590776bf5a9"/><file name="config.xml" hash="401c7ff760e1ffa467d9c3b552a4e8b9"/></dir><dir name="sql"><dir name="cartware_cmslock_setup"><file name="mysql4-install-0.1.0.php" hash="e2b0449adf60063c613a99e861530865"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cartware_CmsLock.xml" hash="e4aafe5b0a447640968935b7a48b7944"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Cartware_CmsLock.csv" hash="cc57b39cca774207156ccd4f5c10f7ba"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|