From 2e3f6f68907e905903b0ddd499f85f7397aefec0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 8 Aug 2022 12:33:20 +0200 Subject: [PATCH] Drop obsolete update_com.woltlab.wcf_5.5_deleteDsStore.php --- ...date_com.woltlab.wcf_5.5_deleteDsStore.php | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_deleteDsStore.php diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_deleteDsStore.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_deleteDsStore.php deleted file mode 100644 index 9fe7113ccb..0000000000 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_deleteDsStore.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @package WoltLabSuite\Core - */ - -use wcf\data\application\Application; -use wcf\system\WCF; - -$sql = "SELECT * - FROM wcf1_package_installation_file_log - WHERE filename LIKE ? - OR filename LIKE ?"; -$selectStatement = WCF::getDB()->prepare($sql); -$selectStatement->execute([ - '%/.DS_Store', - '%/._.DS_Store', -]); - -$sql = "DELETE FROM wcf1_package_installation_file_log - WHERE packageID = ? - AND filename = ? - AND application = ?"; -$deleteStatement = WCF::getDB()->prepare($sql); - -while (($row = $selectStatement->fetchArray())) { - $packageDir = Application::getDirectory($row['application']); - $fullPath = $packageDir . $row['filename']; - - if (!\file_exists($fullPath) || !\is_file($fullPath)) { - continue; - } - - if ( - \basename($fullPath) !== '.DS_Store' - && \basename($fullPath) !== '._.DS_Store' - ) { - continue; - } - - \unlink($fullPath); - $deleteStatement->execute([ - $row['packageID'], - $row['filename'], - $row['application'], - ]); -} -- 2.20.1