From 24958e19fd00719e19c297d369469bce25555870 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 29 May 2014 22:14:25 +0200 Subject: [PATCH] Fixed user online marking issues --- wcfsetup/install/files/lib/data/user/UserProfile.class.php | 2 +- .../install/files/lib/data/user/online/UserOnline.class.php | 2 +- .../files/lib/data/user/online/UsersOnlineList.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index 1df130f690..e728df0793 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -785,7 +785,7 @@ class UserProfile extends DatabaseObjectDecorator implements IBreadcrumbProvider if ($this->userOnlineGroupID) { $group = UserGroup::getGroupByID($this->userOnlineGroupID); if ($group !== null && $group->userOnlineMarking && $group->userOnlineMarking != '%s') { - return sprintf($group->userOnlineMarking, $username); + return str_replace('%s', $username, $group->userOnlineMarking); } } diff --git a/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php b/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php index c7a57e142c..d9ebdad789 100644 --- a/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php +++ b/wcfsetup/install/files/lib/data/user/online/UserOnline.class.php @@ -38,7 +38,7 @@ class UserOnline extends UserProfile { $username = StringUtil::encodeHTML($this->username); if ($this->userOnlineMarking && $this->userOnlineMarking != '%s') { - $username = sprintf($this->userOnlineMarking, $username); + $username = str_replace('%s', $username, $this->userOnlineMarking); } if ($this->canViewOnlineStatus == 3) { diff --git a/wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php b/wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php index 3da64064c6..d404613011 100644 --- a/wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php +++ b/wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php @@ -118,7 +118,7 @@ class UsersOnlineList extends SessionList { foreach (UserGroup::getGroupsByType() as $group) { if ($group->userOnlineMarking != '%s') { $priorities[] = $group->priority; - $this->usersOnlineMarkings[] = sprintf($group->userOnlineMarking, StringUtil::encodeHTML(WCF::getLanguage()->get($group->groupName))); + $this->usersOnlineMarkings[] = str_replace('%s', StringUtil::encodeHTML(WCF::getLanguage()->get($group->groupName)), $group->userOnlineMarking); } } -- 2.20.1