Fixed user online marking issues
authorMarcel Werk <burntime@woltlab.com>
Thu, 29 May 2014 20:14:25 +0000 (22:14 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 29 May 2014 20:14:25 +0000 (22:14 +0200)
wcfsetup/install/files/lib/data/user/UserProfile.class.php
wcfsetup/install/files/lib/data/user/online/UserOnline.class.php
wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php

index 1df130f6905d3f276452bfd34c782159c9aebbae..e728df0793596fa05fdf223a4288d78006da289a 100644 (file)
@@ -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);
                        }
                }
                
index c7a57e142c638cb8b1ede35c23dda2d8a19f4cde..d9ebdad789b9083a8cb6f36cd1bc1303e60373f8 100644 (file)
@@ -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) {
index 3da64064c6676e7832ef2bfde555b985818c0b6a..d404613011c3e591564d791fc94a46a6b5fa7dc6 100644 (file)
@@ -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);
                                }
                        }