Make network counts at the group level system level configurable
This commit is contained in:
parent
464fdb955c
commit
e57e1ba1e5
6 changed files with 200 additions and 180 deletions
|
@ -134,6 +134,7 @@ class Site extends BaseAdmin
|
||||||
$temppath = (!empty($_POST['temppath']) ? trim($_POST['temppath']) : '');
|
$temppath = (!empty($_POST['temppath']) ? trim($_POST['temppath']) : '');
|
||||||
$singleuser = (!empty($_POST['singleuser']) ? trim($_POST['singleuser']) : '');
|
$singleuser = (!empty($_POST['singleuser']) ? trim($_POST['singleuser']) : '');
|
||||||
$only_tag_search = !empty($_POST['only_tag_search']);
|
$only_tag_search = !empty($_POST['only_tag_search']);
|
||||||
|
$compute_group_counts = !empty($_POST['compute_group_counts']);
|
||||||
$check_new_version_url = (!empty($_POST['check_new_version_url']) ? trim($_POST['check_new_version_url']) : 'none');
|
$check_new_version_url = (!empty($_POST['check_new_version_url']) ? trim($_POST['check_new_version_url']) : 'none');
|
||||||
|
|
||||||
$worker_queues = (!empty($_POST['worker_queues']) ? intval($_POST['worker_queues']) : 10);
|
$worker_queues = (!empty($_POST['worker_queues']) ? intval($_POST['worker_queues']) : 10);
|
||||||
|
@ -304,6 +305,7 @@ class Site extends BaseAdmin
|
||||||
DI::config()->set('system', 'temppath', $temppath);
|
DI::config()->set('system', 'temppath', $temppath);
|
||||||
|
|
||||||
DI::config()->set('system', 'only_tag_search' , $only_tag_search);
|
DI::config()->set('system', 'only_tag_search' , $only_tag_search);
|
||||||
|
DI::config()->set('system', 'compute_group_counts', $compute_group_counts);
|
||||||
|
|
||||||
DI::config()->set('system', 'worker_queues' , $worker_queues);
|
DI::config()->set('system', 'worker_queues' , $worker_queues);
|
||||||
DI::config()->set('system', 'worker_fastlane' , $worker_fastlane);
|
DI::config()->set('system', 'worker_fastlane' , $worker_fastlane);
|
||||||
|
@ -534,6 +536,7 @@ class Site extends BaseAdmin
|
||||||
'$max_display_comments' => ['max_display_comments', DI::l10n()->t('Maximum numbers of comments per post on the display page'), DI::config()->get('system', 'max_display_comments'), DI::l10n()->t('How many comments should be shown on the single view for each post? Default value is 1000.')],
|
'$max_display_comments' => ['max_display_comments', DI::l10n()->t('Maximum numbers of comments per post on the display page'), DI::config()->get('system', 'max_display_comments'), DI::l10n()->t('How many comments should be shown on the single view for each post? Default value is 1000.')],
|
||||||
'$temppath' => ['temppath', DI::l10n()->t('Temp path'), DI::config()->get('system', 'temppath'), DI::l10n()->t('If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.')],
|
'$temppath' => ['temppath', DI::l10n()->t('Temp path'), DI::config()->get('system', 'temppath'), DI::l10n()->t('If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.')],
|
||||||
'$only_tag_search' => ['only_tag_search', DI::l10n()->t('Only search in tags'), DI::config()->get('system', 'only_tag_search'), DI::l10n()->t('On large systems the text search can slow down the system extremely.')],
|
'$only_tag_search' => ['only_tag_search', DI::l10n()->t('Only search in tags'), DI::config()->get('system', 'only_tag_search'), DI::l10n()->t('On large systems the text search can slow down the system extremely.')],
|
||||||
|
'$compute_group_counts' => ['compute_group_counts', DI::l10n()->t('Generate counts per contact group when calculating network count'), DI::config()->get('system', 'compute_group_counts'), DI::l10n()->t('On systems with users that heavily use contact groups the query can be very expensive.')],
|
||||||
|
|
||||||
'$worker_queues' => ['worker_queues', DI::l10n()->t('Maximum number of parallel workers'), DI::config()->get('system', 'worker_queues'), DI::l10n()->t('On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)],
|
'$worker_queues' => ['worker_queues', DI::l10n()->t('Maximum number of parallel workers'), DI::config()->get('system', 'worker_queues'), DI::l10n()->t('On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)],
|
||||||
'$worker_fastlane' => ['worker_fastlane', DI::l10n()->t('Enable fastlane'), DI::config()->get('system', 'worker_fastlane'), DI::l10n()->t('When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.')],
|
'$worker_fastlane' => ['worker_fastlane', DI::l10n()->t('Enable fastlane'), DI::config()->get('system', 'worker_fastlane'), DI::l10n()->t('When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.')],
|
||||||
|
|
|
@ -113,7 +113,8 @@ class Ping extends BaseModule
|
||||||
}
|
}
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if ($network_count) {
|
$compute_group_counts = DI::config()->get('system','compute_group_counts');
|
||||||
|
if ($network_count && $compute_group_counts) {
|
||||||
// Find out how unseen network posts are spread across groups
|
// Find out how unseen network posts are spread across groups
|
||||||
$group_counts = Group::countUnseen();
|
$group_counts = Group::countUnseen();
|
||||||
if (DBA::isResult($group_counts)) {
|
if (DBA::isResult($group_counts)) {
|
||||||
|
|
|
@ -114,6 +114,10 @@ return [
|
||||||
// Default value comprises classic role names from RFC 2142.
|
// Default value comprises classic role names from RFC 2142.
|
||||||
'forbidden_nicknames' => 'info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop',
|
'forbidden_nicknames' => 'info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop',
|
||||||
|
|
||||||
|
// compute_group_counts (Boolean)
|
||||||
|
// Compute contact group level when counting unseen network posts.
|
||||||
|
'compute_group_counts' => true,
|
||||||
|
|
||||||
// jpeg_quality (Integer)
|
// jpeg_quality (Integer)
|
||||||
// Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).
|
// Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).
|
||||||
'jpeg_quality' => 100,
|
'jpeg_quality' => 100,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -107,6 +107,7 @@
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}"/></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}"/></div>
|
||||||
|
|
||||||
<h2>{{$performance}}</h2>
|
<h2>{{$performance}}</h2>
|
||||||
|
{{include file="field_checkbox.tpl" field=$compute_group_counts}}
|
||||||
{{include file="field_checkbox.tpl" field=$only_tag_search}}
|
{{include file="field_checkbox.tpl" field=$only_tag_search}}
|
||||||
{{include file="field_input.tpl" field=$max_comments}}
|
{{include file="field_input.tpl" field=$max_comments}}
|
||||||
{{include file="field_input.tpl" field=$max_display_comments}}
|
{{include file="field_input.tpl" field=$max_display_comments}}
|
||||||
|
|
|
@ -242,6 +242,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="admin-settings-performance-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-performance">
|
<div id="admin-settings-performance-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="admin-settings-performance">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
{{include file="field_checkbox.tpl" field=$compute_group_counts}}
|
||||||
{{include file="field_checkbox.tpl" field=$only_tag_search}}
|
{{include file="field_checkbox.tpl" field=$only_tag_search}}
|
||||||
{{include file="field_input.tpl" field=$max_comments}}
|
{{include file="field_input.tpl" field=$max_comments}}
|
||||||
{{include file="field_input.tpl" field=$max_display_comments}}
|
{{include file="field_input.tpl" field=$max_display_comments}}
|
||||||
|
|
Loading…
Reference in a new issue