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:438
wfScript
wfScript( $script='index')
Get the URL path to a MediaWiki entry point.
Definition
GlobalFunctions.php:1852
$wgRequest
global $wgRequest
Definition
Setup.php:420
$ctype
$ctype
Definition
opensearch_desc.php:38
$url
$url
Definition
opensearch_desc.php:37
opensearch_desc.php
Generated on Thu Nov 7 2024 08:27:39 for MediaWiki by
1.10.0