[BUGFIX] Fix argument ordering of RecordHistoryStore 41/58641/3
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 15 Oct 2018 19:46:52 +0000 (21:46 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 17 Oct 2018 10:07:37 +0000 (12:07 +0200)
The DataHandler must use the correct ordering of arguments of
RecordHistoryStore. Furthermore the sorting of the arguments in the
doc block is fixed.

Resolves: #86657
Releases: master
Change-Id: I3054cb5a94f0e84a5c93accfd6349b7c24dbc885
Reviewed-on: https://review.typo3.org/58641
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/History/RecordHistoryStore.php

index a29dba3..cdfff01 100644 (file)
@@ -7436,6 +7436,7 @@ class DataHandler implements LoggerAwareInterface
             RecordHistoryStore::USER_BACKEND,
             $this->BE_USER->user['uid'],
             $this->BE_USER->user['ses_backuserid'] ?? null,
+            $GLOBALS['EXEC_TIME'],
             $this->BE_USER->workspace
         );
     }
index 8f5fe71..4f5803f 100644 (file)
@@ -62,16 +62,16 @@ class RecordHistoryStore
     protected $workspaceId;
 
     /**
-     * @param int|null $userId
      * @param string $userType
+     * @param int|null $userId
      * @param int $originalUserId
      * @param int $tstamp
      * @param int $workspaceId
      */
     public function __construct(string $userType = self::USER_BACKEND, int $userId = null, int $originalUserId = null, int $tstamp = null, int $workspaceId = 0)
     {
-        $this->userId = $userId;
         $this->userType = $userType;
+        $this->userId = $userId;
         $this->originalUserId = $originalUserId;
         $this->tstamp = $tstamp ?: $GLOBALS['EXEC_TIME'];
         $this->workspaceId = $workspaceId;