/** * Creates a new GroupedAttachmentList object. * * @param string $objectType */ public function __construct($objectType) { parent::__construct(); $this->objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.attachment.objectType', $objectType); $this->getConditionBuilder()->add('attachment.objectTypeID = ?', array($this->objectType->objectTypeID)); $this->getConditionBuilder()->add('(SELECT embeddedObjectID FROM wcf' . WCF_N . '_message_embedded_object WHERE messageObjectTypeID = ? AND messageID = attachment.objectID AND embeddedObjectTypeID = ? AND embeddedObjectID = attachment.attachmentID) IS NULL', array(ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.message', $objectType), ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.message.embeddedObject', 'com.woltlab.wcf.attachment'))); }
/** * Creates a new AdministrativeAttachmentList object. */ public function __construct() { parent::__construct(); $this->sqlSelects = 'user_table.username'; $this->sqlJoins = " LEFT JOIN wcf" . WCF_N . "_user user_table ON (user_table.userID = attachment.userID)"; }