Hello,
the function dropdownUser propose the use of ajax if there are many users
but when I call the function with right="ID" the number of response is 
always very restricted (All - and the User) so always only 2 answers

so I propose this mini patch

in file : dropdown.function.php

in function

function 
dropdownUsers($myname,$value,$right,$all=0,$display_comments=1,$entity_restrict=-1,$helpdesk_ajax=0)
 
{
        // Make a select box with all glpi users

        global $DB,$CFG_GLPI,$LANG;

        $rand=mt_rand();

        $use_ajax=false;
        if ($CFG_GLPI["use_ajax"]){
                if 
(countElementsInTable("glpi_users")>$CFG_GLPI["ajax_limit_count"]){
                        $use_ajax=true;
                }
        }
 
        ///////////2008-01-17 - Here add these 3 lines so the dropdown 
don't propose ajax just for 2 label
        if ($right=="ID") {
                $use_ajax=false;
        }
 
//////////////////////////////////////////////////////////////////////////////////////

        $user=getUserName($value,2);
        $default_display="";
        
*******************************************************************
Ce message et les pieces qui y sont eventuellement jointes sont 
exclusivement transmis a l'intention des personnes physiques ou morales 
auxquelles ils sont destines.
Si vous avez recu ce message par erreur, merci d'en avertir immediatement 
Mazars par telephone ou par courrier electronique de retour a l'expediteur 
et de supprimer toute copie de ce message.
Par ailleurs, il vous est notifie que toute divulgation, reproduction, 
distribution ou utilisation quelconque de tout ou partie de ce message (y 
compris de ses eventuelles pieces jointes) et des informations qui y sont 
contenues est interdite.
Internet ne permettant pas d'assurer l'integrite de ce message, Mazars et 
l'expediteur declinent toute responsabilite au cas ou il aurait ete 
intercepte ou modifie par quiconque.

This message and any possible attachments are transmitted for the 
exclusive use of the intended recipient(s).
Should you receive this message by mistake, please notify Mazars or the 
sender at once by telephone or return e-mail and delete it from your 
system.
Moreover, any form of reproduction dissemination, copying, disclosure, 
modification, distribution and/or use of this message - or part of its 
contents, as well as its possible attachments by any unauthorized person 
or legal entity, is strictly prohibited. 
The nature of the Internet means that the integrity of this message cannot 
be guaranteed. Mazars and the sender therefore disclaim any liability 
whatsoever in the event of this message having been intercepted and/or 
altered.
********************************************************************

This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to