Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // This code allows all calls to <remove /> being ignored
- // if a block with acl attribute is valid for admin user.
- // Shall I keep it in LayoutCompiler? IMO, this looks more like a bug, than a needed feature!
- foreach ($ignoreNodes as $block) {
- if ($block->getAttribute('ignore') !== null) {
- continue;
- }
- $acl = (string)$attributes->acl;
- if ($acl && Mage::getSingleton('admin/session')->isAllowed($acl)) {
- continue;
- }
- if (!isset($block->attributes()->ignore)) {
- $block->addAttribute('ignore', true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement