mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-11 17:38:49 +00:00
Change file deletion to notify user if not successfully removed.
Fix use $rulePhpFile instead of $ruleIniFile. Signed-off-by: Craig Phillips <craig@craigphillips.biz>
This commit is contained in:
parent
29371309ac
commit
049d59bd4d
@ -41,21 +41,34 @@ class com_jedcheckerInstallerScript
|
|||||||
$ruleIniFile = JPATH_ADMINISTRATOR . $this->extension . 'libraries/rules/' . $rule . '.ini';
|
$ruleIniFile = JPATH_ADMINISTRATOR . $this->extension . 'libraries/rules/' . $rule . '.ini';
|
||||||
|
|
||||||
// Remove the rule's php file
|
// 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
|
// 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;
|
$extension = $this->extension;
|
||||||
$jlang =& JFactory::getLanguage();
|
$jlang =& JFactory::getLanguage();
|
||||||
|
@ -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_PH1_LICENSE_FOUND="GPL license was found"
|
||||||
COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found"
|
COM_JEDCHECKER_GPL_COMPATIBLE_LICENSE_WAS_FOUND="GPL compatible license was found"
|
||||||
COM_JEDCHECKER_WARNING="Warning"
|
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_PHP_FILE_REMOVED="Removed PHP file for '%1' rule."
|
||||||
COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%1' rule."
|
COM_JEDCHECKER_OLD_RULE_X_INI_FILE_REMOVED="Removed 'ini' file for '%1' rule."
|
Loading…
Reference in New Issue
Block a user