$smwg­Remote­Req­Features

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgRemoteReqFeatures
Description Sets the behaviour of the features provided for remote requests
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Query settings
Keyword query routing · query settings · remote query · remote request · remote source
Referenced by SMWQueryProcessor


$smwgRemoteReqFeatures is a configuration parameter that sets the behaviour of the features provided for remote requests. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.1.

This configuration parameter only takes effect if a remote source was configured via configuration parameter $smwgQuerySourcesSets a list of sources, i.e. query back-ends that can return query results.
Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter accepts an array of plain string keys instead of the SMW_REMOTE_REQ_* constants. The constant form still works but is deprecated and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki..2

Default setting[edit]

$smwgRemoteReqFeatures = [ 'send-response', 'show-note' ];

This means that special page "Ask"Provides an interface that assists users with creating and executing semantic queries can be used to query remote sources. Moreover a note is shown to the user when a remote request is done.

Available options[edit]

The options enabled by default are highlighted bold.
  • 'send-response' (formerly SMW_REMOTE_REQ_SEND_RESPONSE) − Allows special page "Ask"Provides an interface that assists users with creating and executing semantic queries to respond to remote requests in combination with a source defined in configuration parameter $smwgQuerySourcesSets a list of sources, i.e. query back-ends that can return query results and the request to it.
  • 'show-note' (formerly SMW_REMOTE_REQ_SHOW_NOTE) − Shows a note for each remote request so users are aware that results retrieved from an external source.

Changing the default setting[edit]

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file:

Disable remote requests on special page "Ask"Provides an interface that assists users with creating and executing semantic queries

To disable a specific feature just redefine the configuration parameter without including the corresponding string as shown in the above section on available options:

$smwgRemoteReqFeatures = [ 'show-note' ];
Disable the notification to the user about a remote request being done
$smwgRemoteReqFeatures = [ 'send-response' ];
Disable remote requests on special page "Ask"Provides an interface that assists users with creating and executing semantic queries and the notification to the user about remote requests being done
$smwgRemoteReqFeatures = [];

Legacy constant form (deprecated since 7.0.0)[edit]

The constant form below is deprecated since Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki.. Use the string-array form shown above instead. It is documented here for wikis still running the constant form.

The default expressed with constants:

$smwgRemoteReqFeatures = SMW_REMOTE_REQ_SEND_RESPONSE | SMW_REMOTE_REQ_SHOW_NOTE;

A specific feature can be removed with a bit-operation, e.g.:

$smwgRemoteReqFeatures = ( $smwgRemoteReqFeatures & ~SMW_REMOTE_REQ_SEND_RESPONSE );
NoteNote: Please use parentheses3 when combining different bit-operations to avoid a possible mismatch.

See also[edit]


References

  1. ^  |  Semantic MediaWiki: GitHub pull request gh:smw:3167
  2. ^  | | | | | | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6793
  3. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...