]> git.mxchange.org Git - friendica.git/commitdiff
"items per page" is now in the site settings as well
authorMichael <heluecht@pirati.ca>
Sun, 3 Dec 2023 14:30:40 +0000 (14:30 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 3 Dec 2023 14:30:40 +0000 (14:30 +0000)
src/Module/Admin/Site.php
view/templates/admin/site.tpl
view/theme/frio/templates/admin/site.tpl

index 05cb35641d4192356ffb8d244e4ca4c2ac1c4efb..c1ba01d38343a02ea3c5499b0f79784f5acb3414 100644 (file)
@@ -133,6 +133,8 @@ class Site extends BaseAdmin
                $suppress_tags          = !empty($_POST['suppress_tags']);
                $max_comments           = (!empty($_POST['max_comments'])           ? intval($_POST['max_comments'])                  : 0);
                $max_display_comments   = (!empty($_POST['max_display_comments'])   ? intval($_POST['max_display_comments'])          : 0);
+               $itemspage_network      = (!empty($_POST['itemspage_network'])      ? intval($_POST['itemspage_network'])             : 0);
+               $itemspage_network_mobile = (!empty($_POST['itemspage_network_mobile']) ? intval($_POST['itemspage_network_mobile'])  : 0);
                $temppath               = (!empty($_POST['temppath'])               ? trim($_POST['temppath'])   : '');
                $singleuser             = (!empty($_POST['singleuser'])             ? trim($_POST['singleuser']) : '');
                $only_tag_search        = !empty($_POST['only_tag_search']);
@@ -297,6 +299,8 @@ class Site extends BaseAdmin
 
                $transactionConfig->set('system', 'max_comments', $max_comments);
                $transactionConfig->set('system', 'max_display_comments', $max_display_comments);
+               $transactionConfig->set('system', 'itemspage_network', $itemspage_network);
+               $transactionConfig->set('system', 'itemspage_network_mobile', $itemspage_network_mobile);
 
                if ($temppath != '') {
                        $temppath = BasePath::getRealPath($temppath);
@@ -550,6 +554,8 @@ class Site extends BaseAdmin
                        '$dbclean_expire_conv'    => ['dbclean_expire_conv', DI::l10n()->t('Lifespan of raw conversation data'), DI::config()->get('system', 'dbclean_expire_conversation'), DI::l10n()->t('The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be safe to remove it after 14 days, default is 90 days.')],
                        '$max_comments'           => ['max_comments', DI::l10n()->t('Maximum numbers of comments per post'), DI::config()->get('system', 'max_comments'), DI::l10n()->t('How much comments should be shown for each post? Default value is 100.')],
                        '$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.')],
+                       '$itemspage_network'      => ['itemspage_network', DI::l10n()->t('Items per page'), DI::config()->get('system', 'itemspage_network'), DI::l10n()->t('Number of items per page in stream pages (network, community, profile/contact statuses, search).')],
+                       '$itemspage_network_mobile' => ['itemspage_network_mobile', DI::l10n()->t('Items per page for mobile devices'), DI::config()->get('system', 'itemspage_network_mobile'), DI::l10n()->t('Number of items per page in stream pages (network, community, profile/contact statuses, search) for mobile devices.')],
                        '$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.')],
                        '$compute_circle_counts'  => ['compute_circle_counts', DI::l10n()->t('Generate counts per contact circle when calculating network count'), DI::config()->get('system', 'compute_circle_counts'), DI::l10n()->t('On systems with users that heavily use contact circles the query can be very expensive.')],
index e047b62aad42a184e5e76d8b7cf3ce444e9f8295..ce82c249a410ceda8b470c4ba512b4641b3c67f1 100644 (file)
                {{include file="field_checkbox.tpl" field=$only_tag_search}}
                {{include file="field_input.tpl" field=$max_comments}}
                {{include file="field_input.tpl" field=$max_display_comments}}
+               {{include file="field_input.tpl" field=$itemspage_network}}
+               {{include file="field_input.tpl" field=$itemspage_network_mobile}}
                {{include file="field_checkbox.tpl" field=$dbclean}}
                {{include file="field_input.tpl" field=$dbclean_expire_days}}
                {{include file="field_input.tpl" field=$dbclean_unclaimed}}
index a3be0a43150c91c326d57e0e1ac622641762a6fc..aef0f1f4b09693719beb7b4f568f3fb02e50d658 100644 (file)
                                                {{include file="field_checkbox.tpl" field=$only_tag_search}}
                                                {{include file="field_input.tpl" field=$max_comments}}
                                                {{include file="field_input.tpl" field=$max_display_comments}}
+                                               {{include file="field_input.tpl" field=$itemspage_network}}
+                                               {{include file="field_input.tpl" field=$itemspage_network_mobile}}
                                                {{include file="field_checkbox.tpl" field=$dbclean}}
                                                {{include file="field_input.tpl" field=$dbclean_expire_days}}
                                                {{include file="field_input.tpl" field=$dbclean_unclaimed}}