Skip to content
Snippets Groups Projects
Commit 2325abd5 authored by Wouter Wolters's avatar Wouter Wolters Committed by Andreas Fernandez
Browse files

[!!!][TASK] Remove deprecated code from ext:beuser

Resolves: #72372
Releases: master
Change-Id: I1984ea732c9e21a99ed75fa8fc3a58faeb4b4275
Reviewed-on: https://review.typo3.org/45370


Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
parent 0eb39672
Branches
Tags
No related merge requests found
......@@ -257,40 +257,6 @@ class PermissionAjaxController
. '</span>';
}
/**
* Print the string with the new owner of a page record
*
* @param int $page The TYPO3 page id
* @param int $ownerUid The new page user uid
* @param string $username The TYPO3 BE username (used to display in the element)
* @param bool $validUser Must be set to FALSE, if the user has no name or is deleted
* @return string The new group wrapped in HTML
* @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. This is now solved with fluid.
*/
public static function renderOwnername($page, $ownerUid, $username, $validUser = true)
{
GeneralUtility::logDeprecatedFunction();
$elementId = 'o_' . $page;
return '<span id="' . $elementId . '"><a class="ug_selector changeowner" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-username="' . htmlspecialchars($username) . '">' . ($validUser ? ($username == '' ? '<span class=not_set>[' . $GLOBALS['LANG']->getLL('notSet') . ']</span>' : htmlspecialchars(GeneralUtility::fixed_lgd_cs($username, 20))) : '<span class=not_set title="' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($username, 20)) . '">[' . $GLOBALS['LANG']->getLL('deleted') . ']</span>') . '</a></span>';
}
/**
* Print the string with the new group of a page record
*
* @param int $page The TYPO3 page id
* @param int $groupUid The new page group uid
* @param string $groupname The TYPO3 BE groupname (used to display in the element)
* @param bool $validGroup Must be set to FALSE, if the group has no name or is deleted
* @return string The new group wrapped in HTML
* @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. This is now solved with fluid.
*/
public static function renderGroupname($page, $groupUid, $groupname, $validGroup = true)
{
GeneralUtility::logDeprecatedFunction();
$elementId = 'g_' . $page;
return '<span id="' . $elementId . '"><a class="ug_selector changegroup" data-page="' . $page . '" data-group="' . $groupUid . '" data-groupname="' . htmlspecialchars($groupname) . '">' . ($validGroup ? ($groupname == '' ? '<span class=not_set>[' . $GLOBALS['LANG']->getLL('notSet') . ']</span>' : htmlspecialchars(GeneralUtility::fixed_lgd_cs($groupname, 20))) : '<span class=not_set title="' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($groupname, 20)) . '">[' . $GLOBALS['LANG']->getLL('deleted') . ']</span>') . '</a></span>';
}
/**
* Print the string with the new edit lock state of a page record
*
......@@ -309,50 +275,6 @@ class PermissionAjaxController
return $ret;
}
/**
* Print a set of permissions. Also used in index.php
*
* @param int $int Permission integer (bits)
* @param int $pageId The TYPO3 page id
* @param string $who The scope (user, group or everybody)
* @return string HTML marked up x/* indications.
* @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. This is now solved with fluid.
*/
public static function renderPermissions($int, $pageId = 0, $who = 'user')
{
GeneralUtility::logDeprecatedFunction();
$str = '';
$permissions = array(1, 16, 2, 4, 8);
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
foreach ($permissions as $permission) {
if ($int & $permission) {
$str .= '<span title="' . $GLOBALS['LANG']->getLL($permission, true)
. ' class="change-permission text-success"'
. ' data-page="' . (int)$pageId . '"'
. ' data-permissions="' . (int)$int . '"'
. ' data-mode="delete"'
. ' data-who="' . htmlspecialchars($who) . '"'
. ' data-bits="' . $permission . '"'
. ' style="cursor:pointer">'
. $iconFactory->getIcon('status-status-permission-granted', Icon::SIZE_SMALL)->render()
. '</span>';
} else {
$str .= '<span title="' . $GLOBALS['LANG']->getLL($permission, true) . '"'
. ' class="change-permission text-danger"'
. ' data-page="' . (int)$pageId . '"'
. ' data-permissions="' . (int)$int . '"'
. ' data-mode="add"'
. ' data-who="' . htmlspecialchars($who) . '"'
. ' data-bits="' . $permission . '"'
. ' style="cursor:pointer">'
. $iconFactory->getIcon('status-status-permission-denied', Icon::SIZE_SMALL)->render()
. '</span>';
}
}
return '<span id="' . $pageId . '_' . $who . '">' . $str . '</span>';
}
/**
* @return \TYPO3\CMS\Lang\LanguageService
*/
......
======================================================
Breaking: #72372 - Removed deprecated code from beuser
======================================================
Description
===========
The following methods have been removed from `PermissionAjaxController`
``renderOwnername``
``renderPermissions``
``renderGroupname``
Impact
======
Using the methods above directly in any third party extension will result in a fatal error.
Affected Installations
======================
Instances which use calls to the methods above.
Migration
=========
Migrate your code that calls one of the methods to Fluid templates.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment