Drop obsolete update_com.woltlab.wcf_5.5_deleteDsStore.php
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 Aug 2022 10:33:20 +0000 (12:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 Aug 2022 10:33:20 +0000 (12:33 +0200)
wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_deleteDsStore.php [deleted file]

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 (file)
index 9fe7113..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
- * Deletes .DS_Store and ._.DS_Store files.
- *
- * @author  Tim Duesterhus
- * @copyright   2001-2022 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @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'],
-    ]);
-}