[BUGFIX] Improvement of LanguageCacheClearer 06/20706/2
authorGeorg Ringer <georg.ringer@gmail.com>
Sat, 4 May 2013 10:38:26 +0000 (12:38 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 11 May 2013 21:46:57 +0000 (23:46 +0200)
The cache is cleared no matter if the call is valid
or not. As a solution the relevant line needs to be moved
inside the if clause

Change-Id: I171b28786094a75f9e971685f4384d6631ab9c52
Fixes: #47912
Releases: 6.2,6.1,6.0,4.7
Reviewed-on: https://review.typo3.org/20706
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/lang/Classes/LanguageCacheClearer.php

index d1be763..e697994 100644 (file)
@@ -68,9 +68,8 @@ class LanguageCacheClearer {
 
                if (isset($GLOBALS['BE_USER']) && $isValidCall) {
                        $GLOBALS['BE_USER']->writelog(3, 1, 0, 0, '[lang]: User %s has cleared the language cache', array($GLOBALS['BE_USER']->user['username']));
+                       $this->cacheInstance->flush();
                }
-
-               $this->cacheInstance->flush();
        }
 
 }