https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112633
Revision: 112633 Author: danwe Date: 2012-02-28 20:43:27 +0000 (Tue, 28 Feb 2012) Log Message: ----------- Repaired CALLER parser function after it was broken in r109525. Changed version to "0.3 alpha", changed http links to https Modified Paths: -------------- trunk/extensions/ParserFun/ParserFun.php trunk/extensions/ParserFun/README trunk/extensions/ParserFun/RELEASE-NOTES trunk/extensions/ParserFun/includes/PFun_Caller.php Modified: trunk/extensions/ParserFun/ParserFun.php =================================================================== --- trunk/extensions/ParserFun/ParserFun.php 2012-02-28 20:41:32 UTC (rev 112632) +++ trunk/extensions/ParserFun/ParserFun.php 2012-02-28 20:43:27 UTC (rev 112633) @@ -4,11 +4,11 @@ * 'Parser Fun' adds a parser function '#parse' for parsing wikitext and introduces the * 'THIS:' prefix for page information related magic variables * - * Documentation: http://www.mediawiki.org/wiki/Extension:Parser_Fun - * Support: http://www.mediawiki.org/wiki/Extension_talk:Parser_Fun - * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ParserFun + * Documentation: https://www.mediawiki.org/wiki/Extension:Parser_Fun + * Support: https://www.mediawiki.org/wiki/Extension_talk:Parser_Fun + * Source code: https://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ParserFun * - * @version: 0.2 + * @version: 0.3 alpha * @license: ISC license * @author: Daniel Werner < danwe...@web.de > * @@ -27,7 +27,7 @@ // Only initialize the extension when Validator extension is present: if ( ! defined( 'Validator_VERSION' ) ) { - die( '<p><b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Parse">Parse</a>.</p>' ); + die( '<p><b>Error:</b> You need to have <a href="https://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="https://www.mediawiki.org/wiki/Extension:Parse">Parse</a>.</p>' ); } @@ -37,7 +37,7 @@ 'name' => 'Parser Fun', 'descriptionmsg' => 'parserfun-desc', 'version' => ExtParserFun::VERSION, - 'author' => '[http://www.mediawiki.org/wiki/User:Danwe Daniel Werner]', + 'author' => '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]', 'url' => 'https://www.mediawiki.org/wiki/Extension:Parser_Fun', ); @@ -78,7 +78,7 @@ * * @var string */ - const VERSION = '0.3'; + const VERSION = '0.3 alpha'; static function init( Parser &$parser ) { if( self::isEnabledFunction( 'this' ) ) { @@ -93,7 +93,7 @@ * * @since 0.2 * - * @param type $word + * @param string $word * @return bool */ static function isEnabledFunction( $word ) { @@ -106,7 +106,7 @@ * * @since 0.1 * - * @return boolean + * @return string */ static function getDir() { static $dir = null; Modified: trunk/extensions/ParserFun/README =================================================================== --- trunk/extensions/ParserFun/README 2012-02-28 20:41:32 UTC (rev 112632) +++ trunk/extensions/ParserFun/README 2012-02-28 20:43:27 UTC (rev 112633) @@ -19,9 +19,9 @@ as well as their URL-encoded equivalents ending with 'EE'. It is possible for other extensions to support the 'THIS:' prefix, currently: - All 'Subpage Fun' extension variables: - http://www.mediawiki.org/wiki/Extension:Subpage_Fun + https://www.mediawiki.org/wiki/Extension:Subpage_Fun -* Website: http://www.mediawiki.org/wiki/Extension:Parser_Fun +* Website: https://www.mediawiki.org/wiki/Extension:Parser_Fun * Author: Daniel Werner < danwe...@web.de > @@ -44,4 +44,4 @@ If you have bug reports or feature requests, please add them to the 'Parser Fun' Talk page [0]. You can also send them to Daniel Werner < danwe...@web.de > -[0] http://www.mediawiki.org/w/index.php?title=Extension_talk:Parser_Fun +[0] https://www.mediawiki.org/w/index.php?title=Extension_talk:Parser_Fun Modified: trunk/extensions/ParserFun/RELEASE-NOTES =================================================================== --- trunk/extensions/ParserFun/RELEASE-NOTES 2012-02-28 20:41:32 UTC (rev 112632) +++ trunk/extensions/ParserFun/RELEASE-NOTES 2012-02-28 20:43:27 UTC (rev 112633) @@ -1,6 +1,9 @@ 'Parser Fun' Changelog: ======================= + * Version 0.3 + ~~ THIS IS NOT A FINAL RELEASE YET ~~ + * December 9, 2011 -- Version 0.2 - New parser function/variable 'CALLER' to return a templates caller. Comes with the following parameters: + <1>/mode - can be the level of the call stack to return (if negative the value will be returned from the Modified: trunk/extensions/ParserFun/includes/PFun_Caller.php =================================================================== --- trunk/extensions/ParserFun/includes/PFun_Caller.php 2012-02-28 20:41:32 UTC (rev 112632) +++ trunk/extensions/ParserFun/includes/PFun_Caller.php 2012-02-28 20:43:27 UTC (rev 112633) @@ -22,7 +22,7 @@ */ public static function staticInit( Parser &$parser ) { global $egParserFunEnabledFunctions; - if( in_array( ExtParserFun::MAG_CALLER, $egParserFunEnabledFunctions ) ) { + if( in_array( 'caller', $egParserFunEnabledFunctions ) ) { // only register function if not disabled by configuration $instance = new self; $instance->init( $parser ); @@ -37,7 +37,7 @@ * @return string */ protected function getName() { - return 'CALLER'; + return 'caller'; } /** _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs