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

From: Date: Sun, 03 Jul 2011 21:53:31 +0000
Subject: svn: /web/php-bugs/trunk/www/js/ userlisting.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11451@lists.php.net to get a copy of this message
felipe Sun, 03 Jul 2011 21:53:31 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312874 Log: - Fixing duplicated name in the autocomplete 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-03 21:42:17 UTC (rev 312873) +++ web/php-bugs/trunk/www/js/userlisting.php 2011-07-03 21:53:31 UTC (rev 312874) @@ -59,7 +59,10 @@ 'username' => $row['username'], ); - $user[$row['username']] = $data; + /* 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'])) { + $user[$row['username']] = $data; + } $user[$row['name']] = $data; } }

« previous php.webmaster (#11451) next »