Public Member Functions | |
indexAction () | |
saveAction () | |
Protected Member Functions | |
_isAllowed () |
Definition at line 35 of file ConfigController.php.
_isAllowed | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Controller_Action.
Definition at line 70 of file ConfigController.php.
00071 { 00072 return Mage::getSingleton('admin/session')->isAllowed('system/extensions/config'); 00073 }
indexAction | ( | ) |
Definition at line 37 of file ConfigController.php.
00038 { 00039 $this->loadLayout(); 00040 00041 $this->_setActiveMenu('system/extensions'); 00042 00043 $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_config_edit')->initForm()); 00044 00045 $this->renderLayout(); 00046 }
saveAction | ( | ) |
Definition at line 48 of file ConfigController.php.
00049 { 00050 $pear = Varien_Pear::getInstance(); 00051 $error = Mage::helper('adminhtml')->__("Unknown error"); 00052 $state = $this->getRequest()->getPost('preferred_state'); 00053 if (!empty($state)) { 00054 $session = Mage::getSingleton('adminhtml/session'); 00055 $result = $pear->run('config-set', array(), array('preferred_state', $state)); 00056 if ($result instanceof PEAR_Error) { 00057 $error = $result->getMessage(); 00058 } else { 00059 $error = false; 00060 } 00061 } 00062 if ($error) { 00063 $session->addError($result->getMessage()); 00064 } else { 00065 $session->addSuccess(Mage::helper('adminhtml')->__("PEAR Configuration was successfully saved")); 00066 } 00067 $this->_redirect('*/*'); 00068 }