Deprecate StyleUtil::updateStyleFile()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 3 Feb 2021 11:23:25 +0000 (12:23 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 3 Feb 2021 11:23:25 +0000 (12:23 +0100)
Resolves #3927

com.woltlab.wcf/package.xml
wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_updateStyle.php [deleted file]
wcfsetup/install/files/lib/system/package/plugin/FilePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/util/StyleUtil.class.php

index 42302364010dc2262fc60b38dc0bd8223de9e95c..03a75812e81cdaabf29606cde796447b88548f9a 100644 (file)
@@ -73,7 +73,7 @@ tar cvf com.woltlab.wcf/files_pre.tar -C wcfsetup/install/files/ \
                <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.4_session_3_migrate_session.php</instruction>
                
                <!-- New application code. -->
-               <instruction type="file" skipStyleUpdate="true" />
+               <instruction type="file" />
                <instruction type="acpTemplate" />
                <instruction type="template" />
                
@@ -91,9 +91,6 @@ tar cvf com.woltlab.wcf/files_pre.tar -C wcfsetup/install/files/ \
                <!-- Cleanup of the filesystem. -->
                <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.4_removeFiles.php</instruction>
                
-               <!-- Update of the styles that was skipped during the deployment of the new application code. -->
-               <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.4_updateStyle.php</instruction>
-               
                <!-- Misc. PIPs. -->
                <instruction type="objectTypeDefinition" />
                <instruction type="objectType" />
diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_updateStyle.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_updateStyle.php
deleted file mode 100644 (file)
index e9e2d78..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-/**
- * Runs the skipped style update.
- *
- * @author  Tim Duesterhus
- * @copyright   2001-2020 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-
-use wcf\util\StyleUtil;
-
-StyleUtil::updateStyleFile();
index a9b03df4891393de39afd5d948a84c6e07582816..8020b521b03345ea8190d252d9961eed8b5b5f8c 100644 (file)
@@ -9,8 +9,8 @@ use wcf\system\exception\SystemException;
 use wcf\system\package\FilesFileHandler;
 use wcf\system\package\PackageArchive;
 use wcf\system\package\PackageInstallationDispatcher;
+use wcf\system\style\StyleHandler;
 use wcf\system\WCF;
-use wcf\util\StyleUtil;
 
 /**
  * Installs, updates and deletes files.
@@ -90,10 +90,7 @@ class FilePackageInstallationPlugin extends AbstractPackageInstallationPlugin im
         // delete temporary sourceArchive
         @\unlink($sourceFile);
 
-        if (!isset($this->instruction['attributes']['skipStyleUpdate'])) {
-            // update acp style file
-            StyleUtil::updateStyleFile();
-        }
+        StyleHandler::resetStylesheets(true);
     }
 
     /**
index 9ab333fa81e86c4606791e83702c227097d31536..ffd4571ea8b15ccaf1a8e222bb4f3b8a0965f5b2 100644 (file)
@@ -162,7 +162,7 @@ final class StyleUtil
     }
 
     /**
-     * Updates the acp style file.
+     * @deprecated 5.4 Call StyleCompiler::compileACP() directly.
      */
     public static function updateStyleFile()
     {