From ab2d3a165aba1653ed21cccce35f0529bf08dd75 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 27 Jul 2019 09:24:07 +0200 Subject: [PATCH] Hide notice for missing phrases on ACP index page if file is empty See #2983 --- wcfsetup/install/files/lib/acp/page/IndexPage.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php index f36432cd98..f696acf23b 100755 --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@ -7,6 +7,7 @@ use wcf\system\io\RemoteFile; use wcf\system\package\PackageInstallationDispatcher; use wcf\system\request\LinkHandler; use wcf\system\WCF; +use wcf\util\StringUtil; /** * Shows the welcome page in admin control panel. @@ -114,7 +115,12 @@ class IndexPage extends AbstractPage { } $missingLanguageItemsMTime = 0; - if (ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && file_exists(WCF_DIR . 'log/missingLanguageItems.txt')) { + if ( + ENABLE_DEBUG_MODE + && ENABLE_DEVELOPER_TOOLS + && file_exists(WCF_DIR . 'log/missingLanguageItems.txt') + && mb_strlen(StringUtil::trim(file_get_contents(WCF_DIR . 'log/missingLanguageItems.txt'))) > 0 + ) { $missingLanguageItemsMTime = filemtime(WCF_DIR . 'log/missingLanguageItems.txt'); } -- 2.20.1