[FOLLOWUP][BUGFIX] Switch-User feature uses wrong user id for logging 19/46919/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2016 16:20:47 +0000 (17:20 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 26 Feb 2016 16:32:23 +0000 (17:32 +0100)
For master, the username partial is inlined to the main template to
suppress a whitespace issue with fluid.
For 7.6, the inlining went wrong and a variable change is applied.

Change-Id: Ibe3626b581d0203307be1347e6708bc15cb3db9d
Resolves: 71580
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/46919
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/belog/Resources/Private/Partials/Content/LogEntries.html
typo3/sysext/belog/Resources/Private/Partials/Content/Username.html [deleted file]

index 8e359c3..94a608f 100755 (executable)
                                                                </f:if>
                                                        </td>
                                                        <td valign="top">
-                                                               <f:render partial="Content/Username" arguments="{userId:logItem.backendUserUid}" />
+                                                               <f:if condition="{belog:username(uid:logItem.backendUserUid)}">
+                                                                       <f:then><belog:username uid="{logItem.backendUserUid}" /></f:then>
+                                                                       <f:else>[{logItem.backendUserUid}]</f:else>
+                                                               </f:if>
                                                                <f:if condition="{logItem.logData.originalUser}">
-                                                                       ({f:translate(key:'viaUser')} <f:render partial="Content/Username" arguments="{userId:logItem.logData.originalUser}" />)
+                                                                       ({f:translate(key:'viaUser')}
+                                                                       <f:if condition="{belog:username(uid:logItem.logData.originalUser)}">
+                                                                               <f:then><belog:username uid="{logItem.logData.originalUser}" /></f:then>
+                                                                               <f:else>[{logItem.logData.originalUser}]</f:else>
+                                                                       </f:if>)
                                                                </f:if>
                                                                <br>
                                                                <span class="text-muted">
diff --git a/typo3/sysext/belog/Resources/Private/Partials/Content/Username.html b/typo3/sysext/belog/Resources/Private/Partials/Content/Username.html
deleted file mode 100644 (file)
index 30f83c0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<html data-namespace-typo3-fluid="true"
-               xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
-               xmlns:belog="http://typo3.org/ns/TYPO3/CMS/Belog/ViewHelpers">
-
-<f:if condition="{belog:username(uid:userId)}">
-       <f:then><belog:username uid="{userId}" /></f:then>
-       <f:else>[{userId}]</f:else>
-</f:if>
-
-</html>
\ No newline at end of file