Changeset 12625

Show
Ignore:
Timestamp:
02/22/08 14:11:34 (11 months ago)
Author:
pottedmeat
Message:

Refs #5602. Add a namespace flag when preparing an object for themeing

Files:
1 modified

Legend:

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

    r12623 r12625  
    15511551} 
    15521552 
     1553function jsdoc_is_namespace(&$node) { 
     1554  if (isset($node->jsdoc_namespace)) { 
     1555    return $node->jsdoc_namespace; 
     1556  } 
     1557  $namespace = false; 
     1558 
     1559  if (jsdoc_get_type($node) == 'Object' || jsdoc_is_initialized($node)) { 
     1560    $query = db_query("SELECT 1 FROM node n JOIN jsdoc_objects jo ON (jo.vid = n.vid) WHERE jo.type = 'Function' AND n.title LIKE '%s' AND n.title NOT LIKE '%.toString' LIMIT 1", $node->title . '.%'); 
     1561    if (db_num_rows($query)) { 
     1562      $namespace = true; 
     1563    } 
     1564  } 
     1565  return ($node->jsdoc_namespace = $namespace); 
     1566} 
     1567 
    15531568function jsdoc_get_children(&$node, $with_private=false) { 
    15541569  if (isset($node->jsdoc_variables)) { 
     
    24102425 
    24112426function _jsdoc_get_title_themed($node) { 
    2412   $themed = (object)array( 
    2413     'title' => $node->title, 
    2414     'crumbs' => array() 
    2415   ); 
     2427  $themed = _jsdoc_get_object_themed($node); 
     2428  $themed->crumbs = array(); 
    24162429 
    24172430  if ($type = jsdoc_get_type($node)) { 
     
    24622475    'url' => $node->jsdoc_url, 
    24632476    'summary' => jsdoc_get_teaser($node), 
    2464     'singleton' => jsdoc_is_initialized($node) 
     2477    'singleton' => jsdoc_is_initialized($node), 
     2478    'namespace' => jsdoc_is_namespace($node) 
    24652479  ); 
    24662480