Page 1 of 1

Fixed Problem with broken html when showing users online

Posted: Thu May 31, 2012 3:24 pm
by daveboone
Script URL:http://mail.kcillc.com/helpdesk/admin/admin_main.php
Version of script: 2.3
Hosting company: internal server
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: users_online.inc.php, users online, script error html quote

Write your message below:
In our version of HESK 2.3 we have users online enabled so on the bottom of each web page,
you can see the list of users currently logged in. I noticed that if I was the only one logged in that
I would see <span class ="online" "> next to my name on the web page. This extra quote would not
appear if you were an admin. If there were several logged, and you were the first, then you would not
appear on the list on the page. Your name would appear if you looked at the html source of the web page as the extra quote would repeat for other non-admin users.

The problem was in the users_online.inc.php file in the /inc folder

Original line in script:
$i .= '<span class="online" ' . ($tmp['isadmin'] ? 'style="font-style:italic;' : '') . '">';

edited line in script to fix problem:
$i .= '<span class="online" ' . ($tmp['isadmin'] ? 'style="font-style:italic;"' : '') . '>';
The difference is where the quote appears. The “ was moved from . '">'; to italic;"'

This change fixed my problem. Since I could not find this problem anywhere else on PHP Junkyard,
I wonder if anyone else enables Users Online? I hope this helps someone.

Re: Fixed Problem with broken html when showing users online

Posted: Fri Jun 01, 2012 1:08 pm
by Klemen
Thanks for pointing this bug out, I will include the fix in version 2.4 (beta planned for this month).

Not sure why no one else noticed it, maybe many people just don't give much attention to it?