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)) { redirect($random_index_redirect[mt_rand(0, count($random_index_redirect) - 1)]); } } $page['is_homepage'] = true; break; default: trigger_error('script_basename "' . script_basename() . '" unknown', E_USER_WARNING); } } $page = array_merge($page, parse_well_known_params_url($tokens, $next_token)); //access a picture only by id, file or id-file without given section if (script_basename() == 'picture' and 'categories' == $page['section'] and !isset($page['category']) and !isset($page['chronology_field'])) { $page['flat'] = true; } // $page['nb_image_page'] is the number of picture to display on this page // By default, it is the same as the $user['nb_image_page'] $page['nb_image_page'] = $user['nb_image_page']; // if flat mode is active, we must consider the image set as a standard set // and not as a category set because we can't use the #image_category.rank : // displayed images are not directly linked to the displayed category if ('categories' == $page['section'] and !isset($page['flat'])) { $conf['order_by'] = $conf['order_by_inside_category']; } if (pwg_get_session_var('image_order', 0) > 0) { $image_order_id = pwg_get_session_var('image_order');
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; }