https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106317
Revision: 106317
Author: reedy
Date: 2011-12-15 13:26:29 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Fixed mixed spaces and tabs
Modified Paths:
--------------
trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php
trunk/extensions/SoundManager2Button/SoundManager2Button.php
Modified:
trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php
===================================================================
--- trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php
2011-12-15 11:23:29 UTC (rev 106316)
+++ trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php
2011-12-15 13:26:29 UTC (rev 106317)
@@ -331,15 +331,15 @@
}
if ( $this->titleLinkSeparate ) {
- $txt = $object->getTitle()->getText();
+ $txt = $object->getTitle()->getText();
- if ( $this->pageLinkText !== '' ) {
- $txt = str_replace( '$1', $txt, $this->pageLinkText );
- }
+ if ( $this->pageLinkText !== '' ) {
+ $txt = str_replace( '$1', $txt,
$this->pageLinkText );
+ }
$text .= Html::element(
'a',
array( 'href' =>
$object->getTitle()->getFullUrl() ),
- $txt
+ $txt
);
}
}
@@ -468,7 +468,7 @@
$legend_labels = array();
// Look for display_options field, which can be set by Semantic
Compound Queries
- // the location of this field changed in SMW 1.5
+ // the location of this field changed in SMW 1.5
$display_location = method_exists( $row[0], 'getResultSubject'
) ? $row[0]->getResultSubject() : $row[0];
if ( property_exists( $display_location, 'display_options' ) &&
is_array( $display_location->display_options ) ) {
Modified: trunk/extensions/SoundManager2Button/SoundManager2Button.php
===================================================================
--- trunk/extensions/SoundManager2Button/SoundManager2Button.php
2011-12-15 11:23:29 UTC (rev 106316)
+++ trunk/extensions/SoundManager2Button/SoundManager2Button.php
2011-12-15 13:26:29 UTC (rev 106317)
@@ -1,5 +1,5 @@
<?php
-
+
# Initialization file for SoundManager2Button extension.
#
# @file SoundManager2Button.php
@@ -50,46 +50,57 @@
# In args.js : toggle soundManager.debugMode = false;
if ( !defined( 'MEDIAWIKI' ) ) {
- echo "This is the SoundManager2Button MediaWiki extension. It cannot
be run standalone.\n";
- die( -1 );
+ echo "This is the SoundManager2Button MediaWiki extension. It cannot be
run standalone.\n";
+ die( -1 );
}
-
+
$wgExtensionCredits['media'][] = array(
- 'path' => __FILE__,
- 'name' => 'SoundManager2Button',
- 'author' => 'kroocsiogsi',
- 'url' =>
'https://www.mediawiki.org/wiki/Extension:SoundManager2Button',
- 'descriptionmsg' => 'soundmanager2button-desc',
- 'version' => '0.3.0',
+ 'path' => __FILE__,
+ 'name' => 'SoundManager2Button',
+ 'author' => 'kroocsiogsi',
+ 'url' =>
'https://www.mediawiki.org/wiki/Extension:SoundManager2Button',
+ 'descriptionmsg' => 'soundmanager2button-desc',
+ 'version' => '0.3.0',
);
-
+
$wgExtensionMessagesFiles['SoundManager2Button'] = dirname( __FILE__ ) .
'/SoundManager2Button.i18n.php';
-
+
$wgHooks['ParserFirstCallInit'][] = 'wfSoundManager2Button';
-
+
$wgResourceModules['ext.wfSoundManager2Button'] = array(
- 'scripts' => array( 'script/soundmanager2-nodebug.js',
'script/mp3-player-button.js', 'script/args.js' ),
- 'styles' => 'css/mp3-player-button.css',
- 'localBasePath' => dirname( __FILE__ ),
- 'remoteExtPath' => 'SoundManager2Button',
+ 'scripts' => array( 'script/soundmanager2-nodebug.js',
'script/mp3-player-button.js', 'script/args.js' ),
+ 'styles' => 'css/mp3-player-button.css',
+ 'localBasePath' => dirname( __FILE__ ),
+ 'remoteExtPath' => 'SoundManager2Button',
);
-
-// Hook our callback function into the parser
+
+/**
+ * Hook our callback function into the parser
+ *
+ * @param $parser Parser
+ * @return bool
+ */
function wfSoundManager2Button( &$parser ) {
- $parser->setHook( 'sm2', 'renderSM2' );
- return true;
+ $parser->setHook( 'sm2', 'renderSM2' );
+ return true;
}
-
-// Execute
+
+/**
+ * Execute
+ * @param $input
+ * @param $args
+ * @param $parser Parser
+ * @return string
+ */
function renderSM2( $input, $args, $parser ) {
- global $wgExtensionAssetsPath;
- $parser->getOutput()->addModules( 'ext.wfSoundManager2Button' );
-
- $file = wfFindFile($input);
- if( $file ) {
- $url = $file->getFullURL();
- $output='<a href="'.$url.'"
title="'.wfMsgForContent('play').'"
class="sm2_button">'.wfMsgForContent('play').'</a>';
- };
-
- return $output;
+ $parser->getOutput()->addModules( 'ext.wfSoundManager2Button' );
+
+ $file = wfFindFile($input);
+ $output = '';
+ if( $file ) {
+ $url = $file->getFullURL();
+ $output='<a href="'.$url.'" title="'.wfMsgForContent('play').'"
class="sm2_button">'.wfMsgForContent('play').'</a>';
+ }
+
+ return $output;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs