r71702 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71701‎ | r71702 | r71703 >
Date:15:33, 26 August 2010
Author:ashley
Status:deferred
Tags:
Comment:
follow-up to r70046: now the extension works again, was spewing out errors about missing function or incorrect name. also bumped version number and tweaked the names of two functions as per http://www.mediawiki.org/wiki/Manual:Coding_conventions#Code_elements
Modified paths:
  • /trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php
@@ -7,10 +7,10 @@
88 *
99 * @file
1010 * @ingroup Extensions
 11+ * @version 1.3
1112 * @author Aaron Wright
1213 * @author David Pean
1314 * @author Jack Phoenix <jack@countervandalism.net>
14 - * @version 1.0
1515 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1616 * @link http://www.mediawiki.org/wiki/Extension:WikiTextLoggedInOut Documentation
1717 */
@@ -19,7 +19,7 @@
2020 $wgExtensionCredits['parserhook'][] = array(
2121 'path' => __FILE__,
2222 'name' => 'WikiTextLoggedInOut',
23 - 'version' => '1.2',
 23+ 'version' => '1.3',
2424 'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
2525 'url' => 'http://www.mediawiki.org/wiki/Extension:WikiTextLoggedInOut',
2626 'descriptionmsg' => 'wikitextloggedinout-desc'
@@ -29,13 +29,13 @@
3030 $wgExtensionMessagesFiles['WikiTextLoginInOut'] = $dir . 'WikiTextLoggedInOut.i18n.php';
3131
3232 $wgHooks['ParserFirstCallInit'][] = 'efWikiTextLoggedInOut';
33 -function efWikiTextLoggedIn( &$parser ) {
34 - $parser->setHook( 'loggedin', 'OutputLoggedInText' );
35 - $parser->setHook( 'loggedout', 'OutputLoggedOutText' );
 33+function efWikiTextLoggedInOut( &$parser ) {
 34+ $parser->setHook( 'loggedin', 'outputLoggedInText' );
 35+ $parser->setHook( 'loggedout', 'outputLoggedOutText' );
3636 return true;
3737 }
3838
39 -function OutputLoggedInText( $input, $args, $parser, $frame ) {
 39+function outputLoggedInText( $input, $args, $parser, $frame ) {
4040 global $wgUser;
4141
4242 if( $wgUser->isLoggedIn() ) {
@@ -45,7 +45,7 @@
4646 return '';
4747 }
4848
49 -function OutputLoggedOutText( $input, $args, $parser, $frame ) {
 49+function outputLoggedOutText( $input, $args, $parser, $frame ) {
5050 global $wgUser;
5151
5252 if( !$wgUser->isLoggedIn() ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70046Use the frame and set the two hooks in one function.platonides21:11, 27 July 2010

Status & tagging log