Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SemanticResultFormats.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public static function addToAdminLinks( ALTree &$admin_links_tree ) {
* @return true
*/
public static function onResourceLoaderGetConfigVars( &$vars ) {
// Powers srf.settings.get(), via ext.stf.js.
$vars['srf-config'] = [
'version' => SRF_VERSION,
'settings' => [
Expand Down
15 changes: 0 additions & 15 deletions SemanticResultFormats.utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ public static function htmlProcessingElement( $isHtml = true ) {
);
}

/**
* Add JavaScript variables to the output
*
* @since 1.8
*/
public static function addGlobalJSVariables() {
$options = [
'srfgScriptPath' => $GLOBALS['srfgScriptPath'],
'srfVersion' => SRF_VERSION
];

$requireHeadItem = [ 'srf.options' => $options ];
SMWOutputs::requireHeadItem( 'srf.options', self::makeVariablesScript( $requireHeadItem ) );
}

/**
* Returns semantic search link for the current query
*
Expand Down
3 changes: 0 additions & 3 deletions formats/gallery/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ public function getResultText( QueryResult $results, $outputmode ) {
$this->addImagePages( $results, $ig );
}

// SRF Global settings
SRFUtils::addGlobalJSVariables();

// Display a processing image as long as the DOM is no ready
if ( $this->params['widget'] !== '' ) {
$processing = SRFUtils::htmlProcessingElement();
Expand Down