original_string: protected function output_optgroup($groupname, $users, $select) {
          if (!empty($users)) {
              $output = '  <optgroup label="' . htmlspecialchars($groupname) . ' (' . count($users) . ')">' . "\n";
              foreach ($users as $user) {
                  $attributes = '';
                  if (!empty($user->disabled)) {
                      $attributes .= ' disabled="disabled"';
                  } else if ($select || isset($this->selected[$user->id])) {
                      $attributes .= ' selected="selected"';
                  }
                  unset($this->selected[$user->id]);
                  $output .= '    <option' . $attributes . ' value="' . $user->id . '">' .
                          $this->output_user($user) . "</option>\n";
                  if (!empty($user->infobelow)) {
                      // Poor man's indent  here is because CSS styles do not work in select options, except in Firefox.
                      $output .= '    <option disabled="disabled" class="userselector-infobelow">' .
                              '&nbsp;&nbsp;&nbsp;&nbsp;' . s($user->infobelow) . '</option>';
                  }
              }
          } else {
              $output = '  <optgroup label="' . htmlspecialchars($groupname) . '">' . "\n";
              $output .= '    <option disabled="disabled">&nbsp;</option>' . "\n";
          }
          $output .= "  </optgroup>\n";
          return $output;
      }
code: protected function output_optgroup($groupname, $users, $select) {
          if (!empty($users)) {
              $output = '  <optgroup label="' . htmlspecialchars($groupname) . ' (' . count($users) . ')">' . "\n";
              foreach ($users as $user) {
                  $attributes = '';
                  if (!empty($user->disabled)) {
                      $attributes .= ' disabled="disabled"';
                  } else if ($select || isset($this->selected[$user->id])) {
                      $attributes .= ' selected="selected"';
                  }
                  unset($this->selected[$user->id]);
                  $output .= '    <option' . $attributes . ' value="' . $user->id . '">' .
                          $this->output_user($user) . "</option>\n";
                  if (!empty($user->infobelow)) {
                      // Poor man's indent  here is because CSS styles do not work in select options, except in Firefox.
                      $output .= '    <option disabled="disabled" class="userselector-infobelow">' .
                              '&nbsp;&nbsp;&nbsp;&nbsp;' . s($user->infobelow) . '</option>';
                  }
              }
          } else {
              $output = '  <optgroup label="' . htmlspecialchars($groupname) . '">' . "\n";
              $output .= '    <option disabled="disabled">&nbsp;</option>' . "\n";
          }
          $output .= "  </optgroup>\n";
          return $output;
      }
code_tokens: protected function output_optgroup ( $ groupname , $ users , $ select ) { if ( ! empty ( $ users ) ) { $ output = '  <optgroup label="' . htmlspecialchars ( $ groupname ) . ' (' . count ( $ users ) . ')">' . "\n" ; foreach ( $ users as $ user ) { $ attributes = '' ; if ( ! empty ( $ user -> disabled ) ) { $ attributes .= ' disabled="disabled"' ; } else if ( $ select || isset ( $ this -> selected [ $ user -> id ] ) ) { $ attributes .= ' selected="selected"' ; } unset ( $ this -> selected [ $ user -> id ] ) ; $ output .= '    <option' . $ attributes . ' value="' . $ user -> id . '">' . $ this -> output_user ( $ user ) . "</option>\n" ; if ( ! empty ( $ user -> infobelow ) ) { // Poor man's indent  here is because CSS styles do not work in select options, except in Firefox. $ output .= '    <option disabled="disabled" class="userselector-infobelow">' . '&nbsp;&nbsp;&nbsp;&nbsp;' . s ( $ user -> infobelow ) . '</option>' ; } } } else { $ output = '  <optgroup label="' . htmlspecialchars ( $ groupname ) . '">' . "\n" ; $ output .= '    <option disabled="disabled">&nbsp;</option>' . "\n" ; } $ output .= "  </optgroup>\n" ; return $ output ; }
docstring: Output one particular optgroup. Used by the preceding function output_options.
  
  @param string $groupname the label for this optgroup.
  @param array $users the users to put in this optgroup.
  @param boolean $select if true, select the users in this group.
  @return string HTML code.
docstring_tokens: Output one particular optgroup . Used by the preceding function output_options .