Changeset 12538

Show
Ignore:
Timestamp:
02/19/08 15:43:47 (11 months ago)
Author:
pottedmeat
Message:

Refs #5602. Improve function signature

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/branches/dev/jsdoc/jsdoc.module

    r12537 r12538  
    13801380  $query = db_query("SELECT name, type, summary, optional, repeating FROM {jsdoc_parameters} WHERE vid = %d ORDER BY weight", $object->vid); 
    13811381  while ($parameter = db_fetch_array($query)) { 
    1382     $parameter['jsdoc_formatted'] = _jsdoc_format_type($parameter['type'], $parameter['optional'], $parameter['recurring']); 
     1382    $parameter['jsdoc_formatted'] = _jsdoc_format_type($parameter['type'], $parameter['optional'], $parameter['repeating']); 
    13831383    $object->jsdoc_parameters[$parameter['name']] = $parameter; 
    13841384  } 
     
    30153015    $parameter->name = $item['name']; 
    30163016    $parameter->optional = $item['optional']; 
    3017     $parameter->recurring = $item['recurring']; 
     3017    $parameter->repeating = $item['repeating']; 
    30183018    $parameter->types = false; 
    30193019    if ($cleaned) { 
     
    30233023    } 
    30243024 
    3025     $type = $parameter->type; 
     3025    $type = $item['type']; 
    30263026    $types = array(); 
    30273027    if (strpos($type, '|') !== false) { 
     
    30703070                $found = 0; 
    30713071                $field_type = str_replace('...', '', $field_type, $found); 
    3072                 $recurring = ($found > 0); 
     3072                $repeating = ($found > 0); 
    30733073 
    30743074                $field_obj = jsdoc_object_node_load($field_type, jsdoc_get_project($node), jsdoc_get_version($node), jsdoc_get_all_provide_nids($node, array(3, 4))); 
    30753075                $field_type = (object)array( 
    30763076                  'title' => $field_obj->title, 
    3077                   'recurring' => $recurring, 
     3077                  'repeating' => $repeating, 
    30783078                  'optional' => $optional, 
    30793079                  'summary' => jsdoc_get_teaser($field_obj) 
     
    31003100} 
    31013101 
    3102 function _jsdoc_format_type($type, $classlike = false, $optional = false, $recurring = false) { 
     3102function _jsdoc_format_type($type, $classlike = false, $optional = false, $repeating = false) { 
    31033103  $output = array(); 
    31043104  $name = ''; 
     
    31143114      $output['type'] .= '?'; 
    31153115    } 
    3116     if ($recurring) { 
     3116    if ($repeating) { 
    31173117      $output['type'] .= '...'; 
    31183118    } 
     
    35833583        $signature .= '?'; 
    35843584      } 
    3585       if ($parameter->recurring) { 
     3585      if ($parameter->repeating) { 
    35863586        $signature .= '...'; 
    35873587      } 
     
    40984098  $output .= '<div class="fieldset-wrapper">'; 
    40994099  foreach ($children as $child) { 
    4100     $output .= '<div class="form-item">'; 
     4100    $output .= '<div class=F"form-item">'; 
    41014101    if ($child->type) { 
    41024102      $output .= '<em>' . $child->type->a . '</em> '; 
     
    42014201 
    42024202        $field_types = array(); 
    4203         $recurring = false; 
     4203        $repeating = false; 
    42044204        $optional = false; 
    42054205        if ($field->types) { 
    42064206          foreach ($field->types as $type) { 
    4207             if ($type->recurring) { 
    4208               $recurring = true; 
     4207            if ($type->repeating) { 
     4208              $repeating = true; 
    42094209            } 
    42104210            if ($type->optional) { 
     
    42204220        } 
    42214221        $output .= $field->a; 
    4222         if ($recurring) { 
    4223           $output .= ' <small><em>recurring</em></small>'; 
     4222        if ($repeating) { 
     4223          $output .= ' <small><em>repeating</em></small>'; 
    42244224        } 
    42254225        if ($optional) {