MediaWiki
master
opensearch_desc.php
Go to the documentation of this file.
1
<?php
29
// This endpoint is supposed to be independent of request cookies and other
30
// details of the session. Enforce this constraint with respect to session use.
31
define(
'MW_NO_SESSION'
, 1 );
32
33
define(
'MW_ENTRY_POINT'
,
'opensearch_desc'
);
34
35
require_once __DIR__ .
'/includes/WebStart.php'
;
36
37
$url
=
wfScript
(
'rest'
) .
'/v1/search'
;
38
$ctype
=
$wgRequest
->getRawVal(
'ctype'
);
39
40
if
(
$ctype
!==
null
) {
41
$url
=
wfAppendQuery
(
$url
, [
'ctype'
=>
$ctype
] );
42
}
43
44
$wgRequest
->response()->header(
'Location: '
.
$url
,
true
, 308 );
45
$wgRequest
->response()->header(
'Cache-control: max-age=600'
);
wfAppendQuery
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
Definition
GlobalFunctions.php:439
wfScript
wfScript( $script='index')
Get the URL path to a MediaWiki entry point.
Definition
GlobalFunctions.php:1854
$wgRequest
global $wgRequest
Definition
Setup.php:447
$ctype
$ctype
Definition
opensearch_desc.php:38
$url
$url
Definition
opensearch_desc.php:37
opensearch_desc.php
Generated on Mon Dec 30 2024 13:27:28 for MediaWiki by
1.10.0