From: Joshua Rüsweg Date: Thu, 22 Nov 2018 09:45:28 +0000 (+0100) Subject: Add support for hidden user content provider X-Git-Tag: 5.2.0_Alpha_1~492 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d05c7d03778a13882bae14f27d8c3a367c6ce094;p=GitHub%2FWoltLab%2FWCF.git Add support for hidden user content provider Hidden content providers are useful, if a user content provider requires to delete other content first, before the user content provider can remove their content. See #2716 --- diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index ece147d27d..3866ccc99f 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -809,7 +809,9 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio public function prepareRemoveContent() { $knownContentProvider = array_map(function ($contentProvider) { return $contentProvider->objectType; - }, ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.content.userContentProvider')); + }, array_filter(ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.content.userContentProvider'), function ($contentProvider) { + return !$contentProvider->hidden; + })); return [ 'template' => WCF::getTPL()->fetch('removeUserContentDialog', 'wcf', [