public function removeLogo() { // Remove previous logo $configHelper = new JXConfig(); $originalFilePath = $configHelper->getCompanyLogoPath(); if (JFile::exists($originalFilePath)) { JFile::delete($originalFilePath); } $param['logo'] = ''; $mainframe = JFactory::getApplication(); if (!$configHelper->saveConfig($param)) { /* Redirect to clear the previous post values */ $mainframe->redirect(JRoute::_('index.php?option=com_account&view=account&task=manageTheme', false), JText::_('COM_ACCOUNT_ACTION_REMOVE_LOGO_FAIL'), 'error'); } /* Redirect to clear the previous post values */ $mainframe->redirect(JRoute::_('index.php?option=com_account&view=account&task=manageTheme', false), JText::_('COM_ACCOUNT_ACTION_REMOVE_LOGO_SUCCESS')); }