示例#1
0
            $page['image_id'] = $matches[1];
            if (!empty($matches[2])) {
                $page['image_file'] = $matches[2];
            }
        } else {
            $page['image_id'] = 0;
            // more work in picture.php
            if (!empty($matches[2])) {
                $page['image_file'] = $matches[2];
            } else {
                bad_request('picture identifier is missing');
            }
        }
    }
}
$page = array_merge($page, parse_section_url($tokens, $next_token));
if (!isset($page['section'])) {
    $page['section'] = 'categories';
    switch (script_basename()) {
        case 'picture':
            break;
        case 'index':
            // No section defined, go to random url
            if (!empty($conf['random_index_redirect']) and empty($tokens[$next_token])) {
                $random_index_redirect = array();
                foreach ($conf['random_index_redirect'] as $random_url => $random_url_condition) {
                    if (empty($random_url_condition) or eval($random_url_condition)) {
                        $random_index_redirect[] = $random_url;
                    }
                }
                if (!empty($random_index_redirect)) {
function osm_parse_map_data_url($tokens, &$next_token)
{
    $page = parse_section_url($tokens, $next_token);
    if (!isset($page['section'])) {
        $page['section'] = 'categories';
    }
    $page = array_merge($page, parse_well_known_params_url($tokens, $next_token));
    $page['start'] = 0;
    $page['box'] = osm_bounds_from_url(@$_GET['box']);
    return $page;
}