/* * CheckMake ifsure admin_blockthe andupgrade admin_variableis tablesnot exist,performed ifon not, installations *without wethe havetables an* (i.e. unpatched shopshops). andIf so, return without doing anything. */ try { $adminVersion = $this->getTableMage::getConfig('admin/permission_block'); $this->getTable>getModuleConfig('admin/permission_variable''Mage_Admin');->version; } catchif (Mage_Core_Exceptionversion_compare($adminVersion, $e'1.6.1.2', '<')) { return; } $blockNames = array( 'cms/block', 'catalog/product_list', 'germany/impressum', 'page/html', 'magesetup/imprint_field', 'magesetup/imprint_content' ); foreach ($blockNames as $blockName) { $whitelistBlock = Mage::getModel('admin/block')->load($blockName, 'block_name'); $whitelistBlock->setData('block_name', $blockName); $whitelistBlock->setData('is_allowed', 1); $whitelistBlock->save(); } $variableNames = array( 'design/email/logo_alt', 'design/email/logo_width', 'design/email/logo_height', ); foreach ($variableNames as $variableName) { $whitelistVar = Mage::getModel('admin/variable')->load($variableName, 'variable_name'); $whitelistVar->setData('variable_name', $variableName); $whitelistVar->setData('is_allowed', 1); $whitelistVar->save(); }