]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 685552 - Email auto-completion causes server to thrash
authorDavid Lawrence <dlawrence@mozilla.com>
Mon, 24 Oct 2011 22:04:09 +0000 (18:04 -0400)
committerDavid Lawrence <dlawrence@mozilla.com>
Mon, 24 Oct 2011 22:04:09 +0000 (18:04 -0400)
r/a=mkanat

Bugzilla/Config/UserMatch.pm
docs/en/xml/administration.xml
template/en/default/admin/params/usermatch.html.tmpl
template/en/default/global/userselect.html.tmpl

index f97cfeab2afaa7ba58d5246512141927ffbb2f5f..38d2cb05b242c292fbadc33860f904debe2cd011 100644 (file)
@@ -46,6 +46,12 @@ sub get_param_list {
    default => '0'
   },
 
+  {
+   name    => 'ajax_user_autocompletion', 
+   type    => 'b', 
+   default => '1', 
+  },
+
   {
    name    => 'maxusermatches',
    type    => 't',
index c50ccbb3b03ae737c7cf7cdc1a2faefa3193315f..4b7189755c992bb1ded85f408fa09ed534c9bbcb 100644 (file)
             contains parameters for how user names can be queried and matched
             when entered.
           </para>
-
+          <para>
+            Another setting called 'ajax_user_autocompletion' enables certain
+            user fields to display a list of matched user names as a drop down after typing 
+            a few characters. Note that it is recommended to use mod_perl when
+            enabling 'ajax_user_autocompletion'.
+          </para>
         </section>
 
   </section>
index 54f150900bc0f39ee0437d53d800ef4265b101df..d574edca7d04a6f9a67ca73e7bbc6276f9726b34 100644 (file)
@@ -29,6 +29,9 @@
                      "needs to be selected. This option should not be enabled on " _
                      "sites where there are a large number of users.",
 
+  ajax_user_autocompletion => "If this option is set, typing characters in a certain user " _
+                              "fields will display a list of matches that can be selected from.", 
+
   maxusermatches => "Search for no more than this many matches.<br> " _
                     "If set to '1', no users will be displayed on ambiguous matches. " _
                     "This is useful for user privacy purposes.<br> " _
index 600b21c133000c7ca577a534b9822f9bf98d99fc..1d0395043bd5ee642f63729a73176f7c11d809c6 100644 (file)
@@ -79,7 +79,7 @@
   [% END %]
 </select>
 [% ELSE %]
-  [% IF id && feature_enabled('jsonrpc') %]
+  [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
     <div id="[% id FILTER html %]_autocomplete" 
          [% IF classes %] class="[% classes.join(' ') FILTER html %]" [% END %]>
   [% END %]  
@@ -94,7 +94,7 @@
     [% IF size %] size="[% size FILTER html %]" [% END %]
     [% IF id %] id="[% id FILTER html %]" [% END %]
   >
-  [% IF id && feature_enabled('jsonrpc') %]
+  [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
     <div id="[% id FILTER html %]_autocomplete_container"></div>
     </div>  
     <script type="text/javascript">