Added update script
authorAlexander Ebert <ebert@woltlab.com>
Sun, 16 Jun 2013 16:05:46 +0000 (18:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 16 Jun 2013 16:05:46 +0000 (18:05 +0200)
wcfsetup/install/files/acp/update_b4.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/acp/update_b4.php b/wcfsetup/install/files/acp/update_b4.php
new file mode 100644 (file)
index 0000000..0810ba5
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+use wcf\system\WCF;
+
+$removeFiles = array(
+       'style/like.less',
+       'style/recaptcha.less',
+       'style/search.less'
+);
+
+$sql = "DELETE FROM    wcf".WCF_N."_package_installation_file_log
+       WHERE           packageID = ?
+                       AND filename = ?";
+$statement = WCF::getDB()->prepareStatement($sql);
+foreach ($removeFiles as $file) {
+       if (file_exists(WCF_DIR.$file)) {
+               @unlink(WCF_DIR.$file);
+               
+               $statement->execute(array(1, $file));
+       }
+}