Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Syncing files from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
charrondev committed Jan 4, 2022
1 parent fd4e2fa commit 0c73159
Show file tree
Hide file tree
Showing 487 changed files with 22,570 additions and 13,576 deletions.
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"calebporzio.better-phpunit",
"msjsdiag.debugger-for-chrome",
"eamodio.gitlens",
"firsttris.vscode-jest-runner",
"ziyasal.vscode-open-in-github",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.formatOnSave": true,
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
Expand Down
1 change: 0 additions & 1 deletion addons/themes/keystone/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"name": "Keystone",
"description": "A responsive Vanilla theme with customization options.",
"version": "2.0.1",
"hidden": false,
"authors": [
{
"name": "Isis Graziatto",
Expand Down
1 change: 0 additions & 1 deletion addons/themes/theme-foundation/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"name": "Foundation",
"description": "A responsive, asset-compatible Vanilla Forums theme.",
"version": "1.0.0",
"hidden": false,
"authors": [
{
"name": "Stéphane LaFlèche",
Expand Down
2 changes: 1 addition & 1 deletion applications/conversations/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
}
],
"version": "3.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,12 @@ public function normalizeOutput(array $dbRecord) {
$dbRecord['name'] = ConversationModel::participantTitle($dbRecord, false);
}

$defaultMsg = t('No messages.');
$lastBody = $dbRecord['LastBody'] ?? '';
$dbRecord['body'] = $lastBody
? (Gdn::formatService()->renderPlainText($dbRecord['LastBody'], $dbRecord['LastFormat']) ?: $defaultMsg)
: $defaultMsg;
if (!empty($dbRecord['LastBody'])) {
$dbRecord['body'] = $dbRecord['LastBody'];
$this->formatField($dbRecord, 'body', $dbRecord['LastFormat']);
} else {
$dbRecord['body'] = t('No messages.');
}

$dbRecord['url'] = url("/messages/{$dbRecord['ConversationID']}", true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ public function save($formPostValues, $settings = []) {
// Add & apply any extra validation rules:
$this->Validation->applyRule('Body', 'Required');
$messageModel->Validation->applyRule('Body', 'Required');
} else {
$this->Validation->unapplyRule('Body', 'Required');
}

// Make sure that there is at least one recipient
Expand Down Expand Up @@ -768,7 +770,7 @@ public function countUnread($userID, $save = true) {
* @param int $readingUserID Unique ID of current user.
*/
public function markRead($conversationID, $readingUserID) {
// Update the the read conversation count for the user.
// Update the read conversation count for the user.
$this->SQL->update('UserConversation uc')
->join('Conversation c', 'c.ConversationID = uc.ConversationID')
->set('uc.CountReadMessages', 'c.CountMessages', false)
Expand Down
Loading

0 comments on commit 0c73159

Please sign in to comment.