All pastes #264665 Raw Edit

Someone

public php v1 · immutable
·published 2006-12-02 16:50 UTC
rendered paste body
        foreach ($branches as $branch) {          if ($file_name = db_result(db_query("SELECT file_name FROM {api_documentation} WHERE title = '%s' AND branch_name = '%s' AND object_type = 'file'", $file_object, $branch->branch_name))) {            $items[] = array(              'path' => 'api/file/'. $file_name,              'title' => $branch->title,              'callback' => 'api_page_file',              'access' => $access,              'callback arguments' => array($branch->branch_name, $file_name),              'type' => ($branch->branch_name == variable_get('api_default_branch', 'HEAD')) ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,            );          }        }        $items[] = array(          'path' => 'api/file/'. $main_file_name .'/documentation',          'title' => t('View documentation'),          'type' => MENU_DEFAULT_LOCAL_TASK,          'weight' => -10,        );        $items[] = array(          'path' => 'api/file/'. $main_file_name .'/source',          'title' => t('View source'),          'callback' => 'api_page_file_source',          'access' => $access,          'callback arguments' => array($branch_name, $main_file_name),          'type' => MENU_LOCAL_TASK,        );      }