svn: /web/php-bugs/trunk/www/js/ userlisting.php

From: Date: Sat, 09 Jul 2011 13:52:54 +0000
Subject: svn: /web/php-bugs/trunk/www/js/ userlisting.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11504@lists.php.net to get a copy of this message
felipe Sat, 09 Jul 2011 13:52:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313087 Log: - Improved removal of duplicated name in user listing Changed paths: U web/php-bugs/trunk/www/js/userlisting.php Modified: web/php-bugs/trunk/www/js/userlisting.php =================================================================== --- web/php-bugs/trunk/www/js/userlisting.php 2011-07-09 12:07:11 UTC (rev 313086) +++ web/php-bugs/trunk/www/js/userlisting.php 2011-07-09 13:52:54 UTC (rev 313087) @@ -57,9 +57,12 @@ 'name' => $row['name'], 'username' => $row['username'], ); + + list($first_name,) = explode(' ', $row['name'], 2); + $first_name = substr($first_name, 0, strlen($row['username'])); /* Only add the user name in the array if it is not the same as the begin of the real name */ - if (!preg_match('/^'. preg_quote($row['username']) .'/i', $row['name'])) { + if (!preg_match('/^'. preg_quote($first_name) .'/i', $row['username'])) { $lookup[] = $row['username']; $user[$row['username']] = $data; }

« previous php.webmaster (#11504) next »