Skip to content

Commit

Permalink
Remove guests from the user online record permanently
Browse files Browse the repository at this point in the history
Closes #5888
  • Loading branch information
BurntimeX committed Apr 26, 2024
1 parent 1783a31 commit c8b9795
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
7 changes: 1 addition & 6 deletions com.woltlab.wcf/option.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,12 +1263,6 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
<minvalue>0</minvalue>
<suffix>seconds</suffix>
</option>
<option name="users_online_record_no_guests">
<categoryname>user.list.online</categoryname>
<optiontype>boolean</optiontype>
<defaultvalue>1</defaultvalue>
<options>module_users_online</options>
</option>
<option name="users_online_enable_legend">
<categoryname>user.list.online</categoryname>
<optiontype>boolean</optiontype>
Expand Down Expand Up @@ -1618,5 +1612,6 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
<option name="module_amp"/>
<option name="article_enable_visit_tracking"/>
<option name="enable_woltlab_news"/>
<option name="users_online_record_no_guests"/>
</delete>
</data>
1 change: 0 additions & 1 deletion constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
\define('USERS_ONLINE_DEFAULT_SORT_FIELD', 'lastActivityTime');
\define('USERS_ONLINE_DEFAULT_SORT_ORDER', 'DESC');
\define('USERS_ONLINE_PAGE_REFRESH', 0);
\define('USERS_ONLINE_RECORD_NO_GUESTS', 1);
\define('USERS_ONLINE_ENABLE_LEGEND', 1);
\define('USERS_ONLINE_RECORD', 1);
\define('USERS_ONLINE_RECORD_TIME', 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function getUsersOnlineMarkings()
*/
public function checkRecord()
{
$usersOnlineTotal = (USERS_ONLINE_RECORD_NO_GUESTS ? $this->stats['members'] : $this->stats['total']);
$usersOnlineTotal = $this->stats['members'];
if ($usersOnlineTotal > USERS_ONLINE_RECORD) {
// save new record
$optionAction = new OptionAction([], 'import', [
Expand Down
4 changes: 4 additions & 0 deletions wcfsetup/install/files/lib/system/WCF.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,10 @@ protected function defineLegacyOptions(): void
\define('GOOGLE_MAPS_ENABLE_SCROLL_WHEEL_ZOOM', 0);
\define('GOOGLE_MAPS_ENABLE_DOUBLE_CLICK_ZOOM', 1);
\define('GOOGLE_MAPS_ACCESS_USER_LOCATION', 1);

// The option to count guests in the online record was removed with version 6.1.
// https://github.com/WoltLab/WCF/issues/5888
\define('USERS_ONLINE_RECORD_NO_GUESTS', 1);
}

/**
Expand Down
1 change: 0 additions & 1 deletion wcfsetup/install/lang/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,6 @@ Die Beschränkung auf ASCII-Zeichen erlaubt in Benutzernamen lediglich lateinisc
Beispiele:<br>
WBB=WoltLab Burning Board<br>
GmbH=Gesellschaft mit beschränkter Haftung]]></item>
<item name="wcf.acp.option.users_online_record_no_guests"><![CDATA[Nur registrierte Benutzer im Benutzer-Online-Rekord zählen]]></item>
<item name="wcf.acp.option.users_online_enable_legend"><![CDATA[Legende der Benutzergruppen anzeigen]]></item>
<item name="wcf.acp.option.category.general.system.googleMaps"><![CDATA[Google Maps]]></item>
<item name="wcf.acp.option.google_maps_zoom"><![CDATA[Karten-Zoom]]></item>
Expand Down
1 change: 0 additions & 1 deletion wcfsetup/install/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,6 @@ Restricting usernames to ASCII characters restricts usernames to latin letters,
<item name="wcf.acp.option.users_online_default_sort_order.description"><![CDATA[Choose default sort order of “Users Online” list.]]></item>
<item name="wcf.acp.option.users_online_page_refresh"><![CDATA[Refresh Page]]></item>
<item name="wcf.acp.option.users_online_page_refresh.description"><![CDATA[Refreshes “Users Online” in the following seconds. Use 0 to disable.]]></item>
<item name="wcf.acp.option.users_online_record_no_guests"><![CDATA[Exclude guests from the most users online record]]></item>
<item name="wcf.acp.option.user_cleanup_notification_lifetime"><![CDATA[Notifications]]></item>
<item name="wcf.acp.option.user_cleanup_notification_lifetime.description"><![CDATA[Notifications will be removed after the following days.]]></item>
<item name="wcf.acp.option.user_cleanup_activity_event_lifetime"><![CDATA[Recent Activity]]></item>
Expand Down

0 comments on commit c8b9795

Please sign in to comment.