From: Matthias Schmidt Date: Sat, 27 Jul 2019 07:24:07 +0000 (+0200) Subject: Hide notice for missing phrases on ACP index page if file is empty X-Git-Tag: 5.2.0_Alpha_3~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab2d3a165aba1653ed21cccce35f0529bf08dd75;p=GitHub%2FWoltLab%2FWCF.git Hide notice for missing phrases on ACP index page if file is empty See #2983 --- 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'); }