.gitignore 0100777 0000000 0000000 00000001047 12726032106 010005 0 ustar 00 # Linux
# backup files
*~
# Windows
# thumbnails
Thumbs.db
# Mac OS X
# metadata
.DS_Store
# thumbnails
._*
# Visual Studio PHP
*.sln
*.phpproj
*.puo
*.suo
*.cache
# Netbeans
nbproject/
catalog.xml
nbactions.xml
# Eclipse
.settings/
.buildpath
.classpath
.project
# SVN
# svn folders
.svn/
# PHPStorm
.idea/
.nameencodings
.xmlmisc
.xmlmodules
.xmlprojectCodeStyle
.xmlvcs.xml
*.imlworkspace
.xml
# Community Framework
# Ignore packages build directly in the workspace. They can however be added manually via git add, if wanted.
*.tar
*.tar.gz .travis.yml 0100777 0000000 0000000 00000000555 12726032106 010131 0 ustar 00 language: php
sudo: false
php:
- 5.6
- 5.5
before_install:
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
before_script:
- git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
script:
- find files -type f -name '*.php' |xargs -I file php -l file
- phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" files
CHANGELOG.md 0100777 0000000 0000000 00000000725 12726032106 007630 0 ustar 00 # Changelog
## 2.2
### 2.2.0 Alpha 1 (XXXX-YY-ZZ)
* Only search active conversation when using search bar in a conversation.
* Filter option for conversation participants on conversation list page.
* Increased number of items in conversation drop down to 10.
* Overhauled conversation drop down.
* Changed label of wcf.conversation.lastVisitTime
#### Documentation
* `@property-read` tags for database table columns of classes extending `wcf\data\DatabaseObject`.
clipboardAction.xml 0100777 0000000 0000000 00000004061 12726032106 011633 0 ustar 00
1
2
3
4
5
6
7
constants.php 0100777 0000000 0000000 00000001231 12726032106 010535 0 ustar 00
* @package com.woltlab.wcf.conversation
* @category Community Framework
*/
// option constants
define('MODULE_CONVERSATION', 1);
define('CONVERSATIONS_PER_PAGE', 10);
define('CONVERSATION_MESSAGES_PER_PAGE', 20);
define('CONVERSATION_REPLY_SHOW_MESSAGES_MAX', 10);
define('CONVERSATION_LIST_DEFAULT_SORT_FIELD', 'lastPostTime');
define('CONVERSATION_LIST_DEFAULT_SORT_ORDER', 'DESC');
coreObject.xml 0100777 0000000 0000000 00000000551 12726032106 010615 0 ustar 00
eventListener.xml 0100777 0000000 0000000 00000002056 12726032106 011367 0 ustar 00
wcf\acp\form\UserMergeForm
save
wcf\system\event\listener\ConversationUserMergeListener
admin
wcf\data\user\UserAction
rename
wcf\system\event\listener\ConversationUserActionRenameListener
user
wcf\data\user\UserAction
rename
wcf\system\event\listener\ConversationUserActionRenameListener
admin
files.tar 0100777 0000000 0000000 00001251000 12726032507 007631 0 ustar 00 acp/ 0040777 0000000 0000000 00000000000 12726032471 006563 5 ustar 00 acp/install_com.woltlab.wcf.conversation.php 0100777 0000000 0000000 00000001647 12726032110 016530 0 ustar 00
*/
// set default mod permissions
$group = new UserGroup(5);
if ($group->groupID) {
$sql = "REPLACE INTO wcf".WCF_N."_user_group_option_value
(groupID, optionID, optionValue)
SELECT 5, optionID, 1
FROM wcf".WCF_N."_user_group_option
WHERE optionName LIKE 'mod.conversation.%'";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
}
$group = new UserGroup(6);
if ($group->groupID) {
$sql = "REPLACE INTO wcf".WCF_N."_user_group_option_value
(groupID, optionID, optionValue)
SELECT 6, optionID, 1
FROM wcf".WCF_N."_user_group_option
WHERE optionName LIKE 'mod.conversation.%'";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
}
js/ 0040777 0000000 0000000 00000000000 12726032471 006434 5 ustar 00 js/WCF.Conversation.js 0100777 0000000 0000000 00000105675 12726032110 012066 0 ustar 00 /**
* Namespace for conversations.
*
* @author Alexander Ebert
* @copyright 2001-2015 WoltLab GmbH
* @license GNU Lesser General Public License
*/
WCF.Conversation = { };
/**
* Core editor handler for conversations.
*/
WCF.Conversation.EditorHandler = Class.extend({
/**
* list of attributes per conversation
* @var object
*/
_attributes: { },
/**
* list of conversations
* @var object
*/
_conversations: { },
/**
* list of permissions per conversation
* @var object
*/
_permissions: { },
/**
* Initializes the core editor handler for conversations.
*/
init: function(availableLabels) {
this._conversations = { };
var self = this;
$('.conversation').each(function(index, conversation) {
var $conversation = $(conversation);
var $conversationID = $conversation.data('conversationID');
if (!self._conversations[$conversationID]) {
self._conversations[$conversationID] = $conversation;
var $labelIDs = eval($conversation.data('labelIDs'));
// set attributes
self._attributes[$conversationID] = {
isClosed: ($conversation.data('isClosed') ? true : false),
labelIDs: $labelIDs
};
// set permissions
self._permissions[$conversationID] = {
canAddParticipants: ($conversation.data('canAddParticipants') ? true : false),
canCloseConversation: ($conversation.data('canCloseConversation') ? true : false)
};
}
});
},
/**
* Returns a permission's value for given conversation id.
*
* @param integer conversationID
* @param string permission
* @return boolean
*/
getPermission: function(conversationID, permission) {
if (this._permissions[conversationID][permission] === undefined) {
return false;
}
return (this._permissions[conversationID][permission]) ? true : false;
},
/**
* Returns an attribute's value for given conversation id.
*
* @param integer conversationID
* @param string key
* @return mixed
*/
getValue: function(conversationID, key) {
switch (key) {
case 'labelIDs':
if (this._attributes[conversationID].labelIDs === undefined) {
this._attributes[conversationID].labelIDs = [ ];
}
return this._attributes[conversationID].labelIDs;
break;
case 'isClosed':
return (this._attributes[conversationID].isClosed) ? true : false;
break;
}
},
/**
* Counts available labels.
*
* @return integer
*/
countAvailableLabels: function() {
return (this.getAvailableLabels()).length;
},
/**
* Returns a list with the data of the available labels.
*
* @return array