diff --git a/source/administrator/components/com_jedchecker/script.php b/source/administrator/components/com_jedchecker/script.php index 7b158af..0d39cd8 100644 --- a/source/administrator/components/com_jedchecker/script.php +++ b/source/administrator/components/com_jedchecker/script.php @@ -41,21 +41,34 @@ class com_jedcheckerInstallerScript $ruleIniFile = JPATH_ADMINISTRATOR . $this->extension . 'libraries/rules/' . $rule . '.ini'; // Remove the rule's php file - if(file_exists($rulePhpFile) && JFile::delete($rulePhpFile)) + if(file_exists($rulePhpFile)) { - echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED', $rule); + if(JFile::delete($rulePhpFile)) + { + echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED', $rule); + } + else + { + echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED', $rule); + } } // Remove the rule's ini file - if(file_exists($rulePhpFile) && JFile::delete($rulePhpFile)) + if(file_exists($ruleIniFile)) { - echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED', $rule); + if(JFile::delete($ruleIniFile)) + { + echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED', $rule); + } + else + { + echo JText::sprintf('COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED', $rule); + } } - } } - public function loadLanguage() + public function loadLanguage() { $extension = $this->extension; $jlang =& JFactory::getLanguage(); diff --git a/source/administrator/language/en-GB/en-GB.com_jedchecker.ini b/source/administrator/language/en-GB/en-GB.com_jedchecker.ini index 1cbaad6..6cd5aec 100644 --- a/source/administrator/language/en-GB/en-GB.com_jedchecker.ini +++ b/source/administrator/language/en-GB/en-GB.com_jedchecker.ini @@ -45,5 +45,7 @@ COM_JEDCHECKER_ERROR_GPL_NOT_FOUND="GPL or compatible license was not found" COM_JEDCHECKER_PH1_LICENSE_FOUND="GPL license was found" COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found" COM_JEDCHECKER_WARNING="Warning" +COM_JEDCHECKER_OLD_RULE_X_INI_FILE_NOT_REMOVED="'ini' file for '%1' rule could not be removed, manual removal recommended." +COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_NOT_REMOVED="PHP file for '%1' rule could not be removed, manual removal recommended." COM_JEDCHECKER_OLD_RULE_X_PHP_FILE_REMOVED="Removed PHP file for '%1' rule." COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%1' rule." \ No newline at end of file