From: Tim Düsterhus Date: Mon, 8 Aug 2022 10:33:20 +0000 (+0200) Subject: Drop obsolete update_com.woltlab.wcf_5.5_deleteDsStore.php X-Git-Tag: 6.0.0_Alpha_1~1061 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e3f6f68907e905903b0ddd499f85f7397aefec0;p=GitHub%2FWoltLab%2FWCF.git Drop obsolete 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'], - ]); -}