Skip to content

Commit

Permalink
Remove update sites only on successful uninstallation
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Sep 4, 2016
1 parent 3006b67 commit 133a0c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libraries/cms/installer/adapter/component.php
Expand Up @@ -661,7 +661,7 @@ protected function storeExtension($deleteExisting = false)
*
* @param integer $id The unique extension id of the component to uninstall
*
* @return mixed Return value for uninstall method in component uninstall file
* @return boolean True on success
*
* @since 3.1
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/installer/adapter/language.php
Expand Up @@ -461,7 +461,7 @@ public function update()
*
* @param string $eid The tag of the language to uninstall
*
* @return mixed Return value for uninstall method in component uninstall file
* @return boolean True on success
*
* @since 3.1
*/
Expand Down
7 changes: 4 additions & 3 deletions plugins/extension/joomla/joomla.php
Expand Up @@ -128,17 +128,18 @@ public function onExtensionAfterInstall($installer, $eid )
*
* @param JInstaller $installer Installer instance
* @param integer $eid Extension id
* @param integer $result Installation result
* @param bool $result Installation result
*
* @return void
*
* @since 1.6
*/
public function onExtensionAfterUninstall($installer, $eid, $result)
{
if ($eid)
// If we have a valid extension ID and the extension was successfully uninstalled wipe out any
// update sites for it
if ($eid && $result)
{
// Wipe out any update_sites_extensions links
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->delete('#__update_sites_extensions')
Expand Down

0 comments on commit 133a0c0

Please sign in to comment.