From: Alexander Ebert Date: Mon, 11 Jun 2012 13:19:59 +0000 (+0200) Subject: Improved clipboard actions X-Git-Tag: 2.0.0_Beta_1~1006^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb434b97b31ab797674822db93820d97ba7fdd20;p=GitHub%2FWoltLab%2FWCF.git Improved clipboard actions --- diff --git a/wcfsetup/install/files/lib/action/ClipboardAction.class.php b/wcfsetup/install/files/lib/action/ClipboardAction.class.php index ba7e9a1874..4e27af8cb1 100644 --- a/wcfsetup/install/files/lib/action/ClipboardAction.class.php +++ b/wcfsetup/install/files/lib/action/ClipboardAction.class.php @@ -136,7 +136,7 @@ class ClipboardAction extends AbstractSecureAction { 'actionName' => $item->getName(), 'internalData' => $item->getInternalData(), 'parameters' => $item->getParameters(), - 'label' => WCF::getLanguage()->get('wcf.clipboard.item.' . $item->getName()), + 'label' => WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.' . $item->getName(), array('count' => $item->getCount())), 'url' => $item->getURL() ); } diff --git a/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php b/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php index 3cb49a9058..46eaefbcd1 100644 --- a/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/ClipboardEditorItem.class.php @@ -131,4 +131,17 @@ final class ClipboardEditorItem { public function setURL($url) { $this->url = $url; } + + /** + * Returns number of affected items. + * + * @return integer + */ + public function getCount() { + if (isset($this->parameters['objectIDs'])) { + return count($this->parameters['objectIDs']); + } + + return 0; + } }