Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion config/vanilla/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,12 @@
$Configuration['Vanilla']['Activity']['SpamLock'] = '120';
$Configuration['Vanilla']['ActivityComment']['SpamCount'] = '5';
$Configuration['Vanilla']['ActivityComment']['SpamTime'] = '60';
$Configuration['Vanilla']['ActivityComment']['SpamLock'] = '120';
$Configuration['Vanilla']['ActivityComment']['SpamLock'] = '120';

// Posting Settings:
// Should users be automatically pushed to the last comment they read in a discussion?
$Configuration['Vanilla']['Comments']['AutoOffset'] = false;
// Maximum number of characters allowed in a comment
$Configuration['Vanilla']['Comment']['MaxLength'] = 16000;
// Minimum comment length to discourage short comments
$Configuration['Vanilla']['Comment']['MinLength'] = 2;
3 changes: 3 additions & 0 deletions vanilla/applications/vanilla/models/class.discussionmodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ public function get($offset = '0', $limit = '', $wheres = '', $additionalFields
unset($wheres['Announce']);
}

if (is_array($wheres)) {
$this->SQL->where($wheres);
}

foreach ($orderBy as $orderField => $direction) {
$this->SQL->orderBy($this->addFieldPrefix($orderField), $direction);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ function writeDiscussion($discussion, $sender, $session) {
$category = CategoryModel::categories($discussion->CategoryID);

if ($session->UserID) {
$discussionUrl .= '#latest';
// FIX: don't navigate to an editor
// $discussionUrl .= '#latest';
}
$sender->EventArguments['DiscussionUrl'] = &$discussionUrl;
$sender->EventArguments['Discussion'] = &$discussion;
Expand Down