/** * @see wcf\system\clipboard\action\IClipboardAction::execute() */ public function execute(array $objects, $actionName) { $item = parent::execute($objects, $actionName); if ($item === null) { return null; } // handle actions switch ($actionName) { case 'assignToGroup': $item->setURL(LinkHandler::getInstance()->getLink('UserAssignToGroup')); break; case 'delete': $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.com.woltlab.wcf.user.delete.confirmMessage', array( 'count' => $item->getCount() ))); break; case 'exportMailAddress': $item->setURL(LinkHandler::getInstance()->getLink('UserEmailAddressExport')); break; case 'sendMail': $item->setURL(LinkHandler::getInstance()->getLink('UserMail')); break; } return $item; }
/** * @see \wcf\system\clipboard\action\IClipboardAction::execute() */ public function execute(array $objects, ClipboardAction $action) { if ($this->conversations === null) { // validate conversations $this->validateParticipation($objects); } // check if no conversation was accessible if (empty($this->conversations)) { return null; } $item = parent::execute($objects, $action); if ($item === null) { return null; } switch ($action->actionName) { case 'assignLabel': // check if user has labels $sql = "SELECT\tCOUNT(*) AS count\n\t\t\t\t\tFROM\twcf" . WCF_N . "_conversation_label\n\t\t\t\t\tWHERE\tuserID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array(WCF::getUser()->userID)); $row = $statement->fetchArray(); if ($row['count'] == 0) { return null; } $item->addParameter('objectIDs', array_keys($this->conversations)); break; case 'leave': $item->addInternalData('parameters', array('hideConversation' => 1)); $item->addParameter('actionName', 'hideConversation'); $item->addParameter('className', $this->getClassName()); break; case 'leavePermanently': $item->addParameter('objectIDs', array_keys($this->conversations)); $item->addInternalData('parameters', array('hideConversation' => 2)); $item->addParameter('actionName', 'hideConversation'); $item->addParameter('className', $this->getClassName()); break; case 'markAsRead': $item->addParameter('objectIDs', array_keys($this->conversations)); $item->addParameter('actionName', 'markAsRead'); $item->addParameter('className', $this->getClassName()); $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.com.woltlab.wcf.conversation.conversation.markAsRead.confirmMessage', array('count' => $item->getCount()))); break; case 'restore': $item->addInternalData('parameters', array('hideConversation' => 0)); $item->addParameter('actionName', 'hideConversation'); $item->addParameter('className', $this->getClassName()); break; } return $item; }
/** * @see \wcf\system\clipboard\action\IClipboardAction::execute() */ public function execute(array $objects, ClipboardAction $action) { $item = parent::execute($objects, $action); if ($item === null) { return null; } // handle actions switch ($action->actionName) { case 'revertContentChanges': $item->setURL(LinkHandler::getInstance()->getLink('UserContentRevertChanges')); break; } return $item; }
/** * @see \wcf\system\clipboard\action\IClipboardAction::execute() */ public function execute(array $objects, ClipboardAction $action) { $item = parent::execute($objects, $action); if ($item === null) { return null; } // handle actions switch ($action->actionName) { case 'delete': $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.de.codequake.cms.content.delete.confirmMessage', array('count' => $item->getCount()))); break; } return $item; }
/** * @see \wcf\system\clipboard\action\IClipboardAction::execute() */ public function execute(array $objects, ClipboardAction $action) { $this->files = $objects; $item = parent::execute($objects, $action); if ($item === null) { return null; } // handle actions switch ($action->actionName) { case 'trash': $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.de.incendium.filebase.entry.file.trash.confirmMessage', array('count' => $item->getCount()))); $item->addInternalData('template', WCF::getTPL()->fetch('entryFileDeleteReason', 'filebase')); break; case 'delete': $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.de.incendium.filebase.entry.file.delete.confirmMessage', array('count' => $item->getCount()))); break; } return $item; }
public function execute(array $objects, ClipboardAction $action) { if (empty($this->news)) { $this->news = $objects; } $item = parent::execute($objects, $action); if ($item === null) { return null; } switch ($action->actionName) { case 'delete': $item->addParameter('objectIDs', array_keys($this->news)); $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.de.codequake.cms.news.delete.confirmMessage', array('count' => $item->getCount()))); $item->addParameter('className', $this->getClassName()); $item->setName('de.codequake.cms.news.delete'); break; } return $item; }