From 8c925cc303c2ce9cdc0abb179d5fcfd4853f2f01 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 11 Apr 2024 15:11:12 +0700 Subject: [PATCH] Minor improvements (#1443) * Minor improvements * Updated * Update terms.php * Update main.php * Update CHANGELOG.md * Update memberlist.tpl --- CHANGELOG.md | 2 +- library/language/source/main.php | 2 +- memberlist.php | 3 --- src/Legacy/Cache/APCu.php | 2 +- src/Legacy/Datastore/APCu.php | 2 +- styles/templates/default/memberlist.tpl | 23 ++++++++++------------- terms.php | 2 +- 7 files changed, 15 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53c1f50cc..c48c7b5bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka)) - Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka)) - Code refactoring [\#1441](https://github.com/torrentpier/torrentpier/pull/1441) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1435](https://github.com/torrentpier/torrentpier/pull/1435) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1435](https://github.com/torrentpier/torrentpier/pull/1435), [\#1443](https://github.com/torrentpier/torrentpier/pull/1443) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.4.2](https://github.com/torrentpier/torrentpier/tree/v2.4.2) (2024-03-30) [Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.1...v2.4.2) diff --git a/library/language/source/main.php b/library/language/source/main.php index d2e230887..89768ef3d 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -2749,7 +2749,7 @@ $lang['ATOM_GLOBAL_FEED'] = 'Global feed for all forums'; $lang['HASH_INVALID'] = 'Hash %s is invalid'; $lang['HASH_NOT_FOUND'] = 'Release with hash %s not found'; -$lang['TERMS_EMPTY_TEXT'] = '[align=center]The text of this page is edited at: [url=https://%s/admin/admin_terms.php]admin/admin_terms.php[/url]. This line can see only administrators.[/align]'; +$lang['TERMS_EMPTY_TEXT'] = '[align=center]The text of this page is edited at: %s. This line can see only administrators.[/align]'; $lang['TERMS_EXPLAIN'] = 'On this page, you can specify the text of the basic rules of the resource is displayed to users.'; $lang['TR_STATS'] = [ diff --git a/memberlist.php b/memberlist.php index 3f1d4db8d..c2544fc1a 100644 --- a/memberlist.php +++ b/memberlist.php @@ -11,8 +11,6 @@ define('BB_SCRIPT', 'memberlist'); require __DIR__ . '/common.php'; -$page_cfg['use_tablesorter'] = true; - $user->session_start(['req_login' => true]); $start = abs((int)request_var('start', 0)); @@ -79,7 +77,6 @@ if ($result = DB()->fetch_rowset($sql)) { 'AVATAR' => $user_info['avatar'], 'FROM' => $user_info['from'], 'JOINED' => $user_info['joined'], - 'JOINED_RAW' => $user_info['joined_raw'], 'POSTS' => $user_info['posts'], 'PM' => $user_info['pm'], 'EMAIL' => $user_info['email'], diff --git a/src/Legacy/Cache/APCu.php b/src/Legacy/Cache/APCu.php index 60d7482a6..a7a242fd1 100644 --- a/src/Legacy/Cache/APCu.php +++ b/src/Legacy/Cache/APCu.php @@ -75,6 +75,6 @@ class APCu extends Common public function is_installed(): bool { - return function_exists('apcu_add'); + return extension_loaded('apcu') && apcu_enabled(); } } diff --git a/src/Legacy/Datastore/APCu.php b/src/Legacy/Datastore/APCu.php index beb19aff4..06056e13e 100644 --- a/src/Legacy/Datastore/APCu.php +++ b/src/Legacy/Datastore/APCu.php @@ -77,6 +77,6 @@ class APCu extends Common public function is_installed(): bool { - return function_exists('apcu_add'); + return extension_loaded('apcu') && apcu_enabled(); } } diff --git a/styles/templates/default/memberlist.tpl b/styles/templates/default/memberlist.tpl index 492ac0ad0..a11b69d86 100644 --- a/styles/templates/default/memberlist.tpl +++ b/styles/templates/default/memberlist.tpl @@ -15,17 +15,17 @@ - +
- - - - - - - - + + + + + + + + @@ -38,10 +38,7 @@ - + diff --git a/terms.php b/terms.php index 587d2e7be..36e3b0a40 100644 --- a/terms.php +++ b/terms.php @@ -20,7 +20,7 @@ if (!$bb_cfg['terms'] && !IS_ADMIN) { } $template->assign_vars([ - 'TERMS_EDIT' => bbcode2html(sprintf($lang['TERMS_EMPTY_TEXT'], $bb_cfg['server_name'])), + 'TERMS_EDIT' => bbcode2html(sprintf($lang['TERMS_EMPTY_TEXT'], make_url('admin/admin_terms.php'))), 'TERMS_HTML' => bbcode2html($bb_cfg['terms']), ]);
#{L_USERNAME}{L_PM}{L_EMAIL}{L_LOCATION}{L_JOINED}{L_POSTS_SHORT}{L_WEBSITE}#{L_USERNAME}{L_PM}{L_EMAIL}{L_LOCATION}{L_JOINED}{L_POSTS_SHORT}{L_WEBSITE}
{memberrow.PM} {memberrow.EMAIL} {memberrow.FROM} - {memberrow.JOINED_RAW} - {memberrow.JOINED} - {memberrow.JOINED} {memberrow.POSTS} {memberrow.WWW}