From e31c71a2c55245c9e1fa087311f63466fb424b8f Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 9 Jan 2013 22:34:42 +0100 Subject: [PATCH] Adds AbstractClipboardAction::getEditorLabel() --- .../action/AbstractClipboardAction.class.php | 13 ++++++++++--- .../clipboard/action/UserClipboardAction.class.php | 9 --------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/wcfsetup/install/files/lib/system/clipboard/action/AbstractClipboardAction.class.php b/wcfsetup/install/files/lib/system/clipboard/action/AbstractClipboardAction.class.php index 0fe1a4fae8..0190301e48 100644 --- a/wcfsetup/install/files/lib/system/clipboard/action/AbstractClipboardAction.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/action/AbstractClipboardAction.class.php @@ -2,6 +2,7 @@ namespace wcf\system\clipboard\action; use wcf\system\clipboard\ClipboardEditorItem; use wcf\system\exception\SystemException; +use wcf\system\WCF; /** * Abstract implementation of a clipboard action handler. @@ -44,14 +45,11 @@ abstract class AbstractClipboardAction implements IClipboardAction { $item = new ClipboardEditorItem(); $item->setName($this->getTypeName().'.'.$actionName); - - // set action class-related data if (in_array($actionName, $this->actionClassActions)) { $item->addParameter('actionName', $actionName); $item->addParameter('className', $this->getClassName()); } - // validate objects if relevant method exists and set valid object ids $methodName = 'validate'.ucfirst($actionName); if (method_exists($this, $methodName)) { $objectIDs = $this->$methodName(); @@ -71,4 +69,13 @@ abstract class AbstractClipboardAction implements IClipboardAction { public function filterObjects(array $objects, array $typeData) { return $objects; } + + /** + * @see wcf\system\clipboard\action\IClipboardAction::getEditorLabel() + */ + public function getEditorLabel(array $objects) { + return WCF::getLanguage()->getDynamicVariable('wcf.clipboard.label.'.$this->getTypeName().'.marked', array( + 'count' => count($objects) + )); + } } diff --git a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php index 36f19ac564..0b0fe57652 100644 --- a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php @@ -124,13 +124,4 @@ class UserClipboardAction extends AbstractClipboardAction { return $userIDs; } - - /** - * @see wcf\system\clipboard\action\IClipboardAction::getEditorLabel() - */ - public function getEditorLabel(array $objects) { - return WCF::getLanguage()->getDynamicVariable('wcf.clipboard.label.com.woltlab.wcf.user.marked', array( - 'count' => count($objects) - )); - } } -- 2.20.1