Revert "[TASK] Rebuild the calcAge functionality"
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / EditDocumentController.php
index 482ef54..062999a 100644 (file)
@@ -998,15 +998,7 @@ class EditDocumentController {
                                                                )
                                                        )
                                                ) . '; return false;';
-                                       // Undo button
-                                       $buttons['undo'] = '<a href="#"
-                                               onclick="' . htmlspecialchars($aOnClick) . '"
-                                               title="' . htmlspecialchars(
-                                                       sprintf(
-                                                               $GLOBALS['LANG']->getLL('undoLastChange'),
-                                                               \TYPO3\CMS\Core\Utility\DateTimeUtility::getAgeStringUnix($undoButtonR['tstamp'])
-                                                       )
-                                               ) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
+                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) {
                                        $aOnClick = 'window.location.href=' .