mirror of
https://github.com/php/web-php.git
synced 2026-04-29 18:03:19 +02:00
28 lines
852 B
PHP
28 lines
852 B
PHP
<?php
|
|
// $Id$
|
|
$_SERVER['BASE_PAGE'] = 'manual-lookup.php';
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc';
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/include/manual-lookup.inc';
|
|
|
|
// BC code, so pattern and function can both be used as
|
|
// parameters to specify the function name
|
|
if (empty($_GET['function']) && !empty($_GET['pattern'])) {
|
|
$_GET['function'] = $_GET['pattern'];
|
|
}
|
|
|
|
// Prepare data for search
|
|
if ($MQ) { $_GET['function'] = stripslashes($_GET['function']); }
|
|
$_GET['function'] = strtolower($_GET['function']);
|
|
|
|
// Try to find appropriate manual page
|
|
if ($file = find_manual_page($LANG, $_GET['function'])) {
|
|
mirror_redirect($file);
|
|
}
|
|
|
|
// Fall back to a quick reference search
|
|
$notfound = $_GET['function'];
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/quickref.php';
|
|
|
|
?>
|