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
26 changes: 26 additions & 0 deletions config/vanilla/bootstrap.late.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,30 @@
// Check all roles in the env and update all role permissions in RoleModel
// updateRolePermissions(RoleModel::TYPE_TOPCODER, RoleModel::TOPCODER_ROLES);
// updateTopcoderRolePermissions(RoleModel::TYPE_TOPCODER,RoleModel::TOPCODER_PROJECT_ROLES);

// FIX: https://github.com/topcoder-platform/forums/issues/218
// Create a parent category for Groups if it doesn't exist
// Make sure that the UrlCode is unique among categories.
$GroupCategoryExists = Gdn::sql()->select('CategoryID')
->from('Category')
->where('UrlCode', 'groups')
->get()->numRows();
if($GroupCategoryExists == 0) {
$data = [
'Name' => 'Groups',
'UrlCode' => 'groups',
'DisplayAs' => 'categories',
'ParentCategoryID' => -1,
'AllowDiscussions'=> 0,
];
$date = Gdn_Format::toDateTime();
$CategoryModel = CategoryModel::instance();
Gdn::sql()->insert('Category', ['ParentCategoryID' => -1, 'TreeLeft' => 2, 'TreeRight' => 3, 'Depth' => 1, 'InsertUserID' => 1,
'UpdateUserID' => 1, 'DateInserted' => $date, 'DateUpdated' => $date,
'Name' => 'Groups', 'UrlCode' => 'groups', 'Description' => '', 'PermissionCategoryID' => -1, 'DisplayAs' => 'Categories',
'LastDiscussionCommentsDate' => $date]);
$CategoryModel->rebuildTree();
$CategoryModel->recalculateTree();
unset($CategoryModel);
}
}
14 changes: 14 additions & 0 deletions config/vanilla/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,17 @@
// 'Email.ConversationMessage' = 'Notify me of private messages.'
// 'Popup.ConversationMessage' = 'Notify me of private messages.'
$Configuration['Garden']['Profile']['ShowActivities']=false;

// Flood Control
$Configuration['Vanilla']['Comment']['SpamCount'] = '5';
$Configuration['Vanilla']['Comment']['SpamTime'] = '60';
$Configuration['Vanilla']['Comment']['SpamLock'] = '120';
$Configuration['Vanilla']['Discussion']['SpamCount'] = '3';
$Configuration['Vanilla']['Discussion']['SpamTime'] = '60';
$Configuration['Vanilla']['Discussion']['SpamLock'] = '120';
$Configuration['Vanilla']['Activity']['SpamCount'] = '5';
$Configuration['Vanilla']['Activity']['SpamTime'] = '60';
$Configuration['Vanilla']['Activity']['SpamLock'] = '120';
$Configuration['Vanilla']['ActivityComment']['SpamCount'] = '5';
$Configuration['Vanilla']['ActivityComment']['SpamTime'] = '60';
$Configuration['Vanilla']['ActivityComment']['SpamLock'] = '120';
Loading