From f6abc3045f3c15753405015e6b44ae75f214eff4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 15 Oct 2012 14:44:04 +0200 Subject: [PATCH] Fixed deletion of cache files upon uninstallation --- .../PackageUninstallationDispatcher.class.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php index af46a2bf72..2f22523a9d 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php @@ -1,5 +1,7 @@ clear(WCF_DIR.'cache/', 'cache.*.php'); + + if (PACKAGE_ID != 1) { + $sql = "SELECT packageDir + FROM wcf".WCF_N."_package + WHERE isApplication = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array(1)); + while ($row = $statement->fetchArray()) { + $dir = FileUtil::getRealPath(WCF_DIR.$row['packageDir']); + CacheHandler::getInstance()->clear($dir.'cache/', 'cache.*.php'); + } + } } // return next node -- 2.20.1